This is a test version of Biostars. For the public version, visit https://www.biostars.org.
extract all the cigar sequences

hello all,

I want to extract all the cigar sequences from bam file and write them in a text file. Is anyone aware of any way to do this?

TIA

cigar

1 answer

samtools view your_bamfile.bam | cut -f 6 > your_textfile.txt

works perfectly. Thank you so much

Log in to answer this question.