For Loop for .fa files in folder
0
0
Entering edit mode
4 months ago

Hi all,

I am trying to run a for loop through my local directory that contains .fa files to search against the nr database via BLAST X. I am getting a file inaccessible error. Please help as I am new to command line and not sure of the formatting. Thank you.

  %%cmd
for F in dir\*fa
blastx -query %F -db C:\Users\justin.kerr\Desktop\nr -num_threads 14 -outfmt "6 qseqid sseqid stitle pident qcovs length mismatch gapopen qstart qend sstart send qframe sframe frames evalue bitscore qseq sseq staxids" -task blastx -out C:\Users\justin.kerr\Desktop\results\%{F%.*}.txt;

for windows BLAST loop local • 219 views
0
Entering edit mode

I've added a windows tag to your post. This question has been addressed a bunch of times, but almost all of them are linux based solutions. It should be straightforward translating them to windows constructs, but maybe this post can be a reference for people with the same question working on windows command prompt.

0
Entering edit mode

If you running these commands on windows then why don't you use some programming language like Python/Perl?

Also, you can use Linux Alongside the Windows subsystem to run Linux in Windows without any need for dual boot.

0
Entering edit mode

can you paste the error?