Tell me if you get an "argument too long" error, then the command needs a slight modification.
Blast Formatdb, Multiple Folders/Directories
I have downloaded viral genomes from the NCBI website I want to use formatdb so I can create a BLAST database of these viral genomes. However, they are present as nearly 300 folders, each containing the fasta files for each of the genomes/genome segments (named by NC_ ids). In the documentation for formatdb, it says to format multiple files I must quote the input files to be formatted. I do not have a list of these files as they are within the folders. Is there any way to formatdb using multiple folders/directories rather than the individual fasta files?
Any help much appreciated :-) Thanks
• 5,602 views
•
link
3 answers
If you're using Linux:
cat `find /path/to/sequence/root -name "*.fasta"` > all_sequences.fasta
formatdb .... -i all_sequences.fasta (or makeblastdb)
If you're using Windows it's probably time to switch ;-)
• 0 views
•
link
• 0 views
•
link
or:
formatdb -i "`find ./ -iname '*.fasta' | perl -p -e "s/\n/ /"`" -n all.db
• 0 views
•
link
Log in to answer this question.