This is a test version of Biostars. For the public version, visit https://www.biostars.org.
how to include taxonomy information in blstx xml output ?

Dear Friends, Hi ( I'm not native in English so, be ready for some possible language flaws).

I want to use BLASTGrabber (software), but it needs taxonomy information in blast output results and it is only accepting xml output format (outfmt 5).

How can I include or add taxonomy information in my blast script ?

this is my usual script (using NCBI-blast-2.4.0+ ):

blastx -query Trinity.fasta -db nr -out blastx-Trinity.xml -evalue 1e-6 -num_threads 24 -max_target_seqs 1 -outfmt 5

blast blastgrabber taxonomy in blast xml

Correction: You can't include additional information (like taxonomy) with -outfmt 5. You may need to use one of the other options.

Options 6, 7 and 10 can be additionally configured to produce a custom format specified by space delimited format specifiers.

@Farbod: Check the correction above. Will delete this once you do.

Hi I can not delete it,

Dear genomax2, Hi.

It was the reason that I have asked this question : the blastGrabber need XML output and Taxonomy information at the same time !

What must I do ?

Blast grabber supports XML and text output files (according to the manual you linked above) so you should be able to use 6,7 or 10 (with -outfmt "6 staxids sscinames" etc).

Hi,

I have tried it again. It did not accept blastx.outfmt and blastx.txt files but it accepted blastx.xml !

I will send an email to creator of the software in this regard.

Thank you genomax2

1 answer

Page 8 of the manual you have linked above clearly describes how taxonomy mapping works. Since you are running remote blast against the NCBI "nr" database, you can use the first method described on page 8, which means mapping gi to taxid. You have to download a mapping file from NCBI FTP server. This file is presumably very huge.

Dear Piet, Hi and Thank you. I will try that.

Log in to answer this question.