[Bioperl-l] RE: How to check mRNA

Lifeng Tian lt0000@usip.edu
Wed, 17 Oct 2001 10:50:06 -0400


on 10/16/01 6:05 PM, Hong Lu at honglu69@altavista.com wrote:

> I want to differentiate mRNA sequence from other Sequences. I found
> $seqobj->moltype will always give me 'dna' value even if the sequence is mRNA
> type on the first line of genbank record.
> 
> How to get the mRNA value fo error checking purpose?
> 
> Henry Lu
> Bioinformatics Scientist
> Epigenesis Pharmaceuticals
> 
> 
If you are using the standard way to request a stream object from
Bio::SeqIO, then you should call:
$seqobj->molecule(), instead of $seqobj->moltype.

In Bio::SeqIO::GenBank, you can find the seqobj is a Bio::Seq::RichSeq.
$seqobj->moltype only contains DNA or Protein, and  the molecular types in
Locus line can be accessed through  $seqobj->molecule().


################example##########
#!/usr/bin/perl -w

use Bio::SeqIO;

my $stream = Bio::SeqIO->new(-file=>$ARGV[0],
    -format => "genbank");

while ( my $seq=$stream->next_seq() ) {
    print "\nmoltype:",$seq->moltype();  #you get "dna"
    
    print "\nmolecule:",$seq->molecule(); #you get "mRNA"
}
###########

Lifeng Tian
Depart of Chemistry and Biochemistry
Univ. of the Sciences in Philadelphia