Biostar Beta. Not for public use.
Problem with web Blast SRA database
0
Entering edit mode
3.8 years ago
QVH • 10
Upenn

Hello,

I want to blast some sequences on dozens of huge SRA datasets. And, in order to develop a pipeline, I tried to send different requests from my computer on python. Everything is working fine with the standard parameters (database = nr, for example), but I don't manage to make it work when I want to use a SRA dataset as a Database (DRX029854, for example, with the BLAST_SPEC:SRA parameter).

fasta_file = 'BlastList.fasta'.strip()

database_num = str('DRX029854')

url = ('http://blast.ncbi.nlm.nih.gov/Blast.cgi')

args = {'CMD':'Put','DATABASE':database_num,'PROGRAM':'tblastn','BLAST_SPEC':'SRA',
            'FORMAT_TYPE':'XML','MAX_NUM_SEQ':'20000'
                        ,'WORD_SIZE':'6','FILTER':'F'}

req = requests.post(url,params=args,files={'QUERY': open(fasta_file, 'rb')})

Does someone know which API or any kind of specific parameter I have to use to make it work with SRA databases?

Thanks

ADD COMMENTlink
0
Entering edit mode
ADD REPLYlink
0
Entering edit mode

It's the same kind of code I'm using, and unfortunately, it's not working. I get this error :

Informational Message: No alias or index file found for nucleotide database [DRX029854] in search path [/export/home/splitd/blastdb/blast0:/blast/db/disk.blast/blast1105::]

I think the problem could be due to the way the database is called.

ADD REPLYlink
0
Entering edit mode

Appears that the script is looking at the local file paths rather than web for the database.

Are you able to get this to work for some other acc #? Perhaps your local firewall settings are preventing you from going out to NCBI.

Also be aware that at the time I write this NCBI is testing https only access to their site. So you may want to replace that http with https (https://blast.ncbi.nlm.nih.gov/Blast.cgi). just in case.

ADD REPLYlink
0
Entering edit mode

It's perfectly working when I try to blast something on a standard database (e.g. 'nr'), for exemple:

fasta_file = 'test-tblastn.fa'.strip()
database_num = str('DRX029854')
url = ('https://blast.ncbi.nlm.nih.gov/Blast.cgi')
args = {'CMD':'Put','DATABASE':'nr','PROGRAM':'tblastn',
            'FORMAT_TYPE':'XML',
                        'WORD_SIZE':'6','FILTER':'F'}

req = requests.post(url,params=args,files={'QUERY': open(fasta_file, 'rb')})

So, I really think the problem is due to the way I call the SRA database.

ADD REPLYlink
0
Entering edit mode

Do you know for sure that NCBI allows remote access to SRA database for blast?

ADD REPLYlink
0
Entering edit mode

I contacted NCBI in order to know whether this function has been removed.

ADD REPLYlink
0
Entering edit mode

Looks like it's not "officially supported" by NCBI, they recommend cloud implementation with Amazon.

ADD REPLYlink

Login before adding your answer.

Similar Posts
Loading Similar Posts
Powered by the version 2.3.1