running blastp on Ubuntu, Argument "query" file is not accessible error
0
0
Entering edit mode
4.4 years ago
garfield320 ▴ 20

I've turned on the Windows Subsystem for Linux feature on my Windows 10 desktop, installed Ubuntu and installed blast locally with this command sudo apt-get install ncbi-blast+.

I'm trying to run a shell script that includes doing a local blastp search. The shell script line that's causing errors is below:

blastp -query protein_query.txt -db /mnt/c/Users/username/Desktop/Bioinformatics/refdata -out protein.blast.txt -evalue 1e-15 -outfmt "6 qseqid sseqid evalue stitle" -max_target_seqs 1000

I ran this shell script on bash by typing /mnt/c/Users/username/Desktop/Bioinformatics/PROTEIN.sh, which gave me the following error:

command line argument error: Argument "query". File is not accessible: 'protein_query.txt'

I'm suspecting this has something to do with the location that blast was installed but I can't figure out where it got installed with the Ubuntu configuration... Can anyone provide any advice/suggestions?

blast ubuntu • 2.8k views
ADD COMMENT
0
Entering edit mode

This is the classic $PATH problem. You are probably running the script from a directory which does not contain the protein_query.txt file. You can either modify the script to provide -query /full_path_to/protein_query.txt or amend your $PATH variable to include the directory that contains the query file export PATH=$PATH:/dir_with_query_file.

ADD REPLY
0
Entering edit mode

I've added export PATH=$PATH:/dir_with_query_file (the latter way you suggested) and it still gave me the same error, so I modified the script like the former way you suggested and it gave me a different error: BLAST Database error: No alias or index file found for protein database [/mnt/c/Users/username/Desktop/Bioinformatics/refdata] in search path [/home/ubuntuid::]. I guess this means there's also an issue with $PATH for the protein database too, right? Is there a way for me to move the location where blast was initially installed to somewhere on my local desktop (like /mnt/c/Users/...) instead of Ubuntu location (like /home/ubuntuid::)?

ADD REPLY
0
Entering edit mode

I don't have a WSL install handy to check what the file paths look like but it sounds like your problem is related to those. Once you figure out the right paths the error should go away. Check the result of echo $PATH and amend as necessary.

ADD REPLY
0
Entering edit mode

Hi,

If you want to see where blastp was installed (assuming that you've a system installation rather than local), you can just type the following command on your shell:

which blastp

Though your problem does not seem related with the installation of blastp, but it seems related with the path of the query file, as mention by @genomax.

Do you know the path to the protein_query_file.txt? If yes, just provide the full path to the query file. If you don't know the full path just get into the folder where is the query file through the command-line with cd <path-to-query-file> (you can put cd and then drag the file until the shell - this will copy the full path to the shell) and then type the command pwd. This will give the full path until that file. Then just copy this full path plus the file name of the query as the 1st argument.

This will should solve your problem.

António

ADD REPLY

Login before adding your answer.

Traffic: 2697 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