[Bioperl-l] from protein to nucleotide

Marc Logghe Marc.Logghe at devgen.com
Fri Jun 13 17:10:26 EDT 2003


Hi Jack,
You could do something like this:

  foreach my $feat ( $seq->top_SeqFeatures() )
  {
    if ( $feat->primary_tag eq 'CDS' )
    {
      my ($id) = $feat->each_tag_value('coded_by'); # looks like
'coded_by="U05729.1:<1..122"'
      # extract U05729.1 from it and get the sequence object from ncbi
    }
  }

Of course you have to be sure that the CDS feature exists, including the
coded_by tag.
HTH,
Marc

> -----Original Message-----
> From: Jack Chen [mailto:chenn at cshl.edu]
> Sent: Friday, June 13, 2003 3:53 PM
> To: bioperl-l at portal.open-bio.org
> Subject: [Bioperl-l] from protein to nucleotide
> 
> 
> Hi,
> 
> Here is another question about GenBank sequence object. I am wondering
> whether there is a convenient way to retrieve the nucleotide 
> sequence of a
> protein with known gi number. For example, for protein
> gi|497063|gb|AAB60473.1|, how should I get its corresponding 
> nucleotide?
> Manually, I can get it by visiting the NCBI page and follow 
> the links. But
> is there a way to do this automatically?
> 
> Also, does anyone know how to parse the GenPept sequence 
> object to get the
> 'DBSOURCE' field? For example, how can I get the accession number
> 'U05729.1' from the following record? Thanks!
> 
> 
> LOCUS       AAB60473                  39 aa            linear   ROD
> 04-FEB-1995
> DEFINITION  preproinsulin I.
> ACCESSION   AAB60473
> VERSION     AAB60473.1  GI:497063
> DBSOURCE    locus MSU05729 accession U05729.1
> KEYWORDS    .
> SOURCE      Mus spretus (western wild mouse)
>   ORGANISM  Mus spretus
>             Eukaryota; Metazoa; Chordata; Craniata; Vertebrata;
> Euteleostomi;
>             Mammalia; Eutheria; Rodentia; Sciurognathi; 
> Muridae; Murinae;
> Mus. 
> 
> Thanks,
> 
> +-----O----------------------------------------+
> |    o-o     Jack Chen, Stein Laboratory       |
> |    o---o   Cold Spring Harbor Laboratory     |
> |  o----o    1 Bungtown Road                   |
> | O----O     Cold Spring Harbor, NY, 11724     |
> | 0--o       Tel: 1 516 367 8394               |
> |   O        Website: http://www.wormbase.org  |
> |  o-o       e-mail: chenn at cshl.org            |
> +-o---o----------------------------------------+ 
> 
> 
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at portal.open-bio.org
> http://portal.open-bio.org/mailman/listinfo/bioperl-l
> 


More information about the Bioperl-l mailing list