Newer
Older
title: "ONT pilot project - report"
date: "`r Sys.time()`"
toc: true
toc_float: true
toc_depth: 2
---
# Input
- working directory: `r snakemake@config$work_dir`
- short reads:
- R1: `r paste(snakemake@config$data$metag$sr$r1, collapse=", ")`
- R2: `r paste(snakemake@config$data$metag$sr$r2, collapse=", ")`
- long reads: `r paste(snakemake@config$data$metag$ont$fastq, collapse=", ")`
- short reads:
- R1: `r paste(snakemake@config$data$metat$sr$r1, collapse=", ")`
- R2: `r paste(snakemake@config$data$metat$sr$r2, collapse=", ")`
knitr::kable(TABS$nanostats, caption='Long reads: NanoStats')
```
```{r tables-fastp, echo=FALSE}
knitr::kable(TABS$fastp$metag, caption='Short reads (metaG): Fastp')
if(HAS_METAT){
knitr::kable(TABS$fastp$metat, caption='Short reads (metaT): Fastp')
}
# Sample similarity
```{r figures-mash-reads, echo=FALSE, fig.width=10, fig.height=10, fig.cap='Sample (dis)similarity (Mash)', fig.topcaption = TRUE}
if(!is.null(FIGS$mash)){
grid.newpage()
grid.draw(FIGS$mash$reads)
}
```
# Assembly
## Mappability
```{r figures-mappability-metag, echo=FALSE, fig.width=10, fig.height=7, fig.cap='Mappability, metaG', fig.topcaption = TRUE}
print(FIGS$mappability$metag)
```{r figures-mappability-metat, echo=FALSE, fig.width=10, fig.height=7, fig.cap='Mappability, metaT', fig.topcaption = TRUE}
print(FIGS$mappability$metat)
}
```{r figures-mash-asm, echo=FALSE, fig.width=10, fig.height=10, fig.cap='Assembly (dis)similarity (Mash)', fig.topcaption = TRUE}
grid.draw(FIGS$mash$asm)
```{r figures-fastani, echo=FALSE, fig.width=10, fig.height=10, fig.cap='Assembly ANI (FastANI)', fig.topcaption = TRUE}
if(!is.null(FIGS$fastani)){
grid.newpage()
grid.draw(FIGS$fastani$pheatmap)
}
```
```{r figures-mummer-seqs, echo=FALSE, fig.width=10, fig.height=10, fig.cap='Aligned sequences (Mummer)', fig.topcaption = TRUE}
if(!is.null(FIGS$mummer)){
grid.newpage()
grid.draw(FIGS$mummer$seqs)
}
```
```{r figures-mummer-bases, echo=FALSE, fig.width=10, fig.height=10, fig.cap='Aligned bases (Mummer)', fig.topcaption = TRUE}
if(!is.null(FIGS$mummer)){
grid.newpage()
grid.draw(FIGS$mummer$bases)
}
```
```{r tables-quast, echo=FALSE}
if(!is.null(TABS$quast)){
knitr::kable(t(TABS$quast), caption='QUAST')
}
```{r figures-quast, echo=FALSE, fig.width=10, fig.height=10, fig.cap='Assembly statistics w/ QUAST', fig.topcaption = TRUE}
```{r figures-plasflow, echo=FALSE, fig.width=10, fig.height=7, fig.cap='Plasmid prediction w/ Plasflow', fig.topcaption = TRUE}
if(!is.null(FIGS$plasflow)){
print(FIGS$plasflow$sum_pct)
}
```
# Genes/proteins
## Prodigal
```{r figures-prodigal-counts, echo=FALSE, fig.width=10, fig.height=7, fig.cap='Number of genes/proteins (Prodigal)', fig.topcaption = TRUE}
print(FIGS$prodigal$gcounts)
```{r figures-prodigal-pct, echo=FALSE, fig.width=10, fig.height=7, fig.cap='Number of partial genes/proteins (Prodigal)', fig.topcaption = TRUE}
knitr::opts_chunk$set(warning=FALSE)
print(FIGS$prodigal$gpct)
```
```{r figures-prodigal-lengthv, echo=FALSE, fig.width=10, fig.height=7, fig.cap='Gene length (Prodigal), zommed in', fig.topcaption = TRUE}
print(FIGS$prodigal$glen_zoom)
```
## DIAMOND
```{r figures-diamondDB-density, echo=FALSE, fig.width=10, fig.height=7, fig.cap='nr UniProtKB/TrEMBL (DIAMOND)', fig.topcaption = TRUE}
if(!is.null(FIGS$diamondDB)){
print(FIGS$diamondDB$density_qs_len_ratio)
print(FIGS$diamondDB$density2d)
```{r figures-diamond-barplot, echo=FALSE, fig.width=10, fig.height=12, fig.cap='Unique genes/proteins (DIAMOND)', fig.topcaption = TRUE}
if(!is.null(FIGS$diamond)){
print(FIGS$diamond$uniq)
}
```
```{r figures-diamond-scatter, echo=FALSE, fig.width=10, fig.height=10, fig.cap='Unique genes/proteins (DIAMOND)', fig.topcaption = TRUE}
if(!is.null(FIGS$diamond)){
print(FIGS$diamond$u_hcu_metag)
if(HAS_METAT){
print(FIGS$diamond$u_hcu_metat)
}
}
```
```{r tables-diamond, echo=FALSE}
knitr::kable(TABS$diamond, caption='DIAMOND (number of proteins in tool2 but not in tool1)')
```
```{r figures-cdhit-barplot, echo=FALSE, fig.width=10, fig.height=12, fig.cap='Unique genes/proteins (CD-HiT)', fig.topcaption = TRUE}
```{r figures-cdhit-scatter, echo=FALSE, fig.width=10, fig.height=10, fig.cap='Unique genes/proteins (CD-HIT)', fig.topcaption = TRUE}
if(!is.null(FIGS$cdhit)){
print(FIGS$cdhit$u_hcu_metag)
print(FIGS$cdhit$u_hcu_metat)
}
```{r tables-cdhit, echo=FALSE}
knitr::kable(TABS$cdhit, caption='CD-HIT (number of proteins in tool2 but not in tool1)')
```
```{r figures-crispr-casc, echo=FALSE, fig.width=10, fig.height=7, fig.cap='CRISPR prediction (CASC)', fig.topcaption = TRUE}
```{r figures-crispr-minced, echo=FALSE, fig.width=10, fig.height=7, fig.cap='CRISPR prediction (MinCED)', fig.topcaption = TRUE}
if(!is.null(FIGS$minced)){
```
## rRNA gene prediction
```{r figures-barrnap-total, echo=FALSE, fig.width=10, fig.height=10, fig.cap='rRNA gene prediction w/ barrnap', fig.topcaption = TRUE}
if(!is.null(FIGS$barrnap)){
print(FIGS$barrnap$total)
}
```
```{r figures-barrnap-genes, echo=FALSE, fig.width=10, fig.height=10, fig.cap='rRNA gene prediction w/ barrnap', fig.topcaption = TRUE}
if(!is.null(FIGS$barrnap)){
for(kingdom_name in sort(unique(TABS$barrnap$kingdom))){
print(FIGS$barrnap[[kingdom_name]])