[Bioperl-l] Beginners HOWTO query a range of lengths 0:3000[SLEN]

Brian Osborne bosborne11 at verizon.net
Thu Jan 10 14:16:16 UTC 2008


Alexander,

OK, that is odd (meaning, this did work a while back but it's not  
clear to me what could have changed).

First thing to do, upgrade to Bioperl version 1.52. Can you do this?  
Version 1.4 is very old and you could run into other problems using it.


Brian O.



On Jan 10, 2008, at 8:54 AM, Alexander Ptok wrote:

> Hallo Brian,
>
> thanks for your answer. The principle is clear, but it doesn't work
> like it should, on my computer. So maybe i should repeat what i did
> step by step.
>
> 1. i took the following script:
>
> use Bio::DB::GenBank;
> use Bio::DB::Query::GenBank;
>
> $query = "Arabidopsis[ORGN] AND topoisomerase[TITL] and 0:3000[SLEN]";
> $query_obj = Bio::DB::Query::GenBank->new(-db    => 'nucleotide',  - 
> query => $query );
>
> $gb_obj = Bio::DB::GenBank->new;
>
> $stream_obj = $gb_obj->get_Stream_by_query($query_obj);
>
> while ($seq_obj = $stream_obj->next_seq) {
>    # do something with the sequence object
>    print $seq_obj->display_id, "\t", $seq_obj->length, "\n";
> }
>
> and then on the terminal
>
> sv1494 at r04102:~/Desktop/bioperl$ perl script1.pl
> sv1494 at r04102:~/Desktop/bioperl$
>
> 2. i took out the 0:3000[SLEN]:
>
> $query = "Arabidopsis[ORGN] AND topoisomerase[TITL]";
>
> and then on the terminal
>
> sv1494 at r04102:~/Desktop/bioperl$ perl script2.pl
> NM_128760       2775
> NM_125788       2874
> NM_124913       3068
> NM_124912       3117
> NM_124775       871
> NM_120360       1655
> NM_111862       2199
> NM_001036386    2734
> NM_119270       3996
> NM_105072       1656
> NM_113294       4824
> NM_180431       1673
> NM_120495       2515
> NM_120493       2050
> NM_112156       1089
> .
> .
> and a lot more of hits, and one can clearly see, there are some with  
> a lenght between 0 and 3000
>
> 3. to have a look at the [SLEN] i tried another script with e.g.  
> 2199[SLEN]
>
> $query = "Arabidopsis[ORGN] AND topoisomerase[TITL] and 2199[SLEN]";
>
> on the terminal:
>
> sv1494 at r04102:~/Desktop/bioperl$ perl script3.pl
> NM_111862       2199
> sv1494 at r04102:~/Desktop/bioperl$
>
>
>
> It think everthing works fine, except that bioperl or maybe the  
> genbank doesn't understand
> the range clause 0:3000, but in every documentation says i have to  
> do it that way. Did
> i misunterstand something or is it just a problem of my computer/ 
> bioperl installation?
> Maybe you can tell me if the script does what it is suppose to do on  
> your computer?
>
> Thanks and greetings
>
> Alexander Ptok
>>
>> Alexander,
>>
>> I don't understand. By using the clause "0:3000[SLEN] " you are
>> querying for sequences in the length range of 0 to 3000.
>>
>
>
> _______________________________________________________________________
> Jetzt neu! Schützen Sie Ihren PC mit McAfee und WEB.DE. 30 Tage
> kostenlos testen. http://www.pc-sicherheit.web.de/startseite/? 
> mc=022220
>





More information about the Bioperl-l mailing list