Bio::T...dCodes(3pm)
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 CADDGCEA (=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 CEFFHCFA (=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 AACCDAEA (=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 NNAANNCA (negative; NOT anode), C (positive; NOT cathode), N (neutral)
- Returns: Reference to the new sequence string
- Args: none
β οΈ quick lil reminder bestie: thoseNOT anode/NOT cathodenotes onchargeare 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
- debian bookworm: libbio-perl-perl 1.7.8-1 Β· Perl
- debian trixie: libbio-perl-perl 1.7.8-1 Β· Perl
- ubuntu jammy: libbio-perl-perl 1.7.8-1 Β· Perl
- ubuntu noble: libbio-perl-perl 1.7.8-1 Β· Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms