hello I am using cmpbam to compare bam files.For this I have to extract read names from original bamfile by using this command.
samtools view file1.bam K01:2179-2179 | cut -d ' ' -f 1 | sort | uniq > names.txt
Can someone help me that how I can find read id from my original bam file as k01:2179-2179 as shown in example. Please helpme to find this id from my original bam file. Thank you