[Bioperl-l] Need urgent help regarding your perl script

Anuraj jason at bioperl.org
Sun Dec 21 18:15:44 UTC 2008


Hi

thanks for the reply

i already gone throught that very long back.

i used the following syntax format
use Bio::DB::GenBank;    $gb = Bio::DB::GenBank->new();

$seq = $gb->get_Seq_by_acc('--------------'); # use your Accession  
Number
ther
    $seq = $gb->get_Seq_by_version('-----------'); # use your
Accession.version num ther
    $seq = $gb->get_Seq_by_gi('--------------'); # use your particular  
GI
Number ther

# to get a stream via a query string by boolean operators as you are
searching from NCBI
    my $query = Bio::DB::Query::GenBank->new
        (-query   =>'Oryza sativa[Organism] AND EST',
         -reldate => '30',
  -db      => 'nucleotide'); # or gene database you may give
    my $seqio = $gb->get_Stream_by_query($query);

    while( my $seq =  $seqio->next_seq ) {
      print "seq length is ", $seq->length,"\n";
    }

    # or ... best when downloading very large files, prevents
    # keeping all of the file in memory

    # also if you don't want features, just sequence so let's save  
bandwith
    # and get the sequence in Fasta format

    $gb = Bio::DB::GenBank->new(-retrievaltype => 'tempfile' ,
                         -format => 'Fasta');
    my $seqio = $gb->get_Stream_by_acc(['.........',  
'............'] ); #
Accession number you give instead of dash.
    while( my $clone =  $seqio->next_seq ) {
      print "cloneid is ", $clone->display_id, " ",
             $clone->accession_number, "\n";
    }
    # note that get_Stream_by_version is not implemented

    # don't want the entire sequence or more options
    my $gb = Bio::DB::GenBank->new(-format     => 'Fasta',
                                   -seq_start  => 100,
                                    -seq_stop   => 200,
                                   -strand     => 1,
                                   -complexity => 4));
    my $seqi = $gb->get_Stream_by_query($query);
-------------------------------------------------------------

But i have totally confused with many steps here.

plss help me out. js show me an example. i will be really happy if you  
could
show me the full code of a perl script which we can retieve a gnen  
sequence
from genbank.

-
Thanks in Advance
Anuraj


On 12/21/08, Jason Stajich <jason at bioperl.org> wrote:
>
> You need to ask your questions on the mailing list.
>
> You can also find examples of what you want to do on the website -
> http://bioperl.org - I would suggest you look there and post to the  
> list
> if you have specific problems.  This sounds much too much like  
> homework.
>
> -jason
>
> Begin forwarded message:
>
> *From: *Anuraj <iamanuraj at gmail.com>
> *Date: *December 21, 2008 12:29:41 AM EST
> *Subject: **Need urgent help regarding your perl script*
>
>
> Hi,
>
> this is Anuraj a bioinformatics students who is interesting to learn  
> perl.
> I
> have seen your perl script in Genbank documentation. I think you can  
> help
> me
> plss
>
> my accession num is:NM_007297
> sequence should be in FASTA format.
>
> pls provide me the full per programm for retrieval of this sequence  
> from
> Genbank.
>
> pls provide me the program starting to end
>
> #!/usr/bin/perl -w
>
> including above syntax
>
> because i am getting lot of errors plss help me out
>
> --
> Thanks and Regards
> Anuraj
>
>
>
> Jason Stajich
> jason at bioperl.org
>
>
>
>
>
>


-- 
Thanks and Regards Anuraj



More information about the Bioperl-l mailing list