Entering edit mode
2.8 years ago
rubic
▴
270
Hi,
I have RNA-seq reads which I mapped with STAR and I'd like to extract from the bam file the primary alignments that map to chr1, chr2, and chr3.
I know the second part is achieved by:
samtools view -b -L <my_chrs_bed_file> <my_bam_file>
So I'm mostly interested in the first part, and how to pipe the two parts.
Thanks
I don't follow, what's the 'first' part you want to achieve? You have one question: how to extract reads aligning to chr1 chr2 etc, and you have the solution.