Entering edit mode
2.1 years ago
O.rka
▴
740
I have the following files:
- sampleA_1.fastq.gz - Forward reads
- sampleA_2.fastq.gz - Reverse reads
- mapped.sorted.bam - Sorted BAM file of mapped reads (doesn't contain unmapped reads)
How can I use these 3 files to get the following files:
- sampleA_1.unmapped.fastq.gz
- sampleA_2.unmapped.fastq.gz
Can I use anything from the following tools I have installed in my current environment?
- bbmap (and all the software in this suite)
- samtools
- seqkit
Damn, I love bbtools. They always have whatever weird processing I'm trying to do already baked in. Thanks for responding.
When you create the
names
files (one header per line) be sure to remove the@
symbol at beginning of fastq header.Yea, I used
samtools view mapped.sorted.bam | cut -f1 | sort -u > reads.mapped.list
and it worked like a charm.