Description Usage Arguments Details Value See Also
View source: R/corrPairsMSIchunks.R
Calculate correlations of pairs of mass peaks from MSI data (imported to
R with the msimat
function). The list of pairs is supplied
as a data.frame with the parameter pairs
, but is broken up into
"chunks" for processing, to avoid going over a specified memory limit.
1 2 3 |
d |
msimat; MSI data with peaks as columns and pixels as rows,
output from |
diff |
massdiff; List of mass differences, parent and putative adduct
ions, as produced by function |
p.val |
numeric; p-value cutoff (before Bonferroni correction) (default: 0.05) |
method |
string; Method to use for |
alternative |
string; Which alternative for |
ncores |
integer; Number of cores if using parallel version. Default is total number of cores minus one. |
mem.limit |
integer; Memory limit estimate (in Gb). (default: 5) |
... |
Other parameters to pass to |
This function is otherwise equivalent to corrPairsMSI
with
option how="parallel"
. It uses forking processes and is therefore not
suitable for Windows systems. The memory requirement is estimated
conservatively but has only been tested empirically (i.e. the process might
go over the limit in practice).
Example usage scenario for this function: Mass differences for all pairwise
combinations of masses are tabulated with massdiff
, and the
peak pairs corresponding to a specific adduct of interest are extracted with
diffGetPeaks
. Check which peaks are significantly correlated to
each other with this function.
Correlation is calculated with cor.test
function and by default
uses the Pearson method (two-sided, because correlations can be both positive
and negative). The Bonferroni correction is applied to the p-values before
assessing significance, but the original p-value is reported in column
"P.value" and can be used e.g. for false discovery rate analysis.
Object of class data.frame with the following fields:
A - First peak mass in each pair
B - Second peak mass in the pair
Estimate - Estimated correlation
P.value - P-value for the correlation
Significance - Whether p-value meets cutoff (specified by "p.val", with Bonferroni correction)
corrPairsMSI
function which does not split input into
chunks.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.