I have RNAseq data and aligned the fastq files to the genome. so now I have bam file. I want to make the bam file only for one gene for example gapdh. to do so at first I have converted the bam file to sam file to be able to grep it. in the sam file we only have coordinates but when I tried to look for the coordinates of gapdh I did not find them in the sam file. do you know how I can make a sam or bam file only for the gapdh?
AFAIK in recent versions the
-b
is not necessary because samtools figures out the output format based on the extension specified in-o
;-)