ekg/freebayes — Issue #25: freebayes randomly stops after a certain position
Author: ghariani
Created: 2011-12-20 18:21:18+00:00
State: open

Hi Erik,

I am having a couple of issues with freebayes:
1. It randomly stops after reaching a certain position. Here is the command used to run freebayes:
freebayes -f hg19.fa -b filename.M20.bam --min-coverage 12 -q 10 --no-mnps --no-indels -F 0.25 -d debug -v filename.vcf 2> debug2.txt &

Here are the last few lines from debug2.txt

post-filtering coverage of 1 is less than --min-coverage of 12
position: chr1:249223925 coverage: 0
no alleles left at this site after filtering
position: chr1:249223926 coverage: 0
no alleles left at this site after filtering
no more alignments in input
total sites: 249213920
processed sites: 129
ratio: 5.17628e-07

"no more alignments in input" is definitely not be the case. It has alignments from all chromosomes.

2. I tried giving it a target file and runs into same problem. It stops outputting after reaching chr2.

Here are a couple lines from the debug file
position: chr2:242627225 coverage: 17
insufficient alternate observations
position: chr2:242627226 coverage: 16
insufficient alternate observations
next position 242627227 outside of current target right bound 242627227
chr3 37033979 3703515337033979_37035154
getting first variant
got first variant
next position 37035154 outside of current target right bound 37035154
chr3 37038110 3703819937038110_37038200
getting first variant
got first variant
next position 37038200 outside of current target right bound 37038200
chr3 37042446 3704254337042446_37042544
getting first variant
got first variant
next position 37042544 outside of current target right bound 37042544
chr3 37045892 3704596437045892_37045965
getting first variant
got first variant

3. Using samtools, I extracted chr3 alignments and re-ran freebayes only on those alignments with the targeted file. That worked fine. Do you have any suggestions?

4. I am also running into
terminate called after throwing an instance of 'std::out_of_range'. Do you know of a workaround this?

I will be happy to provide you with an example of the bam file if you need it.

Thanks,
Gunjan