This report documents the binning of a Actinobacteria genome from an enrichment reactor (ENR4). See Daims et al., 2015: Complete Nitrification by Nitrospira Bacteria for further details.
In case you haven’t installed the mmgenome package, see the Load data example.
library("mmgenome")
The Rmarkdown file Load_data.Rmd describes the loading of the data and can be imported using the mmimport
function. However, the preprocessed data can also be downloaded directly from figshare: Daims_ENR4. Hence, here we import the prepocessed data from figshare instead.
load("Daims_ENR4.RData")
The object d
contains information on scaffolds and essential genes within the scaffolds. For each scaffold the dataset contains the following information: The columns ENR4A
, ENR4E
, ENR4F
and ENR6
contain the coverage information from 4 different samples; PC1
, PC2
and PC3
contain coordinates of the three first principal components from a PCA analysis on tetranucleotide frequencies; essential
contain information taxonomic information for each scaffold based on classification on essential genes; rRNA
contain taxonomic information on scaffolds that have an associated 16S rRNA gene.
colnames(d$scaffolds)
## [1] "scaffold" "length" "gc" "ENR4A" "ENR4E"
## [6] "ENR4F" "ENR6" "PC1" "PC2" "PC3"
## [11] "essential" "rRNA16S"
The basic statistics of the full dataset can be summarised using the mmstats
function.
mmstats(d, ncov = 4)
## General Stats
## n.scaffolds 161.00
## GC.mean 65.60
## N50 198700.00
## Length.total 12846008.00
## Length.max 1306334.00
## Length.mean 79788.90
## Coverage.ENR4A 157.66
## Coverage.ENR4E 139.64
## Coverage.ENR4F 255.62
## Coverage.ENR6 150.12
## Ess.total 419.00
## Ess.unique 107.00
The combination of the coverage of sample ENR4A
and ENR4E
provides the cleanest separation of the genomes and are used for binning. A subspace is defined that clearly seperates the Actinobacteria from the three other species.
p <- mmplot(data = d, x = "ENR4A", y = "ENR4E", log.x = T, log.y = T, color = "essential")
#p
#sel <- mmplot_locator(p)
sel <- data.frame(ENR4A = c(2.54, 3.72, 6.53, 5.86, 2.73),
ENR4E = c(5.45, 8.06, 6.63, 3.93, 3.93))
mmplot_selection(p, sel)
dA <- mmextract(d, sel)
mmstats(dA, ncov = 4)
## General Stats
## n.scaffolds 9.00
## GC.mean 70.10
## N50 339735.00
## Length.total 2103759.00
## Length.max 469456.00
## Length.mean 233751.00
## Coverage.ENR4A 4.06
## Coverage.ENR4E 5.39
## Coverage.ENR4F 9.99
## Coverage.ENR6 0.00
## Ess.total 91.00
## Ess.unique 91.00
Until now we have just used coverage profiles to extract scaffolds related to our genome of interest. However, some scaffolds might be present in many copies (repeats) and hence have a much higher coverage than the rest of the genome. In addition, some scaffolds will by chance have a slightly different coverage profile than the rest of the genome and thereby also been missed.
The function mmplot_network
can be used to generate a network plot of scaffolds connected by paired-end reads. We start by plotting the scaffolds we have in our current subset.
mmplot_network(data = dA, network = pe, nconnections = 2, color = "essential", scale.links = 0.5)
All scaffolds seem to be nicely connected and we should be able to improve the assembly substantial in the refinement stage. To include repeats and other missed scaffolds we simply extract all scaffolds that are directly connected by paired-end reads to our current subset dB using mmextract_network. Only scaffolds directly connected to the subset is extracted.
dB <- mmextract_network(subset = dA, original = d, network = pe, nconnections = 5, type = "direct")
… and then plot the new subset. It seems like we included a single high coverage scaffold that was missed initially.
mmplot_network(data = dB, network = pe, nconnections = 1, color = "ENR4A", scale.links = 0.5)
mmstats(dB, ncov = 4)
## General Stats
## n.scaffolds 10.00
## GC.mean 70.00
## N50 339735.00
## Length.total 2174399.00
## Length.max 469456.00
## Length.mean 217439.90
## Coverage.ENR4A 4.78
## Coverage.ENR4E 6.28
## Coverage.ENR4F 11.79
## Coverage.ENR6 1.55
## Ess.total 99.00
## Ess.unique 99.00
Now that we are happy with the genome bin, the scaffolds can be exported to a separate fasta file using mmexport
. The genome were then re-assembled using the reads in the genome bin using the SPAdes assembler.
mmexport(data=dB, assembly=assembly, file = "Actinobacteria.fa")