Compare Custom Mocks to Experimental
compare2theorectical(x, theoretical_id)
Phyloseq object with experimental and theoretical composition
name of the theoretical sample. Must be in sample_names(x)
Correlation table
Correlation between theoretical and experimental mocks.
library(phyloseq)
ZymoExamplePseq
#> phyloseq-class experiment-level object
#> otu_table() OTU Table: [ 946 taxa and 9 samples ]
#> sample_data() Sample Data: [ 9 samples by 6 sample variables ]
#> tax_table() Taxonomy Table: [ 946 taxa by 6 taxonomic ranks ]
compare2theorectical(ZymoExamplePseq, theoretical_id = "somename")
#> Check that theoretical = somename exists in sample_names(x)
#> returning all pairwise comparisons
#> # A tibble: 9 × 10
#> term D0 D1 D2 D3 D4 D5 D6 D7 D8
#> <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
#> 1 D0 NA 0.580 0.264 0.208 0.168 0.173 0.165 0.185 0.195
#> 2 D1 0.580 NA 0.289 0.234 0.256 0.213 0.205 0.210 0.220
#> 3 D2 0.264 0.289 NA 0.222 0.224 0.271 0.223 0.256 0.215
#> 4 D3 0.208 0.234 0.222 NA 0.230 0.162 0.139 0.192 0.160
#> 5 D4 0.168 0.256 0.224 0.230 NA 0.159 0.115 0.161 0.159
#> 6 D5 0.173 0.213 0.271 0.162 0.159 NA 0.102 0.172 0.157
#> 7 D6 0.165 0.205 0.223 0.139 0.115 0.102 NA 0.140 0.133
#> 8 D7 0.185 0.210 0.256 0.192 0.161 0.172 0.140 NA 0.139
#> 9 D8 0.195 0.220 0.215 0.160 0.159 0.157 0.133 0.139 NA