[Bioperl-l] How to get the contents?

Michael Thon mike.thon at gmail.com
Fri Dec 14 17:41:44 UTC 2007


Hi Information_details, a.k.a. Archana :)

"1", and "485" can be retrieved with something like:

$feat->start();
$feat->end();

if you want start and end of each exon then you need:
my $location = $feat->location();

which returns a Bio::LocationI object.

I think the 'gene' tag is a tag-value pair that  can be retrieved with:

my @values = $feat->get_tag_values("gene");

-Mike


On Dec 14, 2007, at 4:56 AM, Information_details wrote:

>
> Hi,
>
> I am new to bioperl.
>
> I am using module  Bio::SeqIO;
>
> I have genbank file. http://www.nabble.com/file/p14329679/seq.gb  
> seq.gb
>
> In this file i have to match gene tag and get all its contents.
>
> which function i have to use?
>
> The gene portion look like this
>
> gene            1..485
>                     /gene="PRM1"
>                     /note="Derived by automated computational analysis
> using
>                     gene prediction method: BestRefseq. Supporting  
> evidence
>                     includes similarity to: 1 mRNA"
>                     /db_xref="GeneID:5619"
>                     /db_xref="HGNC:9447"
>
> i have to match gene tag and get its contents?
>
> [CODE]
> $seq=$seqobj->next_seq();
>
> foreach $feat ($seq->get_all_SeqFeatures())
> {
>        if($feat->primary_tag eq "mRNA")
>        {
>                foreach $tag ($feat->get_all_tags())
>                {
>                        if($tag eq "gene")
>                        {
>                            #here i have to retrieve the information  
> like
> this.
>                           1..485
>                         /gene="PRM1"
>                        }
>                 }
>         }
> [/CODE]
> How do i do that?
>
> with regards
> Archana
>
>
>
>
> -- 
> View this message in context: http://www.nabble.com/How-to-get-the-contents--tp14329679p14329679.html
> Sent from the Perl - Bioperl-L mailing list archive at Nabble.com.
>
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/bioperl-l




More information about the Bioperl-l mailing list