Makeblast db with more sequences in fasta format
3
1
Entering edit mode
8.0 years ago
marghe08 ▴ 10

Hello! I am a beginner and I need help. I downloaded from NCBI two distinct fasta files, which contain both a nucleotide sequence, and are saved in a folder on my pc; these are the names of the files: NG_006672.1.fasta NG_006682.3.fasta using locally blast would like to create a database, with makeblastdb command, which contains my 2 fasta sequences. How can I do?

blast blastdb • 4.2k views
ADD COMMENT
4
Entering edit mode
8.0 years ago
Ram 44k

Just cat the fasta file and use the concatenated FASTA file as the input to the -in argument. Here's NCBI manual on how to use makeblastdb https://www.ncbi.nlm.nih.gov/books/NBK279688/

Either cat them as a preliminary step or use the syntax -in <(cat file1.fa file2.fa) to use a subshell in the makeblastdb

ADD COMMENT
1
Entering edit mode

-in <(cat file1.fa file2.fa) seems not to work with Blast 2.7.1, it shows this error: BLAST options error: File /dev/fd/11 does not exist . I found out you can actually use a regular pipe like so: cat file1.fa file2.fa | makeblastdb -title myDBtitle -out myDBpath -parse_seqids

ADD REPLY
0
Entering edit mode

That could be a shell restriction. If your shell allows process substitution, <() should work fine.

Also, this is a 3 year old post, so there is quite the chance the blast executable could be a different version.

ADD REPLY
1
Entering edit mode
ADD COMMENT
0
Entering edit mode
5.1 years ago

I found out you can just omit the -in parameter, add a -title parameter and pipe the sequences using: cat file1.fa file2.fa | makeblastdb -title myDBtitle -out myDBpath -parse_seqids

ADD COMMENT

Login before adding your answer.

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