I have a couple of CRAM files which I am aiming to convert to BAM files. I tried with these two commands:
samtools view -b -T ref.fa -o output_bam.bam input_cram.cram
samtools view -b -o output_bam.bam input_cram.cram
The second command does not specify a reference file. I had the exact same BAM output from both commands: can someone please explain why this is the case? I read pretty much everywhere that the reference file is required for conversion (since CRAM does not contain bases that match with the reference). Is it really needed?
Of note, I am running samtools v 1.9.
Thanks for your help.