Description Usage Arguments Value Slots Methods (by generic) Functions
Welcome to the propd method!
Let X and Y be non-zero positive feature vectors measured across N samples belonging to one of two groups, sized N1 and N2. We use VLR to denote the variance of the log of the ratio of the vectors X over Y. We define theta as the weighted sum of the within-group VLR divided by the weighted total VLR.
The propd method calculates theta. This fails in
the setting of zero counts. The propd method
will use a Box-Cox transformation to approximate VLR based on
the parameter α, if provided. We refer the user to
the vignette for more details.
Note that Group 1 always refers to the first element of the
group vector argument supplied to propd.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | ## S4 method for signature 'propd'
show(object)
propd(counts, group, alpha, p = 100, weighted = FALSE)
setActive(propd, what = "theta_d")
setDisjointed(propd)
setEmergent(propd)
updateCutoffs.propd(object, cutoff = seq(0.05, 0.95, 0.3))
updateF(propd, moderated = FALSE, ivar = "clr")
|
object |
A |
counts |
A data.frame or matrix. A "count matrix" with subjects as rows and features as columns. Note that this matrix does not necessarily have to contain counts. |
group |
A character vector. Group or sub-group memberships,
ordered according to the row names in |
alpha |
A double. See vignette for details. Leave missing to skip Box-Cox transformation. |
p |
An integer. The number of permutation cycles. |
weighted |
A boolean. Toggles whether to calculate
theta using |
propd |
A |
what |
A character string. The theta type to set active. |
cutoff |
For |
moderated |
For |
ivar |
A numeric scalar. Specifies reference feature(s) for additive log-ratio transformation. The argument will also accept feature name(s) instead of the index position(s). Set to "iqlr" to use inter-quartile log-ratio transformation. Ignore to use centered log-ratio transformation. |
Returns a propr object.
countsA data.frame. Stores the original "count matrix" input.
alphaA double. Stores the alpha value used for transformation.
groupA character vector. Stores the original group labels.
weightedA logical. Stores whether the theta is weighted.
weightsA matrix. If weighted, stores the limma-based weights.
activeA character. Stores the name of the active theta type.
FivarANY. Stores the reference used to moderate theta.
dfzA double. Stores the prior df used to moderate theta.
resultsA data.frame. Stores the pairwise propd measurements.
permutesA data.frame. Stores the shuffled group labels,
used to reproduce permutations of propd.
fdrA data.frame. Stores the FDR cutoffs for propd.
show: Method to show propd object.
setActive:
Build analyses and figures using a specific theta type. For
example, set what = "theta_d" to analyze disjointed
proportionality and what = "theta_e" to analyze
emergent proportionality.
setDisjointed:
A wrapper for setActive(propd, what = "theta_d").
setEmergent:
A wrapper for setActive(propd, what = "theta_e").
updateCutoffs:
Use the propd object to permute theta across a
number of theta cutoffs. Since the permutations get saved
when the object is created, calling updateCutoffs
will use the same random seed each time.
updateF:
Use the propd object to calculate the F-statistic
from theta as described in the Erb et al. 2017 manuscript
on differential proportionality. Optionally calculates a
moderated F-statistic using the limma-voom method. Supports
weighted and alpha transformed theta values.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.