This is a test version of Biostars. For the public version, visit https://www.biostars.org.
freebayes error for SNP calling

Hello,

I am using freebayes for SNP calling using multiple input bam files:

fasta_generate_regions.py genome.fasta.fai 100000 > genome.txt

export TMPDIR=.
freebayes-parallel genome.txt 8 \
          -f /genome.fasta \
          -L bam.txt > freebayes.vcf

But it gives error:

[E::bgzf_read] Read block operation failed with error -1 after 75 of 178 bytes
terminate called after throwing an instance of 'std::runtime_error'
  what():  sam_read1 return status: -4 file: sample35.bam

It generates a vcf but log file shows this error. Thank you!

snp

looks like you BAM are corrupted, check if that is true with samtools flagstat sample35.bam

Thank you, here is what I got for one of bam files which were pointed out in the error:

samtools flagstat sample35.bam
32008143 + 0 in total (QC-passed reads + QC-failed reads)
0 + 0 secondary
567823 + 0 supplementary
8427353 + 0 duplicates
29096062 + 0 mapped (90.90% : N/A)
31440320 + 0 paired in sequencing
15720160 + 0 read1
15720160 + 0 read2
27351258 + 0 properly paired (86.99% : N/A)
27958820 + 0 with itself and mate mapped
569419 + 0 singletons (1.81% : N/A)
457504 + 0 with mate mapped to a different chr
380737 + 0 with mate mapped to a different chr (mapQ>=5)

0 answers

No answers yet.

Log in to answer this question.