I redid all the pipeline and now it worked! Thanks for your help, I imagine I was quite tired yesterday night and I did some type of mistake
Good afternoon, I'm trying to merge two bam files, one mapped and another unmapped, with gatk (MergeBamAlignment) but I keep having this error all the time:
Inappropriate call if not paired read
Does anybody know why? I found this post (https://gatkforums.broadinstitute.org/gatk/discussion/12259/mergebamalignment-problem) where the user have the same type of problem, but changing the alignment solves it but unluckily I can't do that.
When I run ValidateSamFile from Picard, I don't have any errors for both bam files.
Any help is appreaciate it! Thanks in advance!
1 answer
My guess is that you have some sam records with the sam flag PROPER_PAIR WITHOUT the flag PAIRED_READ.
Test my hypothesis with :
samtools view -b -f 2 src/test/resources/S1.bam | samtools view -F 1
the output of a valid BAM should be empty
Log in to answer this question.
is there a java error stackrace associated with this error ?
This is the whole message:
And then I get this:
and did you try this: https://gatkforums.broadinstitute.org/gatk/discussion/comment/30326/#Comment_30326
Yes, I sorted the data of both files by queryname using Picard