Question: Is is possible to use blastn to search on remote database from terminal?
0
gravatar for marongiu.luigi
11 months ago by
Germany, Mannheim, UMM
marongiu.luigi380 wrote:

Dear all,

would be possible to use BLAST from the command line to search on the remote NCBI nr database?

The examples I get from the internet requires the creation of a local database with makeblastdb followed by a local search with blastn.

What would be the syntax to search a local sequence to the NCBI nr database, if possible in the first place? (I don't think it would be feasible to create a local version of such huge collection)

Thank you

blast remote access database • 511 views
ADD COMMENTlink modified 11 months ago by Santosh Anand5.0k • written 11 months ago by marongiu.luigi380

blastn is for DNA to DNA comparisons. nr is a protein DB, so either you use nt/nr (=the nucleotide DB) or you switch to blastx if you want to compare DNA to protein.

It is feasible to build these DBs locally (we keep them locally in sync in our lab) but for blasting once in a while a few sequences it might be overkill indeed.

Can you tell what exactly you want to do? what is your input file, DNA, protein?

Syntax-wise the answer of Santosh Anand is correct to start a remote blast indeed

ADD REPLYlink written 11 months ago by lieven.sterck6.1k

I am looking to blast DNA sequences to identify the organism of origin. I have thousands of entries, so I need to automate the process. I reckon the nucleotide database (the whole non-redundant collection) would be quite big to build locally and anyway, how could I get all the NCBI entries in one go?

ADD REPLYlink written 11 months ago by marongiu.luigi380

OK, yes, blastn is your weapon of choice then indeed.

well, the DB is substantial yes, but you can download the complete DB in fasta format (and then build it locally yourself) or download the pre-formatted DB from NCBI. have a look at the ftp site of NCBI , there they offer all this

ADD REPLYlink modified 11 months ago • written 11 months ago by lieven.sterck6.1k
2
gravatar for Santosh Anand
11 months ago by
Santosh Anand5.0k
Santosh Anand5.0k wrote:

You need to use blastn from blast+ suite with a -remote flag. Something like:

blastn -db nr -query sequence.fasta -remote -out result.blast

ADD COMMENTlink modified 11 months ago • written 11 months ago by Santosh Anand5.0k

ok, freakish .. I was gonna comment on the fact you're using blastn againt the nr DB (=protein) , but that does seem to work ?????

seems like blast is magically switching to nt when it notices you use blastn (but it's not doing so for blastp). It's really going downhill with the blast-people at NCBI :/

ADD REPLYlink modified 11 months ago • written 11 months ago by lieven.sterck6.1k

I actually got this output:

mingled KR605506.1  100.000 434 0   0   1053    1486    1   434 0.0 802
NC_022893.1 KF516923.1  100.000 412 0   0   1   412 1   412 0.0 761

where the query was a viroid DNA. The answer NC_022893.1 does refer correctly to Cherry leaf scorch small circular viroid-like RNA. Anyway, I thought that nr stood for non-redundant. I will use nt as required.

ADD REPLYlink modified 11 months ago • written 11 months ago by marongiu.luigi380

yes, the naming is very unfortunate indeed. In the download it's nt for nucleo and nr for protein, in the webblast it's nr for protein and nt/nr for nucleo

ADD REPLYlink written 11 months ago by lieven.sterck6.1k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1700 users visited in the last hour