Extract primary STAR mapped reads to specific chromosomes
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
• 844 views
•
link
0 answers
No answers yet.
Log in to answer this question.
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.