Introduction

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.

Load the mmgenome package

The metagenome data is analysed using the mmgenome package.

library("mmgenome")

Import data

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")

Extract Nitrospira 1

The first Nitrospira bin can be relatively easy seperated from the other genomes.

p <- mmplot(data = d, 
            x = "HPD", 
            y = "HPF1", 
            log.x = F, 
            log.y = F, 
            color = "essential", 
            minlength = 1000, 
            factor.shape = "solid") +
  xlim(5, 50) +
  ylim(100, 600)

#p
#sel <- mmplot_locator(p)

sel <- data.frame(HPD  =  c(9.12, 30.9, 38.7, 39.9, 25.5, 13),
                  HPF1  =  c(353, 531, 504, 375, 297, 311))

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          578.00
## GC.mean               56.80
## N50                 8200.00
## Length.total     3106000.00
## Length.max         42436.00
## Length.mean         5373.70
## Coverage.HPD          24.12
## Coverage.HPF1        379.67
## Ess.total             91.00
## Ess.unique            86.00

Export the scaffolds

Finally the binned scaffolds are exported.

mmexport(data = dA, assembly = assembly, file = "GWW_Nitrospira1.fa")