Filter Bacterial sequences from Metagenomics
1
2
Entering edit mode
7.6 years ago
tucanj ▴ 100

I have a large metagenomic RNA-seq dataset that I am trying to assemble to find viral sequences but it is too large for my hardware (52gb RAM). I can see that there is a lot of bacterial contamination from many different species when I BLAST reads. I want to filter out all bacterial reads so that I can assemble. Ideas?

  1. Download all bacterial genomes from Refseq and try to bowtie to that (will take a long time). As well, since when has the compressed Refseq bacterial fna files reached 72gb (when combined)?!? The last all.bacteria.gz file in Refseq archive from 2015 is 2.7gb...

  2. Somehow condense all bacterial genomes into non-redundant, then align?

  3. Other ideas?

RNA-Seq genome alignment sequencing • 3.8k views
ADD COMMENT
3
Entering edit mode

Have you checked Kraken or Kaiju to do the binning? You can even use MG-RAST to do the taxonomic classification and then download only the viral reads.

ADD REPLY
0
Entering edit mode

Kaiju will work with only 50GB RAM. You can also use the web server and upload your reads there for taxonomic classification.

ADD REPLY
1
Entering edit mode

If you are not looking for novel viral sequences then perhaps doing the binning in reverse may be better. Get the RefSeq viral sequences from here and then use BBSplit to bin the reads into virii and rest.

ADD REPLY
1
Entering edit mode

Thanks for your clarification: I am looking for novel viral sequences, so I want to filter using close alignment to known bacterial species. Asssembling part then aligning original reads to identified contaminants could work but their are too many different bacterial contaminant to make this practical

ADD REPLY
0
Entering edit mode

If novel things is the requirement then slogging though multiple rounds of alignments/assembly may be order of the day. As @Brian noted below this process is going to be fraught with hurdles and you are likely to hit many false positives along the way. I don't see an easy solution.

ADD REPLY
6
Entering edit mode
7.6 years ago

You cannot determine whether there is bacterial contamination simply from BLASTing reads. Similarly, it is impossible to trivially filter out bacterial contamination by mapping to all known bacteria, because viruses tend to share sequence with their hosts, and there's no guarantee that your bacteria are in the reference dataset.

You need a completely different approach. Perhaps you should assemble the data, annotate the assemblies, and then pull out contigs with genes known to occur only in viruses...

ADD COMMENT
0
Entering edit mode

I also assembled parts of the reads/used digital normalization so that I could assemble and found many bacterial contigs in the assembly. You are right that there is no guarantee that my bacteria are in the reference set but at least I will be able to reduce the size of the original dataset. I could be wrong but if I require that both paired ends (101bp) align concordantly to the bacterial db the false positive rate would be low.

The reason for the original filtering is I cannot assemble due to the size of the dataset. I could assemble with digital normalization and then go from there with your idea.

Thanks for your help!

ADD REPLY

Login before adding your answer.

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