amr icon indicating copy to clipboard operation
amr copied to clipboard

makeblastdb on custom databases?

Open tseemann opened this issue 3 years ago • 2 comments

The -u (update) option does two things:

  1. DOWNLOAD
  2. FORMAT (makeblastdb)

Could you please add an option to (re)-format the BLAST databases (CDS and Prot) as provided by the --db option?

It seems manualyl running the commands is the only way to do it otherwise?

Perhaps also doing a check of the dates at runtime and warning if AMRProt has a modified date newer than AMRProt.p?? etc?

tseemann avatar Nov 04 '20 00:11 tseemann

Hi Torsten,

You make a good point. Now that there are several different makeblastdb commands (nucleotide and protein) it would be nice to enable just running that portion of the update.

Arjun

evolarjun avatar Nov 04 '20 14:11 evolarjun

So it occurred to me that I have the same problem. I make modifications to the database, and I use a Makefile. I know it's not as good as a built-in function, but if you're hacking at something it could be useful. Here are the relevant parts in case it'll be helpful to you.

blastp = AMRProt.phr  AMRProt.pin  AMRProt.psq
blastn = AMR_DNA-Campylobacter.nin AMR_DNA-Salmonella.nin AMR_DNA-Escherichia.nin AMR_DNA-Staphylococcus_aureus.nin
blastdb = *.nin *.nhr *.nsq *.ndb *.not *.nto *.ntf *.pin *.phr *.psq *.pot *.pto *.ptf
HMMdb = AMR.LIB.h3f AMR.LIB.h3i AMR.LIB.h3m AMR.LIB.h3p

all:    $(HMMdb) $(blastp) $(blastn)

$(HMMdb): AMR.LIB
	hmmpress -f AMR.LIB

$(blastp): AMRProt
	makeblastdb -in AMRProt -dbtype prot -out AMRProt

%.nin: $(basename %.nin)
	makeblastdb -in $< -dbtype nucl

clean:
	-rm $(blastdb) $(HMMdb)

evolarjun avatar Nov 05 '20 14:11 evolarjun