Calculate QC Metrics for Taxa and Samples

calculateQC(x)

Arguments

x

A phyloseq object

Value

A list with two tibbles.

SampleQC

  • sample_total_taxa:Total taxa in a sample

  • sample_total_reads:Total reads in a sample

  • number_taxa_account_fifty_percent:Number of taxa account for 50 percent

TaxaQC

  • taxa_counts:Total counts of taxa in all samples

  • taxa_mean_counts:Mean counts of taxa in all samples

  • taxa_dectected_samples:Number of samples in which taxa detected

  • taxa_prevalence:Percent of samples in which taxa detected

Details

Calculate QC metrics for taxa and samples.

Author

Sudarshan A. Shetty

Examples

library(biomeUtils)
data("FuentesIliGutData")
qc_Data <- calculateQC(FuentesIliGutData)
qc_Data
#> $SampleQC
#> # A tibble: 589 × 4
#>    Samples   sample_total_taxa sample_total_reads number_taxa_account_fifty_pe…¹
#>    <chr>                 <dbl>              <dbl>                          <int>
#>  1 sample_1                259              15237                             11
#>  2 sample_2                291              18970                             16
#>  3 sample_3                336              21161                             16
#>  4 sample_4                355              17754                             20
#>  5 sample_5                300              25724                             11
#>  6 sample_6                374              33815                             14
#>  7 sample_7                251              13810                             15
#>  8 sample_8                273              22730                             15
#>  9 sample_9                279              22706                             15
#> 10 sample_10               219              15521                              9
#> # … with 579 more rows, and abbreviated variable name
#> #   ¹​number_taxa_account_fifty_percent
#> 
#> $TaxaQC
#> # A tibble: 905 × 9
#>    taxa    taxa_counts taxa_me…¹ taxa_…² taxa_cv taxa_…³ taxa_…⁴ taxa_…⁵ perce…⁶
#>    <chr>         <dbl>     <dbl>   <dbl>   <dbl>   <dbl>   <dbl>   <dbl>   <dbl>
#>  1 ASV302        13913    23.6     47.3     2.00   648       504    85.6 4.44e-2
#>  2 ASV636         4063     6.90    27.4     3.97   462       112    19.0 1.30e-2
#>  3 ASV500         6223    10.6     45.0     4.26   535       227    38.5 1.98e-2
#>  4 ASV7         784128  1331.    1652.      1.24   899       578    98.1 2.50e+0
#>  5 ASV2617         311     0.528    1.50    2.84    45       117    19.9 9.92e-4
#>  6 ASV148        40396    68.6    224.      3.26   765       189    32.1 1.29e-1
#>  7 ASV196        24796    42.1    137.      3.26   724       248    42.1 7.91e-2
#>  8 ASV2699         294     0.499    1.81    3.63    40.5      68    11.5 9.38e-4
#>  9 ASV109        60088   102.     303.      2.97   798       454    77.1 1.92e-1
#> 10 ASV1472         907     1.54     3.62    2.35   229       197    33.4 2.89e-3
#> # … with 895 more rows, and abbreviated variable names ¹​taxa_mean_counts,
#> #   ²​taxa_stdev_counts, ³​taxa_rank, ⁴​taxa_dectected_samples, ⁵​taxa_prevalence,
#> #   ⁶​percent_of_total
#>