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 = 1000,
factor.shape = "solid") +
scale_x_log10(limits=c(20, 120)) +
scale_y_log10(limits=c(20, 100))
#p
#sel <- mmplot_locator(p)
sel <- data.frame(HPD = c(52.6, 61.4, 44.5, 30.9, 31, 42),
HPF1 = c(38.3, 31.6, 21.7, 22.2, 27, 36.2))
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 1371.00
## GC.mean 56.40
## N50 7982.00
## Length.total 6574813.00
## Length.max 77984.00
## Length.mean 4795.60
## Coverage.HPD 43.08
## Coverage.HPF1 28.63
## Ess.total 123.00
## Ess.unique 81.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.0642, -0.0416, 0.0582, 0.124, 0.0397, -0.0457),
PC2 = c(-0.0662, -0.0105, -0.0387, -0.0962, -0.196, -0.166))
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 1095.00
## GC.mean 57.70
## N50 9145.00
## Length.total 5817263.00
## Length.max 77984.00
## Length.mean 5312.60
## Coverage.HPD 43.07
## Coverage.HPF1 28.48
## Ess.total 108.00
## Ess.unique 76.00
Finally the binned scaffolds are exported.
mmexport(data = dB, assembly = assembly, file = "GWW_Nitrospira7.fa")