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,
factor.shape = "solid") +
scale_x_log10(limits=c(2, 30)) +
scale_y_log10(limits=c(5, 50))
#p
#sel <- mmplot_locator(p)
sel <- data.frame(HPD = c(9.24, 9.46, 13.1, 18, 23.7, 18.2, 11.1, 9.14),
HPF1 = c(11.3, 9.72, 9.24, 11.6, 18.3, 20.1, 14, 11.4))
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 1897.00
## GC.mean 60.20
## N50 11573.00
## Length.total 11385458.00
## Length.max 137749.00
## Length.mean 6001.80
## Coverage.HPD 12.96
## Coverage.HPF1 12.06
## Ess.total 205.00
## Ess.unique 105.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 = "PC3",
color = "essential",
minlength = 1000)
#p
#sel <- mmplot_locator(p)
sel <- data.frame(PC1 = c(-0.0373, 0.00392, 0.0672, 0.103, 0.0947, 0.0306, -0.0327),
PC3 = c(0.0607, 0.146, 0.147, 0.0574, -0.0104, -0.0138, 0.0171))
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 1252.00
## GC.mean 55.60
## N50 6296.00
## Length.total 5383386.00
## Length.max 54981.00
## Length.mean 4299.80
## Coverage.HPD 14.39
## Coverage.HPF1 12.79
## Ess.total 66.00
## Ess.unique 59.00
Finally the binned scaffolds are exported.
mmexport(data = dB, assembly = assembly, file = "GWW_Nitrospira9.fa")