The goal of associationr is to …
You can install the released version of associationr from github with:
if (!("remotes" %in% installed.packages()[, "Package"])){
install.packages("remotes")
}
remotes::install_github("vitalinakomashko/associationr")
As the first step you need to provide analysis parameters. Parameters should be stored in a YAML file, see documentation about formatting here.
| Parameter | Meaning | Mandatory? | Values | | ------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | primary_covs | Main phenotype to be investigated | YES | Column name in the sample annotation data frame | | adjust_covs | Covariates to adjust for | YES | Column name in the sample annotation data frame | | test_method | Analysis method | YES | “limma” or “lm” | | interact_covs | If interactions should be investigated | NO | | | block_covs | If mixed-effect modeling should be performed | NO | | | spline_fun | If time-dependent effect should be investigated | NO | | | ignore_sample_size | If the parameter is provided and set to TRUE, then small number of samples (less than 3) per category in the primary_covs will be ignored, but a message will be printed. If the parameter is not provided or set to FALSE, then the function will provide an error. | NO | TRUE, FALSE or don’t provide | | ~~voom~~ | ~~If voom is provided then both norm_factors_method and voom_normalize_method must be provided~~ | ~~NO~~ | | | ~~norm_factors_method~~ | ~~Normalization method to be used for calculation of normalization factors to scale the raw library sizes~~ | ~~YES, if voom~~ | ~~“TMM”, “TMMwsp”, “RLE”, “upperquartile”, “none”. See edgeR::calcNormFactors for documentation (v. 3.26.5).~~ | | ~~voom_normalize_method~~ | ~~The microarray-style normalization method to be applied to the logCPM values (if any)~~ | ~~YES, if voom~~ | ~~“none”, “scale”, “quantile” or “cyclicloess”. See limma::voom and limma::normalizeBetweenArrays.~~ |
Quotes are not necessary around the values, both ‘primary_covs: Group’ and ‘primary_covs: “Group”’ are acceptable.
primary_covs: Group
adjust_covs: Cov1
test_method: lm
interact_covs: Cov2
To provide multiple values for certain parameters (for example,
adjust_covs
) use maps:
primary_covs: Group
adjust_covs:
- Cov1
- Cov2
test_method: lm
interact_covs: Cov2
~~If the input data is RNA-seq and normalization factors should be
calculated using edgeR::calcNormFactors
and the data should be
transformed to prepare for linear modeling using limma::voom
then the
following yaml formatting should be used:~~
primary_covs: Group
adjust_covs: Cov1
test_method: lm
interact_covs: Cov2
voom:
norm_factors_method: TMM
voom_normalize_method: none
The data should be organized in a named list with three components:
data
- expression data of class matrix, ~~EList or DGEList~~.gene_ann
- gene annotation data of class data frame. Number of
rows is expected to be equal to the number of rows in data
with
the names.sample_ann
- sample annotation data of class data frame. Number of
rows is expected to be equal to the number of columns in data
with
the same names.This is a basic example which shows you how to solve a common problem:
library(associationr)
## basic example code
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.