alekseyzimin / masurca

GNU General Public License v3.0
242 stars 35 forks source link

Segmentation fault during Variant call step in POLCA #211

Open sihellem opened 3 years ago

sihellem commented 3 years ago

Hi,

I am trying to polish a SPAdes assembly using short Illumina reads with POLCA. I compiled MaSuRCA v3.4.2 as recommended.

Everything goes well until the 'Calling variants' step, at which every batch sequence gets the following error:

./commands.sh: line 4: 14203 Segmentation fault      (core dumped) /PATH_TO_MASURCA/MaSuRCA-3.4.2/bin/freebayes -r `head -n +$1 ../scaffolds.fasta.batches |tail -n 1` -m 0 --min-coverage 3 -R 0 -p 1 -F 0.2 -E 0 -b ../scaffolds.fasta.alignSorted.bam -v $1.vcf -f /PATH_TO_RUNNING_DIR/scaffolds.fasta

Resulting in empty .vcf files.

Here is the content of the commands.sh file within the produced scaffolds.fasta.vc folder:

#!/bin/bash
if [ ! -e $1.vc.success ];then
  /PATH_TO_MASURCA/MaSuRCA-3.4.2/bin/freebayes -r `head -n +$1 ../scaffolds.fasta.batches |tail -n 1` -m 0 --min-coverage 3 -R 0 -p 1 -F 0.2 -E 0 -b ../scaffolds.fasta.alignSorted.bam -v $1.vcf -f /PATH_TO_RUNNING_DIR/scaffolds.fasta && touch $1.vc.success
fi

Any idea what is going wrong there?

pdimens commented 3 years ago

I'm experiencing this too. I tried running a modified instance of freebayes using the --debug flag and this is the result:

Number of target regions: 1
no sample list file given, reading sample names from bam file
found 0 samples in BAM file
environment: line 1: 3326468 Segmentation fault      (core dumped) freebayes -r ${POSITION} -m 0 --min-coverage 3 -R 0 -p 1 -F 0.2 -E 0 -b ../_gapcloser.1.1.fa.alignSorted.bam -v ${1}.vcf -f ../_gapcloser.1.1.fa --debug

My guess is that the bam file from BWA doesn't seem to contain sample designations? I'm going to dive further into the bwa command that generated the alignment file.