Removing Human Reads From Metagenome BAM File
2
1
Entering edit mode
8.0 years ago
Kevin.Y ▴ 10

So I have metagenome bam files which contain reads for both human and bacteria. I would like to remove all the human reads so I can focus on the bacterial reads. Has anyone been able to remove human reads from their RNA-seq data using samtools or any other software?

RNA-Seq • 3.3k views
ADD COMMENT
0
Entering edit mode

You have it in a bam file, meaning it's already aligned? To what?

ADD REPLY
0
Entering edit mode

It was aligned to a metagenome database for human and bacteria.

ADD REPLY
0
Entering edit mode
8.0 years ago
Tonor ▴ 480

Align your reads to the human genome first, then extract all the unmapped reads to work with further. The unmapped reads will have all your bacteria (as well as other non-human things). Extracting unmapped paired end from an alignment - C: Extracting unmapped paired end from an alignment

ADD COMMENT
0
Entering edit mode

This post is useful for removing specific chromosomes from a BAM: Remove mitochondrial reads from BAM files -Remove mitochondrial reads from BAM files

ADD REPLY
0
Entering edit mode
8.0 years ago

This sounds like a job for BBsplit

ADD COMMENT
0
Entering edit mode

Agree with @WouterDeCoster, BBSplit can be used, although it is very slow. Here is an example of it Tool to separate human and mouse rna seq reads from one of my posts.

You can probably use seal.sh from BBmap itself which is very fast. The example of Seal.sh is in the above link.

ADD REPLY

Login before adding your answer.

Traffic: 1828 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