This is a test version of Biostars. For the public version, visit https://www.biostars.org.
How to know the query coverage

How to know the query coverage in the local blast output?

blast

It looks like a good alternative. Thank you very much, Pierre

2 answers

I quickly wrote a XSLT styleheet converting a blast+xml output to coverage data for each position of the query. The stylesheet is available at: https://github.com/lindenb/xslt-sandbox/blob/master/stylesheets/bio/ncbi/blast2coverage.xsl

Example:

$ xsltproc stylesheets/bio/ncbi/blast2coverage.xsl blastn.xml

#ID    DEF    POS    LENGTH    CONSENSUS    DEPTH
gi|9626372|ref|NC_001422.1|    Enterobacteria phage phiX174 sensu lato, complete genome    1    5386    GGGGGGGGGGGGGGGGGG    18
gi|9626372|ref|NC_001422.1|    Enterobacteria phage phiX174 sensu lato, complete genome    2    5386    AAAAAAAAAAAAAAAAAA    18
gi|9626372|ref|NC_001422.1|    Enterobacteria phage phiX174 sensu lato, complete genome    3    5386    GGGGGGGGGGGGGGGGGG    18
gi|9626372|ref|NC_001422.1|    Enterobacteria phage phiX174 sensu lato, complete genome    4    5386    TTTTTTTTTTTTTTTTTT    18
gi|9626372|ref|NC_001422.1|    Enterobacteria phage phiX174 sensu lato, complete genome    5    5386    TTTTTTTTTTTTTTTTTT    18
gi|9626372|ref|NC_001422.1|    Enterobacteria phage phiX174 sensu lato, complete genome    6    5386    TTTTTTTTTTTTTTTTTT    18
gi|9626372|ref|NC_001422.1|    Enterobacteria phage phiX174 sensu lato, complete genome    7    5386    TTTTTTTTTTTTTTTTTT    18
gi|9626372|ref|NC_001422.1|    Enterobacteria phage phiX174 sensu lato, complete genome    8    5386    AAAAAAAAAAAAAAAAAA    18
gi|9626372|ref|NC_001422.1|    Enterobacteria phage phiX174 sensu lato, complete genome    9    5386    TTTTTTTTTTTTTTTTTT    18

Hello Pierre, do you know a easy and fast way to acess query coverage from tBLASTn? thanks!

If you set the 'outfmt' option to 6, 7 or 10, you can get the query coverage using

qcovs means Query Coverage Per Subject
qcovhsp means Query Coverage Per HSP

Log in to answer this question.