Runs the full DiPALM pipeline with replicate permutation in parallel.
Description
The DiPALM pipeline uses timecourse gene expression data to test whether genes exhibit a differential pattern of expression between two treatments. The method is sensitive to the labeling of replicates which is typically arbitrary and thus unrelated between different timepoints. This function runs the pipeline a specified number of times in parallel and on each individual invocation of the pipeline permutes replicates separately within each timepoint.
Usage
main( expr.file, threads, wgcna.power, iterations, p.value, sig.ratio, col.format = "[TREATMENT].[REPLICATE].[TIME]", ctrl.treatment = c(), file.patt = "%d.dipalm.RData", tmpdir = ".", logdir = "logs", clear.old.files = FALSE )main( expr.file, threads, wgcna.power, iterations, p.value, sig.ratio, col.format = "[TREATMENT].[REPLICATE].[TIME]", ctrl.treatment = c(), file.patt = "%d.dipalm.RData", tmpdir = ".", logdir = "logs", clear.old.files = FALSE )
Arguments
expr.file |
Name of a csv file containing gene expression data.
Columns in the file represent samples and the column names should prescribe to the format specified in the argument |
threads |
An integer vector of length one or two giving the number of processes to use for computation.
The first entry specifies the number of separate processes used to run the DiPALM pipeline (i.e. to call the function |
wgcna.power |
Soft thresholding power used with the function |
iterations |
The number of iterations of the DiPALM pipeline to perform. |
p.value |
A |
sig.ratio |
A proportion specifying how many iterations a gene must be called significant in to be considered significant in the final results. For example, when |
col.format |
A format string that uses placeholders to describe the column format. Samples are grouped by treatment, time and replicate and these groupings are denoted by the placeholders
|
ctrl.treatment |
Name of the control treatment. |
file.patt |
A pattern describing how the files storing the outputs of the individual iterations are named.
In the pattern the string |
tmpdir |
Directory to store the outputs of the individual iterations. |
logdir |
Directory to write log files to.
These log files record some information which may be useful when debugging user code or other issues such as corrupted outputs.
The name of logfiles include the function the log file was generated by, including an iteration number for the function |
clear.old.files |
Whether to remove any output files from previous invocations of this function meaning the files recording the results of the individual iterations of the DiPALM pipeline. Log files are never cleared. When this argument is false output files are kept only if the arguments match. As a special case, a hash of the matrix containing gene expression is also recorded. Thus, if the gene expression data is different between invocations of this function the output files will not be kept even if all arguments (including the file name for the gene expression data) are the same. |
Value
Returns the result of calling joinOutputs on the files containing the iteration outputs. This is a list with the following values:
AdjkMEs |
Conjoined adjusted kME matrix. The matrix has columns indexed by the individual invocations of the function |
AdjMed |
Conjoined adjusted kMEd matrix. This has the same form as the component |
patternCor |
Conjoined pattern correlation matrix. Both rows and columns are indexed by the genes called significant with respect to kMEs by this function; that is, by genes that were called significant in at least |
sig.genes |
A vector of genes found to exhibit differential pattern of expression disregarding magnitude of expression (i.e. "kME" genes) in at least |
sig.Medgenes |
A vector of genes found to exhibit differential pattern of expression when considering magnitude (i.e. "kMed" genes) using the same conventions as for the return value |
Author(s)
William Gustafson
Examples
data("smallTestData"); expr.file<-tempfile(); dipalm.dir<-tempdir(); logdir<-tempdir(); write.csv(smallTestData,file=expr.file); main( expr.file, 2, 7, 2, 0.05, 0.9, '[TREATMENT].[REPLICATE].[TIME]', 'CTL', tmpdir=dipalm.dir, logdir=logdir );data("smallTestData"); expr.file<-tempfile(); dipalm.dir<-tempdir(); logdir<-tempdir(); write.csv(smallTestData,file=expr.file); main( expr.file, 2, 7, 2, 0.05, 0.9, '[TREATMENT].[REPLICATE].[TIME]', 'CTL', tmpdir=dipalm.dir, logdir=logdir );