[Bioperl-l] how to find the gene's name ?

Heikki Lehvaslaiho heikki at nildram.co.uk
Tue Mar 30 17:47:36 EST 2004


Laure,

You really should not be using Bio::LiveSeq unless you want to mutate the 
sequence. It much too heavy handed for simply looking into the entry.

I suppose you have a GenBank or EMBL format file. If that is the case, you can 
access the gene name like this (if it is present in the file, which is not 
too often):

-----------------------------------------------------------------------------
use Bio::SeqIO;
use strict;

my $in  = Bio::SeqIO->new(-file => shift);
my $seq = $in->next_seq;

foreach ( $seq->all_SeqFeatures()) {
    print $_->get_tag_values('gene'), "\n" if $_->has_tag('gene');
}
-----------------------------------------------------------------------------

Yours,
	-Heikki

On Tuesday 30 Mar 2004 16:28, laure.quintric at etudiant.univ-rennes1.fr wrote:
> Hello,
>
> I don't know how to find the gene's name using bioperl.
> To find it, I have to use Bio::LiveSeq::Gene;
> But when I try to affich the gene's name by writing
> 	print FILE 'genus = '.$seq->LiveSeq::Gene->name()."\n";
>
> it doesn't work.
> So, how must I do to use a package which is in an under file of bioperl ?
> Thanks
>
> Laure Quintric
>
>
>
> _______________________________________________
> 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