[Bioperl-l] Bio::Seq weight ?
Heikki Lehvaslaiho
heikki at ebi.ac.uk
Wed May 12 09:50:25 EDT 2004
On Tuesday 11 May 2004 19:14, stephan rosecker wrote:
> Hi,
>
> is it possible to get the weight form a Bio::Seq object ?
This is from the bptutorial script:
III.3.2 Obtaining basic sequence statistics (SeqStats,SeqWord)
In addition to the methods directly available in the Seq object,
bioperl provides various helper objects to determine additional
information about a sequence. For example, SeqStats object provides
methods for obtaining the molecular weight of the sequence as well the
number of occurrences of each of the component residues (bases for a
nucleic acid or amino acids for a protein.) For nucleic acids,
SeqStats also returns counts of the number of codons used. For
example:
use SeqStats;
$seq_stats = Bio::Tools::SeqStats->new($seqobj);
$weight = $seq_stats->get_mol_wt();
$monomer_ref = $seq_stats->count_monomers();
$codon_ref = $seq_stats->count_codons(); # for nucleic acid sequence
Note: sometimes sequences will contain ambiguous codes. For this
reason, get_mol_wt() returns a reference to a two element array
containing a greatest lower bound and a least upper bound of the
molecular weight.
-Heikki
> regards,
> stephan
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at portal.open-bio.org
> http://portal.open-bio.org/mailman/listinfo/bioperl-l
--
______ _/ _/_____________________________________________________
_/ _/ http://www.ebi.ac.uk/mutations/
_/ _/ _/ Heikki Lehvaslaiho heikki_at_ebi ac uk
_/_/_/_/_/ EMBL Outstation, European Bioinformatics Institute
_/ _/ _/ Wellcome Trust Genome Campus, Hinxton
_/ _/ _/ Cambs. CB10 1SD, United Kingdom
_/ Phone: +44 (0)1223 494 644 FAX: +44 (0)1223 494 468
___ _/_/_/_/_/________________________________________________________
More information about the Bioperl-l
mailing list