Question: varscan v2.3.9 filter Parse exception
gravatar for cafelumiere12
2.9 years ago by
United States
cafelumiere1270 wrote:

I'm trying to go through the Varscan2 protocol 1 (; however I am getting "Too many parsing exceptions encountered; exiting" at the step of filtering SNP calls to remove those near indel positions (VarScan.jar filter). Does anyone have any idea what I should be looking into? Any idea is appreciated!

I use samtools-1.2 to get the mpileup file:

samtools mpileup -B -q 1 -f $referenceFasta $sample.bam > $sample.mpileup

Then run varscan:

java -jar VarScan.v2.3.9.jar mpileup2snp $sample.mpileup \
    --mincoverage 8 \
    --min-var-freq 0.20 \
    --p-value 0.1 \

java -jar VarScan.v2.3.9.jar mpileup2indel $sample.mpileup \
    --mincoverage 8 \
    --min-var-freq 0.10 \
    --p-value 0.1 \

The problem occurs here:

printf "\nRun varscan filter\n"
java -jar VarScan.v2.3.9.jar \
filter $sample.varScan.snp \
--indel-file $sample.varScan.indel \
--output-file $sample.varScan.snp.filter

I got the following:

Run varscan filter
Min coverage:   10
Min reads2: 2
Min strands2:   1
Min var freq:   0.2
Min avg qual:   15
P-value thresh: 0.1
Reading input from sample1.varScan.snp
Parsing Exception on line:
chrM    297 A   G   G:17:0:17:100%:4.2852E-10   Pass:0:0:15:2:1E0   0   0   1   0   G:17:0:17:100%:4.2852E-10
For input string: "G:17:0:17:100%:4.2852E-10"
Parsing Exception on line:
chrM    1007    T   C   C:452:85:365:81.11%:1.1083E-169 Pass:29:56:112:253:1E0  0   0   1   0   C:452:85:365:81.11%:1.1083E-169
For input string: "C:452:85:365:81.11%:1.1083E-169"
Parsing Exception on line:
chrM    1813    A   G   G:429:3:423:99.3%:1.5923E-248   Pass:2:1:247:176:1E0    0   0   1   0   G:429:3:423:99.3%:1.5923E-248
For input string: "G:429:3:423:99.3%:1.5923E-248"
Parsing Exception on line:
chrM    2354    C   T   T:1098:2:1080:99.82%:0E0    Pass:1:1:567:513:1E0    0   0   1   0   T:1098:2:1080:99.82%:0E0
For input string: "T:1098:2:1080:99.82%:0E0"
Parsing Exception on line:
chrM    2485    C   T   T:1558:2:1540:99.87%:0E0    Pass:2:0:1058:482:1E0   0   0   1   0   T:1558:2:1540:99.87%:0E0
For input string: "T:1558:2:1540:99.87%:0E0"
Too many parsing exceptions encountered; exiting

In the end after running the supported protocol 1 (bam-readcount and fpfilter), I got 0 variants that passed the filter:

printf "\nRun bam-readcount\n"
bam-readcount/bin/bam-readcount \
-q 1 -b 20 \
-f $referenceFasta \
-l $sample.varScan.snp $sample.bam \
> $sample.varScan.snp.readcounts

printf "\nRun\n"
perl varscan_v2.3.9/ \
$sample.varScan.snp $sample.varScan.snp.readcounts \
-output-basename $sample.varScan.snp.filter
varscan • 1.5k views
ADD COMMENTlink modified 24 months ago by jlx02480 • written 2.9 years ago by cafelumiere1270
gravatar for jlx0248
24 months ago by
jlx02480 wrote:

java -jar VarScan.v2.3.9.jar mpileup2snp --output-vcf 1

ADD COMMENTlink written 24 months ago by jlx02480
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1961 users visited in the last hour