This report documents the binning of a Nitrospira genome from the GWW sample. See Daims et al., 2015: Complete Nitrification by Nitrospira Bacteria for further details.
The metagenome data is analysed using the mmgenome package.
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_GWW. Hence, here we import the prepocessed data from figshare instead.
load("Daims_GWW.RData")
As seen from the overview plots, there are numerous Nitrospira species. This one is located between multiple other species.
p <- mmplot(data = d,
x = "HPD",
y = "HPF1",
log.x = T,
log.y = T,
color = "essential",
minlength = 5000) +
scale_x_log10(limits=c(2, 30)) +
scale_y_log10(limits=c(5, 50))
#p
#sel <- mmplot_locator(p)
sel <- data.frame(HPD = c(5.86, 8.09, 12.2, 12.1, 8.67, 6.58, 5.56),
HPF1 = c(13.2, 16.8, 18.9, 15.2, 11.7, 10.3, 10.6))
mmplot_selection(p, sel)
The scaffolds included in the defined subspace are extracted using the mmextract
function.
dA <- mmextract(d, sel)
The mmstats
function applies to any extracted object. Hence, it can be used directly on the subset.
mmstats(dA, ncov = 2)
## General Stats
## n.scaffolds 1658.00
## GC.mean 58.70
## N50 8743.00
## Length.total 9416619.00
## Length.max 89856.00
## Length.mean 5679.50
## Coverage.HPD 8.35
## Coverage.HPF1 13.74
## Ess.total 140.00
## Ess.unique 93.00
mmplot_pairs(data = dA,
variables = c("HPD", "HPF1","gc", "PC1", "PC2", "PC3"),
minlength = 5000,
color = "essential")
We do a another selection to remove other Nitrospira scaffolds that were included.
p <- mmplot(data = dA,
x = "PC1",
y = "PC2",
color = "essential",
minlength = 1000)
#p
#sel <- mmplot_locator(p)
sel <- data.frame(PC1 = c(-0.0397, -0.00947, 0.05, 0.118, 0.0716, 0.00751),
PC2 = c(-0.11, -0.212, -0.215, -0.121, -0.0417, -0.0626))
mmplot_selection(p, sel)
The scaffolds included in the defined subspace are extracted using the mmextract
function.
dB <- mmextract(dA, sel)
The mmstats
function applies to any extracted object. Hence, it can be used directly on the subset.
mmstats(dB, ncov = 2)
## General Stats
## n.scaffolds 846.00
## GC.mean 55.50
## N50 5457.00
## Length.total 3369566.00
## Length.max 22477.00
## Length.mean 3982.90
## Coverage.HPD 8.21
## Coverage.HPF1 13.59
## Ess.total 15.00
## Ess.unique 15.00
Finally the binned scaffolds are exported.
mmexport(data = dB, assembly = assembly, file = "GWW_Nitrospira10.fa")