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.
1 2 3 |
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: |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.