I've been attempting to use:
samtools merge -r -b list_of_bams.txt output_bam.bam
I have two samples, with each sample having Illumina Hiseq paired end .bam and PacBio paired end reads .bam and their respective readgroups @RG. The Illumina reads were aligned with bwa mem and the PB reads with minimap2. My attempts at concatenating these two samples and their respective reads seemed successful -- I got a rather large .bam file but the program is not recognizing it. And when I load it into IGV it appears empty... This leads me to believe that there is something I am doing wrong with the samtools merge or just the idea of merging Illumina and PacBio reads into the same tracked bam.
I am pretty sure the .bam format supports this type of merge, but was having difficulty finding specific documentation online. Does anyone have any thoughts on this matter?