preparerewiring {TraRe} | R Documentation |
Prepare neccessary files for running runrewiring()
preparerewiring( name = "defaultname", linker_output_p, lognorm_est_counts_p = NULL, SEObject_p = NULL, gene_info_p = NULL, phenotype_p = NULL, nassays = 1, final_signif_thresh = 0.001, regulator_info_col_name = "regulator", phenotype_col_name = "Class", phenotype_class_vals_string = "NR,R", phenotype_class_vals_string_label = "0,1", orig_test_perms = 100, retest_thresh = 0.08, retest_perms = 1000, outdir = tempdir(), nrcores = 3 )
name |
Desired name of the folder which is generated. The chosen
threshold will be |
linker_output_p |
Output file from linker function path. RDS format is required. |
lognorm_est_counts_p |
Lognorm counts of the gene expression matrix path. |
SEObject_p |
SummarizedExperiment objects path. |
gene_info_p |
path of a two-column file containing genes and 'regulator' boolean variable. |
phenotype_p |
path of a two-column file containing used samples and Responder or No Responder 'Class' (NR,R). |
nassays |
name of assays in case SummarizedObject is provided. |
final_signif_thresh |
Significance threshold for the rewiring method. The lower the threshold, the restrictive the method. |
regulator_info_col_name |
Column name of the gene_info_p. By default, 'regulator'. |
phenotype_col_name |
Column name of the phenotype_p. By default, 'Class'. |
phenotype_class_vals_string |
Boolean terms of the phenotype_p at the 'Class' column. By default, (NR,R). |
phenotype_class_vals_string_label |
Boolean terms of the phenotype_p values at the 'Class' column. By default (0,1) |
orig_test_perms |
Initial permutations for first test (default: 100) . |
retest_thresh |
Threshold if a second test is performed (default: 0.08) . |
retest_perms |
Permutations if a second test is performed (default: 1000) . |
outdir |
Directory for the output folder to be located (default: tempdir()) |
nrcores |
Number of cores to run the parallelization within the rewiring test (default: 3). |
Return a list containing: LINKER's output, expression matrix, boolean array from phenotype file, array containing number of c(R,NR) samples, significance threshold and output directory.
## We are going to prepare 4 files that we have in the example folder: the output from LINKER, the ## gene expression matrix, the phenotype file and the gene info file. Note that the LINKER ## output is generated from the gene expression matrix. Note: if rewiring across more than 1 dataset ## is desired, paths will be given as arrays. (i.e. linker_output <- c(path1,path2)) linker_output_p <- paste0(system.file('extdata',package='TraRe'),'/linker_rewiring_example.rds') lognorm_est_counts_p <- paste0(system.file('extdata',package='TraRe'), '/expression_rewiring_example.txt') gene_info_p <- paste0(system.file('extdata',package='TraRe'),'/geneinfo_rewiring_example.txt') phenotype_p <- paste0(system.file('extdata',package='TraRe'),'/phenotype_rewiring_example.txt') outdir <- system.file('extdata',package='TraRe') prepared <- preparerewiring(name='example',linker_output_p=linker_output_p, lognorm_est_counts_p=lognorm_est_counts_p,gene_info_p=gene_info_p, phenotype_p=phenotype_p,final_signif_thresh=0.05, nrcores=1,outdir=outdir)