CSpermute {CSFA}  R Documentation 
Apply permutation on MFA or Zhang results to obtain pvalues of 1 of the components. The function asks for a CSresult object which is returned by CSanalysis. The CSpermute function will return the same CSresult object with added information such as pvalues. If asked, the CSpermute function will also draw a volcanoplot and/or histograms of the pvalues. If you simply want to redraw these plots, simply use the returned CSresult object by CSpermute again in the CSpermute function. If the number of permutations was not changed, this will prevent the entire permutation analysis from being redone.
CSpermute(querMat, refMat, CSresult, B = 500, mfa.factor = NULL, method.adjust = "none", verbose = TRUE, which = c(1, 3), cmpd.hist = NULL, color.columns = NULL, labels = TRUE, plot.type = "device", basefilename = NULL, MultiCores = FALSE, MultiCores.number = detectCores(logical = FALSE), MultiCores.seed = NULL, save.permutation = TRUE)
querMat 
Query matrix (Rows = genes and columns = compounds). 
refMat 
Reference matrix 
CSresult 
A CSresult class object. 
B 
Number of permutations. 
mfa.factor 
If permuting a CSmfa result, mfa.factor will decide of which factor the pvalues should be computed. If 
method.adjust 
Correction method of multiplicity adjusted pvalues: "none", "holm", "hochberg", "hommel", "bonferroni", "BH", "BY" or "fdr". (Raw pvalues are also always provided) 
verbose 
If 
which 
Choose which plot to draw:

cmpd.hist 
Reference index vector which decides which reference compounds are plotted for the histogram distribution under null hypothesis ( 
color.columns 
Option to color the compounds on the volcano plot ( 
labels 
Boolean value (default=TRUE) to use row and/or column text labels in the volcano plots ( 
plot.type 
How should the plots be outputted? 
basefilename 
Directory including filename of the graphs if saved in pdf files 
MultiCores 
Logical value parallelisation should be used for permutation. 
MultiCores.number 
Number of cores to be used for 
MultiCores.seed 
Seed to be used for 
save.permutation 
Logical value if the scores (CLoadings, CRankingScores, ZG Scores) of each permuted data set should be saved (default= 
IMPORTANT! For MFA, CSpermute
should only be used to compute the pvalues of the Component in which the structure (loadings) of the queries is the strongest.
This because in each permutation the factor with the highest average query loadings will be chosen.
The ability to compute pvalues of other factors (in which the query set also increased loadings) will be added in a later release.
Returns the same CSresultclass
object with added pvalues to the CS slot and added information to the permutation.object slot. This CSresult can be reused in CSpermute to redraw the plots without calculation.
data("dataSIM",package="CSFA") Mat1 < dataSIM[,c(1:6)] Mat2 < dataSIM[,c(1:6)] MFA_analysis < CSanalysis(Mat1,Mat2,"CSmfa") MFA_analysis < CSpermute(Mat1,Mat2,MFA_analysis,B=200)