What command generate blast database from file in all.fna folder?
2
0
Entering edit mode
10.0 years ago
Ongkrab ▴ 30

I downloaded genome of Bacteria, which file name is all.fna.tar.gz from ftp://ftp.ncbi.nlm.nih.gov/genomes/Bacteria/.

Next I extract file I got folder all.fna. I want to generate all bacteria file(.fna) in folder all.fna with makeblastdb.

What command for generate blast database all(.fna) file in folder all.fna. OR I have to generate each file in folder.

Thank you very much

database blast genome • 12k views
ADD COMMENT
0
Entering edit mode

Use the search/read the manual

ADD REPLY
0
Entering edit mode

Can you please clarify the question? You have many different FASTA files and want to have one single BlastDB with all sequences included? Is that correct?

ADD REPLY
0
Entering edit mode

Yes, I want to have on single BlastDB.

ADD REPLY
3
Entering edit mode
10.0 years ago
Ongkrab ▴ 30

Now I solve this problem by

  1. extract file all.fna.tar.gz
  2. concatenation all file xx.fna in each folder to single file fasta
  3. make blast database with

tar xvfz all.fna.tar.gz

#make_db.sh

#!/bin/bash

files=$(find . -name "*.fna")
create="cat $files > all.fna"
eval $create

makeblastdb -in all.fna -out Bacteria -dbtype nucl -title "Bacteria" -parse_seqids -max_file_sz='20GB'
ADD COMMENT
0
Entering edit mode

That's a nice solution. Thanks for coming back and sharing it.

ADD REPLY
0
Entering edit mode

I also got multiple bacterial genome seq. files and want to make a single database by using them all, but sure why this code is used here:

eval $create

many thanks

ADD REPLY
2
Entering edit mode
10.0 years ago

It is still not clear whether you have one file or many, I assume one, then you will need to run the standard blast procedure. First create a blast database for your genome then use this blast database in your queries. Someting like this below, visit the blast pages for more details

makeblastdb -in all.fna.fa -dbtype 'nucl' -out all.fna.fa
ADD COMMENT
0
Entering edit mode

This is example structure file after extract all.fna.tar.gz

./Acaryochloris_marina_MBIC11017_uid58167:
NC_009925.fna  NC_009927.fna  NC_009929.fna  NC_009931.fna  NC_009933.fna
NC_009926.fna  NC_009928.fna  NC_009930.fna  NC_009932.fna  NC_009934.fna

./Acetobacterium_woodii_DSM_1030_uid88073:
NC_016894.fna

./Acetobacter_pasteurianus_386B_uid214433:
NC_021976.fna  NC_021977.fna  NC_021978.fna  NC_021979.fna  NC_021991.fna  NC_021992.fna  NC_021993.fna

I want to generate all NC_xxx.fna file to a blast database.

ADD REPLY

Login before adding your answer.

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