Get Query Coverage From Local Blast
2
3
Entering edit mode
12.0 years ago
bioinf80 ▴ 30

Hi all

Does anyone have an idea how I can get the query coverage of my hits from local BLAST (in unix). The -m 8 option gives you a tabular output that does not contain the 'Descriptions' part of the online BLAST. If I blast a gene against a genome with no contigs, I expect to see an overall percentage similarity of the gene against this genome, which is given in the Descriptions section in online BLAST, but cannot get that in local BLAST. One can get a rough idea from -m 8 option but with so many overlaps it can prove to be a bit difficult. Any ideas anyone?

Thanks

blast coverage • 17k views
ADD COMMENT
4
Entering edit mode
12.0 years ago
Rahul Sharma ▴ 660

Hi,

Please use the following awk command on the blast tabular output:

awk '{if ($5/$3 > 0.75 && $5/$4 > 0.75 && $6>55 && $7<0.000000000000001) print $0}'  blast_out.tab
  • $5/$3 > 0.75 = Alignment length should be > than 75% of query length;
  • $5/$4 > 0.75 = Alignment length should be > than 75% of Subject length;
  • $6>55 = Percent identity should be > than 55%;
  • $7<0.000000000000001 = e-value less than e-15.

Use the desired combinations and please check the columns in your tab file.

Hope it would help you.

Wishes,
Rahul

ADD COMMENT
0
Entering edit mode

Hi

I am trying to use above awk command to get query coverage but there is no output or any error message

I would like to get 70 % query coverage. My blast output is below.

664     gi|157146441|ref|YP_001453760.1|        39.23   130     79      0       3       392     5       134     6e-24    104
664     gi|157083646|gb|ABV13324.1|     39.23   130     79      0       3       392     5       134     6e-24    104
664     gi|146311054|ref|YP_001176128.1|        38.46   130     80      0       3       392     5       134     1e-23    103
664     gi|145317930|gb|ABP60077.1|     38.46   130     80      0       3       392     5       134     1e-23    103
664     gi|160865276|gb|ABX21899.1|     37.69   130     81      0       3       392     5       134     2e-22   99.8
664     gi|161503929|ref|YP_001571041.1|        37.69   130     81      0       3       392     5       134     2e-22   99.8
664     gi|117623058|ref|YP_851971.1|   37.69   130     81      0       3       392     5       134     3e-22   99.4
664     gi|145566777|sp|A1A9B7.1|MACB1_ECOK1    37.69   130     81      0       3       392     5       134     3e-22   99.4
664     gi|122064321|sp|Q0TJH0.1|MACB_ECOL5     37.69   130     81      0       3       392     5       134     3e-22   99.4
664     gi|75210431|ref|ZP_00710587.1|  37.69   130     81      0       3       392     5       134     3e-22   99.4

Help is appreciated

Thank you

Raju

ADD REPLY
1
Entering edit mode

Hi Raju,

Please add column headers, I am wondering if you had used the default parameters or specified your own set of columns.

Wishes,

Rahul

ADD REPLY
1
Entering edit mode

Hi R@hul,

I am new to blast tabular format. I have blat output is blast 8 format. I have also provided the headers. Could you guide how to calculate the coverage percentage from the below table. Kindly guide me.

Qry     Tgt    %_Iden.        Align_Length       mismatch        gap_openings    q_start    q_end    s_start    s_end     E-value      bit_score
X_1     Y_4    99.46          1470               8               0               1          1470     1          1470      00           2818
X_3     Y_5    93.75          64                 4               0               1          64       2371       2434      8.10E-24     108
X_4     Y_9    99.94          1574               1               0               3          1576     1          1574      0.00E+00     3033
ADD REPLY
3
Entering edit mode
12.0 years ago
vijay ★ 1.6k

You can use awk command as suggested by Rahul since you can't get a direct query coverage percentage as you would see in the GUI. You can add the awk to the command line itself

blastn -i input.fasta -m 8 -db db_name -o out | awk '{add appropriate conditions}'

cheers
vijay

ADD COMMENT

Login before adding your answer.

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