calc_mp: Calculate mp-values

Description Usage Arguments

View source: R/calc_mp.R

Description

Calculate multidimensional perterbation value (mp-value) as described in Hutz et al.. Briefly, the mp-value can be used to determine whether any two treatments differ from each other and is similar in spirit to the p-value. This function was written by Hutz *et al.*.

Minor changes to the code and additional comments added are identified by a 'LL' next to the change.

Usage

1
2
3
calc_mp(dataset, txlabels, batchlabels, datacols, negctrls,
  allbyall = FALSE, dirprefix, outfile = "all_mp-values.txt",
  loadingsout = FALSE, pcaout = FALSE, gammaout = FALSE)

Arguments

dataset

Dataframe containing all data where each row is a sample and each columns is a feature/variable.

txlabels

Name of the column containing the treatment labels, as string. Each desired treatment group should have a unique label, within each batch (e.g. a treatment can have the same label in each batch as long as within one batch, the label uniquely identifies the treatment).

batchlabels

Name of the column containing the batch labels, as string

datacols

Vector of the column indicies that contain the feature/variable data to be used for calculating the mp-value.

negctrls

The name of the negative controls, in the 'txlabels' column, as string.

allbyall

Logical indicating whether to do all treatment-treatment comparisons (TRUE) or only treatment-control comparisons.

dirprefix

Path to the directory to store results in, as string. Do not include the trailing '/' at the end. This path will be created if it does not already exist.

outfile

Name of the file to save all the mp-values, as string.

loadingsout

Logical indicating whether the PCA loadings (eigenvectors) should be output.

pcaout

Logical indicating whether to output PCA values.

gammaout

Logical indicating whether to output gamma distribution parameters, p-value of goodness of fit and sample p-value according to the fit distribution. NOTE: When gammaout=TRUE, warnings like these may be displayed:


lucyleeow/CellProfileR documentation built on May 21, 2019, 2:30 a.m.