[Bioperl-l] need help urgently
Smithies, Russell
Russell.Smithies at agresearch.co.nz
Mon Sep 7 20:26:04 UTC 2009
This example code from the wiki _definitely_ works:
http://bio.perl.org/wiki/HOWTO:Getting_Genomic_Sequences#Using_Bio::DB::EntrezGene_to_get_genomic_coordinates
=========================================
use strict;
use Bio::DB::EntrezGene;
my $id = shift or die "Id?\n"; # use a Gene id
my $db = new Bio::DB::EntrezGene;
$db->verbose(1); ###
my $seq = $db->get_Seq_by_id($id);
my $ac = $seq->annotation;
for my $ann ($ac->get_Annotations('dblink')) {
if ($ann->database eq "Evidence Viewer") {
# get the sequence identifier, the start, and the stop
my ($contig,$from,$to) = $ann->url =~
/contig=([^&]+).+from=(\d+)&to=(\d+)/;
print "$contig\t$from\t$to\n";
}
}
======================================
So if it doesn't work for you, there are a few things you need to check:
* what version of BioPerl are you using?
* are you behind a firewall?
* are you using a proxy?
* do you need to submit username/password for either of the 2 above
* turn on 'verbose' messages, it may help you debug
If you're still having problems, get back to me and I'll see if I can help.
--Russell
> -----Original Message-----
> From: bioperl-l-bounces at lists.open-bio.org [mailto:bioperl-l-
> bounces at lists.open-bio.org] On Behalf Of Neeti Somaiya
> Sent: Monday, 7 September 2009 10:04 p.m.
> To: Emanuele Osimo; bioperl-l
> Subject: Re: [Bioperl-l] need help urgently
>
> I tried using EntrezGene instead of GenBank, as is given in the link
> that you sent :
>
> http://www.bioperl.org/wiki/HOWTO:Beginners#Retrieving_a_sequence_from_a_datab
> ase
>
> http://doc.bioperl.org/releases/bioperl-current/bioperl-
> live/Bio/DB/EntrezGene.html
>
> use Bio::DB::EntrezGene;
>
> my $db = Bio::DB::EntrezGene->new;
>
> my $seq = $db->get_Seq_by_id(2); # Gene id
>
> # or ...
>
> my $seqio = $db->get_Stream_by_id([2, 4693, 3064]); # Gene ids
> while ( my $seq = $seqio->next_seq ) {
> print "id is ", $seq->display_id, "\n";
> }
>
> This doesnt seem to work.
>
>
> -Neeti
> Even my blood says, B positive
>
>
>
> On Fri, Sep 4, 2009 at 1:09 PM, Emanuele Osimo<e.osimo at gmail.com> wrote:
> > Hello,
> > have you tried this?
> >
> http://bio.perl.org/wiki/HOWTO:Getting_Genomic_Sequences#Using_Bio::DB::GenBan
> k_when_you_have_genomic_coordinates
> >
> > Emanuele
> >
> > On Fri, Sep 4, 2009 at 08:49, Neeti Somaiya <neetisomaiya at gmail.com> wrote:
> >>
> >> Hi,
> >>
> >> I have an input list of gene names (can get gene ids from a local db
> >> if required).
> >> I need to fetch sequences of these genes. Can someone please guide me
> >> as to how this can be done using perl/bioperl?
> >>
> >> Any help will be deeply appreciated.
> >>
> >> Thanks.
> >>
> >> -Neeti
> >> Even my blood says, B positive
> >> _______________________________________________
> >> Bioperl-l mailing list
> >> Bioperl-l at lists.open-bio.org
> >> http://lists.open-bio.org/mailman/listinfo/bioperl-l
> >
> >
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/bioperl-l
=======================================================================
Attention: The information contained in this message and/or attachments
from AgResearch Limited is intended only for the persons or entities
to which it is addressed and may contain confidential and/or privileged
material. Any review, retransmission, dissemination or other use of, or
taking of any action in reliance upon, this information by persons or
entities other than the intended recipients is prohibited by AgResearch
Limited. If you have received this message in error, please notify the
sender immediately.
=======================================================================
More information about the Bioperl-l
mailing list