Skip to content

Be more explicit about assocComp()$association meaning  #250

@alexg9010

Description

@alexg9010

When talking about the batch correction (

We have implemented some rudimentary functionality for batch effect control. You
can check which one of the principal components are statistically associated
with the potential batch effects such as batch processing dates, age of
subjects, sex of subjects using `assocComp`. The function gets principal
components from the percent methylation matrix derived from the input
`methylBase` object, and checks for association. The tests for association are
either via Kruskal-Wallis test or Wilcoxon test for categorical attributes and
correlation test for numerical attributes for samples such as age. If you are
convinced that some principal components are accounting for batch effects, you
can remove those principal components from your data using `removeComp`.
), we should probably be more explicit about the output of assocComp() (

methylKit/R/batchControl.R

Lines 180 to 185 in ab60a62

#' @return a named list of principal component matrix (named 'pcs'),
#' % variation explained
#' by principal compopents (named 'vars') and a p-value matrix
#' showing association
#' p-values between sample annotations and principal components
#' (named 'association').
).

This recent issue (#247 ) shows that people might not be aware that the association component contains p-values, thus should not be interpreted as percentages of association or similar.

I suggest renaming the list item to something more explicit, like association_test or association_pval.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions