Support a BAM file with a mixture of paired-end and single-end reads, such as paired-end 5' GEX and CMO multiplexing.
Use the same R1 formatter for single-end records as for paired-end, and replace R2 with a single N.
This fix assumes that a mixture of single-end and paired-end reads in the same BAM file use a largely compatible chemistry, which seems like a safe bet? If there are cases (mixtures of libraries) where this fix does not work, we can add a check and error out for those cases.
A more general solution of per-read-group 10x_bam_to_fastq headers as Pat suggested may be needed (if not now one day) to support mixtures of library types with different read structures.
Support a BAM file with a mixture of paired-end and single-end reads, such as paired-end 5' GEX and CMO multiplexing.
Use the same R1 formatter for single-end records as for paired-end, and replace R2 with a single N.
This fix assumes that a mixture of single-end and paired-end reads in the same BAM file use a largely compatible chemistry, which seems like a safe bet? If there are cases (mixtures of libraries) where this fix does not work, we can add a check and error out for those cases.
A more general solution of per-read-group
10x_bam_to_fastq
headers as Pat suggested may be needed (if not now one day) to support mixtures of library types with different read structures.