I am trying to merge two bam files using Samtools,
After merging the files, it showed that “An error occurred setting the metadata for this dataset” and the info showed as below
“[bam_merge_core] Order of targets in file 1.sam caused coordinate sort to be lost
[E::hts_idx_push] Chromosome blocks not continuous”
Both bam files have been sorted using Samtools sort but the error still occur… Can someone help me with this? Many thanks in advance!!