Bio::T...dCodes(3pm)

πŸ“¦
version 1.7.8 Β· 3 versions
, in debian bookworm, debian trixie, ubuntu jammy, ubuntu noble

okay so bestie πŸ’– you just opened the User Contributed Perl Documentation page for Bio::Tools::OddCodes, and honestly? it's giving niche-but-iconic. let's get into it 🧬✨

🌸 NAME 🌸

Bio::Tools::OddCodes β€” an object holding alternative alphabet coding for one protein sequence πŸ‘‘


✨ SYNOPSIS ✨

bestie, the vibe is: you take a sequence object (from an inputstream, or wherever), and you make an object whose whole job is rewriting that sequence in a different alphabet. these are abbreviated amino acid sequence alphabets β€” designed to make the stats side of protein analysis less of a nightmare, by cutting down the combinatorial explosion of the 20-letter alphabet. these abbreviated alphabets range in size from 2 to 8 πŸŽ€

# Take a sequence object from eg, an inputstream, and creates a
# object for the purposes of rewriting that sequence in another
# alphabet.  These are abbreviated amino acid sequence alphabets,
# designed to simplify the statistical aspects of analysing protein
# sequences, by reducing the combinatorial explosion of the
# 20-letter alphabet.  These abbreviated alphabets range in size
# from 2 to 8.

# Creating the OddCodes object, eg:

      my $inputstream = Bio::SeqIO->new( '-file' => "seqfile",
                                         '-format' => 'Fasta');
      my $seqobj = $inputstream->next_seq();
      my $oddcode_obj = Bio::Tools::Oddcodes->new(-seq => $seqobj);

# or:

      my $seqobj = Bio::PrimarySeq->new
            (-seq=>'[cut and paste a sequence here]',
             -alphabet => 'protein',
             -id => 'test');
      my $oddcode_obj  =  Bio::Tools::OddCodes->new(-seq => $seqobj);

# do the alternative coding, returning the answer as a reference to
# a string

      my $output = $oddcode_obj->structural();
      my $output = $oddcode_obj->chemical();
      my $output = $oddcode_obj->functional();
      my $output = $oddcode_obj->charge();
      my $output = $oddcode_obj->hydrophobic();
      my $output = $oddcode_obj->Dayhoff();
      my $output = $oddcode_obj->Sneath();
      my $output = $oddcode_obj->Stanfel();

# display sequence in new form, eg:

      my $new_coding = $$output;
      print "\n$new_coding";

πŸ’œ DESCRIPTION πŸ’œ

Bio::Tools::Oddcodes is a welterweight object for rewriting a protein sequence in an alternative alphabet. eight of those alphabets are provided, ranging all the way from the 2-letter hydrophobic alphabet up to the 8-letter chemical alphabet 🌈 these are genuinely useful for the statistical analysis of protein sequences, because they can partially dodge the combinatorial explosion that the full 20-letter alphabet gives you (like, we're talking 400 dimers, 8000 trimers, etc.) 😭 the math was mathing too hard.

if the input sequence is not a protein, the object will print out a warning. if you know what you're doing, you can silence that warning by setting verbose() to a negative value 🀫

and yeah β€” see the SYNOPSIS above for the object creation code, it's all there 🫢


πŸ“š REFERENCES πŸ“š

  • Stanfel LE (1996) A new approach to clustering the amino acids. J. theor. Biol. 183, 195-205.
  • Karlin S, Ost F and Blaisdell BE (1989) Patterns in DNA and amino acid sequences and their statistical significance. Chapter 6 of: Mathematical Methods for DNA Sequences. Waterman MS (ed.) CRC Press, Boca Raton , FL.

πŸ’Œ FEEDBACK πŸ’Œ

πŸ“¬ Mailing Lists πŸ“¬

user feedback is, like, an integral part of the evolution of this and other Bioperl modules β€” genuinely. send your comments and suggestions preferably to one of the Bioperl mailing lists. your participation is much appreciated πŸ’–

bioperl-l@bioperl.org                  - General discussion
http://bioperl.org/wiki/Mailing_lists  - About the mailing lists

πŸ«‚ Support πŸ«‚

please direct usage questions or support issues to the mailing list:

bioperl-l@bioperl.org

rather than to the module maintainer directly. so many experienced and responsive experts will be able to look at the problem and quickly address it πŸ‘‘ and if it's at all possible, please include a thorough description of the problem with code and data examples. the more detail the better, no cap.

πŸ› Reporting Bugs πŸ›

report bugs to the Bioperl bug tracking system so we can keep track of the bugs and their resolution. bug reports can be submitted via the web:

https://github.com/bioperl/bioperl-live/issues

✍️ AUTHOR ✍️

Derek Gatherer πŸ’…


🧚 APPENDIX 🧚

the rest of the documentation details each of the object methods. internal methods are usually preceded with a _ (iykyk).

structural πŸ¦‹

  • Title: structural
  • Usage: $output = $oddcode_obj->structural();
  • Function: turns amino acid sequence into 3-letter structural alphabet: A (ambivalent), E (external), I (internal)
  • Example: a sequence ACDEFGH will become AAEEIAE
  • Returns: Reference to the new sequence string
  • Args: none

functional πŸ“

  • Title: functional
  • Usage: $output = $oddcode_obj->functional();
  • Function: turns amino acid sequence into 4-letter functional alphabet: A (acidic), C (basic), H (hydrophobic), P (polar)
  • Example: a sequence ACDEFGH will become HPAAHHC
  • Returns: Reference to the new sequence string
  • Args: none

hydrophobic πŸ’§

  • Title: hydrophobic
  • Usage: $output = $oddcode_obj->hydrophobic();
  • Function: turns amino acid sequence into 2-letter hydrophobicity alphabet: O (hydrophobic), I (hydrophilic)
  • Example: a sequence ACDEFGH will become OIIIOII
  • Returns: Reference to the new sequence string
  • Args: none

Dayhoff ⭐

  • Title: Dayhoff
  • Usage: $output = $oddcode_obj->Dayhoff();
  • Function: turns amino acid sequence into 6-letter Dayhoff alphabet
  • Example: a sequence ACDEFGH will become CADDGCE
    • A (=C), C (=AGPST), D (=DENQ),
    • E (=HKR), F (=ILMV), G (=FWY)
  • Returns: Reference to the new sequence string
  • Args: none

Sneath 🌸

  • Title: Sneath
  • Usage: $output = $oddcode_obj->Sneath();
  • Function: turns amino acid sequence into 7-letter Sneath alphabet
  • Example: a sequence ACDEFGH will become CEFFHCF
    • A (=ILV), C (=AGP), D (=MNQ), E (=CST),
    • F (=DE), G (=KR), H (=FHWY)
  • Returns: Reference to the new sequence string
  • Args: none

Stanfel πŸ‘‘

  • Title: Stanfel
  • Usage: $output = $oddcode_obj->Stanfel();
  • Function: turns amino acid sequence into 4-letter Stanfel alphabet
  • Example: a sequence ACDEFGH will become AACCDAE
    • A (=ACGILMPSTV), C (=DENQ), D (=FWY), E (=HKR)
  • Returns: Reference to the new sequence string
  • Args: none

chemical πŸ§ͺ

  • Title: chemical
  • Usage: $output = $oddcode_obj->chemical();
  • Function: turns amino acid sequence into 8-letter chemical alphabet: A (acidic), L (aliphatic), M (amide), R (aromatic), C (basic), H (hydroxyl), I (imino), S (sulphur)
  • Example: a sequence ACDEFGH will become LSAARAC
  • Returns: Reference to the new sequence string
  • Args: none

charge ⚑

  • Title: charge
  • Usage: $output = $oddcode_obj->charge();
  • Function: turns amino acid sequence into 3-letter charge alphabet
  • Example: a sequence ACDEFGH will become NNAANNC
    • A (negative; NOT anode), C (positive; NOT cathode), N (neutral)
  • Returns: Reference to the new sequence string
  • Args: none

⚠️ quick lil reminder bestie: those NOT anode / NOT cathode notes on charge are doing real work β€” don't go reading A and C as electrodes, okay? πŸ™ˆ

and that's the whole page, we ate and left no crumbs πŸ’… this was perl v5.32.1, dated 2021-08-15 β€” mwah, bye bestie πŸŽ€βœ¨πŸ¦‹

πŸ“¦ where this page comes from