I have sequenced (WES, single end protocol) and aligned (BWA aln) the same DNA sample twice obtaining 2 BAM files. I decided to merge these 2 BAMs into a single one. I used MergeSamFiles (BAM as inputs) from Picard. Thus, when I inspected the merged bam file using samtools view -H merged.BAM it returns the message:
[bam_header_read] EOF marker is absent. The input is probably truncated.
Becasue no messages appear when I inspect the two source BAMs to be merged, I suppose that problem is some how related to MergeSamFiles step.
Is it necessary to set specific parameters in MergeSamFiles to specify that BAM files contain single end reads?
I checked similar problems but I didn't find solution that match my case. Could you provide me some suggestions to solve the problem? thank you.