[Bioperl-l] Fwd: sub_SeqFeature

Hilmar Lapp hlapp at gmx.net
Fri Mar 9 20:09:58 UTC 2007



Begin forwarded message:

> From: "xikun wu \(IAH-C\)" <xikun.wu at bbsrc.ac.uk>
> Date: March 9, 2007 12:41:38 PM EST
> To: <hlapp at gmx.net>
> Subject: sub_SeqFeature
>
> Hi Hilmar,
>
> Sorry for the unexpected contact!
>
> I am using bioperl-1.4 but got problem in using "sub_SeqFeature",
> nothing was returned from it. Any hints from you will be really
> appreciated!
>
> Here are the codes:
>
> ################################
>
> use lib "/usr/local/share/bioperl-1.4";
> use Bio::Seq;
> use Bio::SeqIO;
>
> die "usage: perl test.pl <embl>\n" unless @ARGV==1;
> my ($embl)=@ARGV;
> my $in=Bio::SeqIO->new('-file'=>$embl, '-format' => 'EMBL');
> while(my $seq=$in->next_seq())
> {
>     my @feats=$seq->get_all_SeqFeatures();
>     foreach my $feat (@feats)
>     {
>         if($feat->primary_tag eq "CDS")
>         {
> 	    my ($gene_id)=$feat->each_tag_value('gene');
> 	    my @subfeat=$feat->sub_SeqFeature();
> 	    my $exon_number=scalar(@subfeat);
> 	    print"$gene_id\t$exon_number\t at subfeat\n";
> 	}
>     }
> }
>
> __END__
>
> ##################################
>
>
> The output is:
>
> gene.46709      0
> gene.46836      0
> gene.46137      0
> gene.46285      0
> ......
>
>
> Thank you very much!
>
> Best wishse,
> Xikun
>
> ****************************
> Xikun Wu
> PhD in Bioinformatics
> Institute for Animal Health
> Compton
> Nr Newbury
> Berkshire, RG20 7NN
> U.K.
> Tel:   01635 577275
> Fax:   01635 577263
>
> The information contained in this message may be confidential or  
> legally
> privileged and is intended solely for the addressee. If you have
> received this message in error please delete it & notify the  
> originator
> immediately.
> Unauthorised use, disclosure, copying or alteration of this message is
> forbidden & may be unlawful.
> The contents of this e-mail are the views of the sender and do not
> necessarily represent the views of the Institute.
> This email and associated attachments has been checked locally for
> viruses but we can accept no responsibility once it has left our
> systems.
> Communications on Institute computers are monitored to secure the
> effective operation of the systems and for other lawful purposes.

-- 
===========================================================
: Hilmar Lapp  -:-  Durham, NC  -:-  hlapp at gmx dot net :
===========================================================








More information about the Bioperl-l mailing list