This is a test version of Biostars. For the public version, visit https://www.biostars.org.
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

samtools star

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.

0 answers

No answers yet.

Log in to answer this question.