knitr::opts_chunk$set(echo=FALSE, message = FALSE, warning = FALSE, results= FALSE)

Load package

Loading all code needed.

Importing data

Import metafile from DNAsense.

Merging into ampvis format

The three files are converted into a simple list that can be read by all ampvis2 functions. Here we store the list in the object d.

Data quality

Alpha diversity

Rarefaction curves

Data overview

Heatmaps

Phylum

Genus

Top25 most abundant genera

Genera with knon MnOB

Boxplots

MnOB in Source water and Filter media

MnOB in Filter media

Functional information

Identification of MnOBs in top25 genera

Statistical analysis

Ordination

PCA Source water and Filter material

PCA Filter material

PCA Filter material without Polystyrene

Testing significance of groupings (PCA)

Demonstration for PCA 1 (incl. Source water and Filter materials)

## 
## ***FACTORS:
## 
## Centroids:
##                               PC1     PC2
## MaterialCalcium Carbonate -0.1984 -0.5151
## MaterialManganese Oxide   -0.2279  0.1588
## MaterialMatured Quartz    -0.1992  0.5681
## MaterialPolystyrene        0.8906 -0.0644
## MaterialSource Water      -0.0257  0.4586
## MaterialVirgin Quartz     -0.2480 -0.4531
## 
## Goodness of fit:
##              r2 Pr(>r)    
## Material 0.9849  0.001 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## Permutation: free
## Number of permutations: 999

Differential abundance

## $DESeq2_results
## log2 fold change (MLE): Material Virgin.Quartz vs Calcium.Carbonate 
## Wald test p-value: Material Virgin.Quartz vs Calcium.Carbonate 
## DataFrame with 682 rows and 6 columns
##              baseMean log2FoldChange     lfcSE      stat     pvalue
##             <numeric>      <numeric> <numeric> <numeric>  <numeric>
## OTU_1    2.728942e+03       1.021696 0.9969945 1.0247760 0.30546891
## OTU_10   6.692060e+02       1.087190 0.7033783 1.5456690 0.12218452
## OTU_100  3.296737e+01       1.448934 1.6142194 0.8976068 0.36939523
## OTU_1000 1.192554e+00       5.068672 2.8682217 1.7671828 0.07719762
## OTU_1001 3.605871e-02       1.467226 4.8566061 0.3021093 0.76256871
## ...               ...            ...       ...       ...        ...
## OTU_991     0.6235414      4.4507193  4.737960 0.9393746  0.3475384
## OTU_992     0.1036858      3.0047602  4.782988 0.6282183  0.5298610
## OTU_993     0.7816003      0.5054118  4.856606 0.1040669  0.9171163
## OTU_995     2.0134823      1.4673229  2.604788 0.5633175  0.5732187
## OTU_996     0.2171610      2.0700506  4.841436 0.4275696  0.6689645
##               padj
##          <numeric>
## OTU_1    0.4665560
## OTU_10   0.2596421
## OTU_100  0.5271297
## OTU_1000        NA
## OTU_1001        NA
## ...            ...
## OTU_991         NA
## OTU_992         NA
## OTU_993         NA
## OTU_995  0.7160656
## OTU_996         NA
## 
## $plot_MA

## 
## $DESeq2_results_significant
##      baseMean log2FoldChange    lfcSE      stat       pvalue         padj
## 1    8.998219     -23.439098 3.465152 -6.764234 1.340160e-11 5.240025e-09
## 2    8.694753     -27.101774 4.193554 -6.462722 1.028358e-10 2.010441e-08
## 3    6.011038     -23.811962 3.806638 -6.255378 3.965545e-10 5.168427e-08
## 4    7.221037     -23.681886 4.216683 -5.616236 1.951619e-08 1.907707e-06
## 5   37.950451     -25.350656 4.711771 -5.380282 7.436928e-08 5.815678e-06
## 6    8.895957       8.546689 1.618198  5.281610 1.280533e-07 8.344804e-06
## 7   11.620608     -23.664449 4.712094 -5.022066 5.111857e-07 2.260269e-05
## 8  216.608019       7.540985 1.508679  4.998402 5.780740e-07 2.260269e-05
## 9   16.322761     -23.642586 4.711960 -5.017570 5.232922e-07 2.260269e-05
## 10  15.424261     -23.697167 4.711979 -5.029133 4.927032e-07 2.260269e-05
## 11  10.512457     -23.180524 4.689959 -4.942586 7.709321e-07 2.740313e-05
## 12  10.636657       8.256356 1.703070  4.847926 1.247591e-06 4.065067e-05
## 13   5.872168     -22.428333 4.712553 -4.759275 1.942900e-06 5.843647e-05
## 14 192.315818      -5.126326 1.089015 -4.707304 2.510140e-06 7.010461e-05
## 15  57.188837       7.438462 1.637572  4.542373 5.562452e-06 1.449946e-04
## 16 822.854729       6.759287 1.590024  4.251061 2.127604e-05 5.199333e-04
## 17 139.839428       6.906684 1.630584  4.235712 2.278291e-05 5.240070e-04
## 18  18.795400      -5.368319 1.279028 -4.197187 2.702509e-05 5.870451e-04
## 19  12.363858       7.265816 1.777343  4.088022 4.350675e-05 8.953230e-04
## 20 123.199790      -5.720083 1.412874 -4.048544 5.153729e-05 1.007554e-03
## 21  23.509631       6.773325 1.691079  4.005327 6.193176e-05 1.153110e-03
## 22  36.998001       6.647273 1.728794  3.845034 1.205356e-04 2.142246e-03
## 23  27.509026       5.367353 1.505339  3.565544 3.631028e-04 6.150819e-03
## 24  29.797932       6.106258 1.717507  3.555303 3.775439e-04 6.150819e-03
## 25   9.954150       6.888203 1.981145  3.476880 5.072846e-04 7.933931e-03
## 26  24.366374       6.027097 1.749571  3.444899 5.712723e-04 8.272869e-03
## 27   3.643501       6.366170 1.843450  3.453400 5.535677e-04 8.272869e-03
## 28 145.357220       5.799655 1.699581  3.412403 6.439293e-04 8.992013e-03
## 29  14.767601       6.003918 1.766876  3.398042 6.786993e-04 9.150740e-03
## 30  16.966197      -8.851474 2.613567 -3.386741 7.072810e-04 9.218229e-03
## 31  84.698253       6.261060 1.857172  3.371286 7.481808e-04 9.436732e-03
##        Tax
## 1   OTU_57
## 2   OTU_46
## 3  OTU_178
## 4  OTU_138
## 5   OTU_35
## 6   OTU_72
## 7  OTU_115
## 8   OTU_43
## 9   OTU_69
## 10  OTU_85
## 11 OTU_112
## 12 OTU_114
## 13 OTU_147
## 14   OTU_7
## 15 OTU_150
## 16  OTU_26
## 17  OTU_62
## 18  OTU_58
## 19 OTU_166
## 20  OTU_16
## 21 OTU_116
## 22 OTU_130
## 23 OTU_142
## 24 OTU_196
## 25 OTU_238
## 26 OTU_189
## 27  OTU_34
## 28  OTU_47
## 29 OTU_651
## 30  OTU_37
## 31 OTU_214
## 
## $plot_sig

## 
## $sig_res_plot_data
## Source: local data frame [465 x 12]
## Groups: Sample [15]
## 
## # A tibble: 465 x 12
##          Sample    Tax Count   Abundance baseMean log2FoldChange    lfcSE
##           <chr> <fctr> <dbl>       <dbl>    <dbl>          <dbl>    <dbl>
##  1 16SAMP-13400 OTU_57     0 0.000000000 8.998219       -23.4391 3.465152
##  2 16SAMP-13401 OTU_57     0 0.000000000 8.998219       -23.4391 3.465152
##  3 16SAMP-13402 OTU_57     0 0.000000000 8.998219       -23.4391 3.465152
##  4 16SAMP-13403 OTU_57     0 0.000000000 8.998219       -23.4391 3.465152
##  5 16SAMP-13404 OTU_57     0 0.000000000 8.998219       -23.4391 3.465152
##  6 16SAMP-13405 OTU_57   271 0.665602358 8.998219       -23.4391 3.465152
##  7 16SAMP-13406 OTU_57     0 0.000000000 8.998219       -23.4391 3.465152
##  8 16SAMP-13407 OTU_57     6 0.014013126 8.998219       -23.4391 3.465152
##  9 16SAMP-13408 OTU_57     0 0.000000000 8.998219       -23.4391 3.465152
## 10 16SAMP-13409 OTU_57     1 0.002960682 8.998219       -23.4391 3.465152
## # ... with 455 more rows, and 5 more variables: stat <dbl>, pvalue <dbl>,
## #   padj <dbl>, Significant <chr>, Material <fctr>
## 
## $Clean_results
## Source: local data frame [682 x 8]
## Groups: Taxonomy, padj [682]
## 
## # A tibble: 682 x 8
##    Taxonomy    padj Log2FC `Calcium Carbonate` `Manganese Oxide`
##       <chr>   <dbl>  <dbl>               <dbl>             <dbl>
##  1   OTU_57 5.2e-09  -23.0               0.222             0.005
##  2   OTU_46 2.0e-08  -27.0               0.235             0.002
##  3  OTU_178 5.2e-08  -24.0               0.160             0.001
##  4  OTU_138 1.9e-06  -24.0               0.196             0.001
##  5   OTU_35 5.8e-06  -25.0               0.957             0.002
##  6   OTU_72 8.3e-06    8.5               0.000             0.028
##  7  OTU_115 2.3e-05  -24.0               0.318             0.000
##  8   OTU_43 2.3e-05    7.5               0.000             0.031
##  9   OTU_69 2.3e-05  -24.0               0.446             0.000
## 10   OTU_85 2.3e-05  -24.0               0.422             0.000
## # ... with 672 more rows, and 3 more variables: `Matured Quartz` <dbl>,
## #   Polystyrene <dbl>, `Virgin Quartz` <dbl>

Taxonomy padj Log2FC Calcium Carbonate Manganese Oxide Matured Quartz Polystyrene Virgin Quartz
OTU_57 0.0e+00 -23.0 0.222 0.005 0.000 0.002 0.000
OTU_46 0.0e+00 -27.0 0.235 0.002 0.000 0.000 0.000
OTU_178 1.0e-07 -24.0 0.160 0.001 0.001 0.000 0.000
OTU_138 1.9e-06 -24.0 0.196 0.001 0.000 0.000 0.000
OTU_35 5.8e-06 -25.0 0.957 0.002 0.000 0.001 0.000
OTU_72 8.3e-06 8.5 0.000 0.028 0.017 0.001 0.133
OTU_115 2.3e-05 -24.0 0.318 0.000 0.000 0.000 0.000
OTU_43 2.3e-05 7.5 0.000 0.031 1.008 0.227 0.069
OTU_69 2.3e-05 -24.0 0.446 0.000 0.000 0.000 0.000
OTU_85 2.3e-05 -24.0 0.422 0.000 0.000 0.000 0.000

Core community analysis

Venn diagrams

Rankabundance

Frequency plots

Core plots

##    Display Frequency freq_A Abundance
## 1    OTU_1        15     12     12.47
## 2    OTU_3        14     11     10.21
## 3    OTU_4        15     15      7.11
## 4    OTU_5        14     11      4.18
## 5   OTU_13        15     12      3.90
## 6   OTU_10        14     12      3.19
## 7   OTU_11        15     13      2.51
## 8    OTU_9        15     12      2.20
## 9    OTU_8        15     13      1.72
## 10  OTU_12        12     11      1.45
## 11  OTU_18        14     14      1.45
## 12  OTU_29        15     13      1.28
## 13  OTU_17        15     15      1.07
## 14  OTU_28        12     11      1.02
## 15  OTU_15        15     15      0.83
## 16  OTU_21        12     12      0.66
## 17  OTU_27        14     14      0.61
## 18  OTU_31        15     13      0.45
## 19  OTU_40        15     11      0.39