Filtering paired reads when forward is all scRNA-seq barcode sequence
1
0
Entering edit mode
6.0 years ago

Hi all,

I have paired-end fastq files from a single-cell RNA seq experiment. The forward files consist of barcode reads (no usable sequence information) while the reverse reads contain transcript sequences. I'm looking for an efficient way to filter out rRNA reads, but it's a little tricky considering I can't align the forward reads. Is there an efficient way of doing this either within an aligner or with a quick downstream script that will result in rRNA-filtered and orphanless paired end (non-interleaved) fastq files?

Thanks.

RNA-Seq scRNA-seq alignment • 1.4k views
ADD COMMENT
1
Entering edit mode
6.0 years ago

but it's a little tricky considering I can't align the forward reads.

so R1 won't be mapped but R2 will. And then filter with samtools

ADD COMMENT
0
Entering edit mode

Ah, I see that is quite simple! So the correct samtools flag be 9 (read paired (0x1) & mate unmapped (0x8))?

Edit: Okay, I think it should be 13 (read paired (0x1) & read unmapped (0x4) & mate unmapped (0x8)) since the read 1 is the "read" and read 2 is the "mate." Also, I want the mates which are unmapped.

Edit 2: If anyone is interested, here is what I used to convert sam output to bam, filter only for pairs where reverse read non-mapped, and converted back to two non-interleaved fastqs in a single command:

samtools view -bS input.sam | samtools view -u -f 13 - | samtools fastq -1 input.norRNA_R1.fastq.gz -2 input.norRNA_R2.fastq.gz -
ADD REPLY

Login before adding your answer.

Traffic: 1671 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6