freebayes error for SNP calling
0
0
Entering edit mode
7 months ago
evafinegan • 0

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 • 232 views
ADD COMMENT
0
Entering edit mode

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

ADD REPLY
0
Entering edit mode

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)
ADD REPLY

Login before adding your answer.

Traffic: 1308 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6