Merging BAM files from different fq2bam runs

Hi,
I have a single sample that was sequenced from two or three different libraries on the same platform. I want to run the fq2bam on paired-end reads separately by having different --read-group-lb tag and then merging BAM files before I proceed with BQSR (see below).

Is there a way to merge BAM files using parabricks? Also, if it isn’t possible should just merge using samtools and then return to pbrun for downstream pipeline?

pbrun fq2bam \
--ref ref.fasta \
--in-fq LibA_R1.fastq LibA_R2.fastq \
--knownSites  knownsites.vcf.gz \
--out-bam LibA.bam \
--out-recal-file LibA.recal.txt \
--tmp-dir temp \
--read-group-lb lib1 \

pbrun fq2bam \
--ref ref.fasta \
--in-fq LibB_R1.fastq LibB_R2.fastq \
--knownSites  knownsites.vcf.gz \
--out-bam LibB.bam \
--out-recal-file LibB.recal.txt \
--tmp-dir temp \
--read-group-lb lib2 \

Hey @samarth,

Parabricks does not have a tool to merge bam files. I would recommend using samtools for that, then coming back to Parabricks for the downstream pipeline.

I presumed that it was the solution but wanted to double check.
Thanks @gburnett for responding.