We encountered a wrong calculation for the base quality by calling pileup2snp in presence of deletions.
As an example, for this pileup line:
Contig01 1336 T 6 ***.A, -H>*?f
Base * * * . A ,
Base quality - H > * ? f
Phred score 12 39 29 9 30 69
Using pileup2snp option with those parameters:
--min-coverage 2 --min-reads2 1 --min-avg-qual 10 --min-var-freq 0.0 --p-value 2.0
We obtain:
VarScan.v2.2.5
Contig01 1336 T W 2 1 33.33% 2 1 20 39 0.49999999999999994 1 1 1 1 1 0 A
VarScan.v2.2
Contig01 1336 T A 2 1 33.33% 2 1 20 39 0.49999999999999994 1 1 1 1 1 0
While we should obtain:
Contig01 1336 T A 1 1 50% 1 1 69 30 0.49999999999999994 1 1 0 1 1 0
The problem can be solved by adding the following code (after line 755) to the VarScan.java file (VarScan v2.2 source code):
else if(readBase.equals("*"))
{
// Skip base quality for a deletion //
j++;
}
Greetings,
Louise Deschenes
View and moderate all "bugs Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Bugs"
Demo pileup used as an example