This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Blast hits output to fasta format ?

Hi

I blasted some DNA sequences against the nucleotideDB generated hits file.

From the hitsfile how I'd I extract the blasted nucleotide fasta sequences from the alignment out file ?

 time /home/sunn/data/softwares/ncbi/ncbi-blast-2.11.0+/bin/blastn -query /home/sunn/data/softwares/evaluation/SRR363205.fasta -db /home/sunn/data/softwares/ncbi/ncbi-blast-2.11.0+/bin/nucleotideDBB/nucleotideDBB -out nucl_blastn_1align_1e-30_1_trans.txt -num_alignments 1 -evalue 1e-30 -num_threads 6 > blastn_2_trans.log
alignment assembly blast

If you're only interested in the aligned parts of the query sequences you could have used a custom -outfmt and include qseq there..

1 answer

From your output file you need to parse the hit IDs (==sequence ID or name) and use that to extract those sequences from the blastDB.

to extract sequences from a blastDB you use the command blastdbcmd with the entry or entry_batch option. For more details run blastdbcmd -help in your terminal

Log in to answer this question.