This function returns correlation coefficients for variables in one AbundanceData object against itself. It generally serves as a convenience wrapper around veupathUtils::correlation, with the exception that it additionally supports sparcc.
Arguments
- data
An AbundanceData object
- method
string defining the type of correlation to run. The currently supported values are 'spearman','pearson' and 'sparcc'
- format
string defining the desired format of the result. The currently supported values are 'data.table' and 'ComputeResult'.
- verbose
boolean indicating if timed logging is desired
- ...
additional parameters
Examples
correlationDT <- selfCorrelation(
getCollection(
microbiomeData::DiabImmune,
"16S (V4) Genus (Relative taxonomic abundance analysis)"),
method = 'sparcc',
format = 'data.table'
)
#>
#> 2024-06-26 14:29:07.33771 Removed 1 records with no data.
#>
#> 2024-06-26 14:29:07.344699 Removed 1 records with no data.
#>
#> 2024-06-26 14:29:07.351318 Removed 1 records with no data.
#>
#> 2024-06-26 14:38:26.120324 Completed correlation with method=sparcc. Formatting results.
#>
#> 2024-06-26 14:38:26.121569 Received df table with 3183 samples and 21 features with abundances.
correlationOutput <- selfCorrelation(
getCollection(
microbiomeData::DiabImmune,
"16S (V4) Genus (Relative taxonomic abundance analysis)"),
method = 'sparcc',
format = 'ComputeResult'
)
#>
#> 2024-06-26 14:38:26.264025 Removed 1 records with no data.
#>
#> 2024-06-26 14:38:26.270739 Removed 1 records with no data.
#>
#> 2024-06-26 14:38:26.277149 Removed 1 records with no data.
#>
#> 2024-06-26 14:47:43.940948 Completed correlation with method=sparcc. Formatting results.
#>
#> 2024-06-26 14:47:43.942164 Received df table with 3183 samples and 21 features with abundances.
#>
#> 2024-06-26 14:47:43.943521 Correlation computation completed with parameters recordIdColumn= 16S_rRNA_(V4)_assay_Id , method = sparcc
alsoCorrelationDT <- getComputeResult(
correlationOutput,
"data.table"
)