[Bioperl-l] from protein to nucleotide
Jason Stajich
jason at cgt.duhs.duke.edu
Fri Jun 13 11:16:05 EDT 2003
I did post a way to do this a couple of weeks back - perhaps it will get
added to the FAQ at some point.
We definitely need FAQ volunteers, not
fair to put it all on Brian O. If you see a good answer to question
adding it to the FAQ will help everyone out!
-jason
On Fri, 13 Jun 2003, Marc Logghe wrote:
> 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
> >
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at portal.open-bio.org
> http://portal.open-bio.org/mailman/listinfo/bioperl-l
>
--
Jason Stajich
Duke University
jason at cgt.mc.duke.edu
More information about the Bioperl-l
mailing list