How To Perform A Batch Query For Custom Ranges With Blastdbcmd
1
1
Entering edit mode
11.6 years ago
rehma.ar ▴ 290

hi,

i want to retrieve some sequences from the nt database and corrently i am using this command.

blastdbcmd -db nt -entry_batch list_of_accesions.txt -range start-stop -out sequeces.fa

where listofaccesions.txt is a text file having one accession in one line. this way i can retrieve the fasta sequece of all the accessions ranging specified by the "start-stop".

but i want to specify a different range for all the accesssions. that means may be for accessions "a" i want to specify the range as (20-25) but for accesion b in the same .txt file the range can be (25-30).

plz let me know if there is any one liner code to do that.

• 5.7k views
ADD COMMENT
1
Entering edit mode

plz improve the spelling in this question

ADD REPLY
3
Entering edit mode
11.6 years ago

As far as I know the usage that you want is not directly supported by blastdbcmd

The -entry_batch flag is a replacement of the -entry flag and allows one to select the entries from a file. But it does not permit applying custom ranges.

What you could do is use another program to generate a shell script that lists the blast query command with your custom ranges, then execute that. Of course this will be orders of magnitude slower but depending on the usage case (how many such records you need) it may still be manageable. A quick test indicates that 1000 separate startups of blast require about 20 seconds.

Otherwise you will need to look for a different solutions see for example extract a group of fasta sequences from a file

ADD COMMENT

Login before adding your answer.

Traffic: 1995 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6