Learn R Programming

SIM (version 1.42.0)

assemble.data: Assemble the data to run the integrated analysis

Description

Assembles the dependent and independent data and annotation of the both data sets.

Usage

assemble.data(dep.data, indep.data, dep.id = "ID", dep.chr = "CHROMOSOME", dep.pos = "STARTPOS", dep.ann = NULL, dep.symb, indep.id = "ID", indep.chr = "CHROMOSOME", indep.pos = "STARTPOS", indep.ann = NULL, indep.symb, overwrite = FALSE, run.name = "analysis_results")

Arguments

dep.data
The dependent data (data.frame), along with annotations. Each row should correspond to one feature. The following columns are expected to exist, and the column names should be inserted in the function. dep.id: A unique identifier. dep.chr: The number of the chromosome (1,2, ..., 22, X, Y). dep.pos: The base pair position, relative to the chromosome. dep.symb: Gene symbol (optional). dep.ann: Annotation can be multiple columns.
indep.data
data.frame The independent data, along with annotations. Each row should correspond to one feature. The following columns are expected to exist, and the column names should be inserted in the function. indep.id: A unique identifier. indep.chr: The number of the chromosome (1,2, ..., 22, X, Y). indep.pos: The base pair position, relative to the chromosome. indep.symb: Gene symbol (optional). indep.ann: Annotation can be multiple columns.
dep.ann
vector with either the names of the columns or the column numbers in the dependent data that contain the annotation.
indep.ann
vector with either the names of the columns or the column numbers in the independent data that contain the annotation.
dep.id
vector with the column name in the dependent data that contains the ID. Will be used in the sim.plot.zscore.heatmap function. Empty ID's will be substituted by NA.
dep.chr
vector with column name in the dependent data that contains the chromosome numbers.
dep.pos
vector with the column name in the dependent data that contains the position on the chromosome in bases.
dep.symb
Optional, either missing or a single vector with the column name in the dependent data that contains the symbols. Will be used in sim.plot.zscore.heatmap as label.
indep.id
vector with the column name in the independent data that contains the ID. Will be used in the sim.plot.zscore.heatmap function. Empty ID's will be substituted by NA.
indep.chr
vector with the column name in the independent data that contains the chromosome numbers.
indep.pos
vector with the column name in the independent data that contains the position on the chromosome in bases.
indep.symb
Optional, either missing or a vector with the column name in the dependent data that contains the Symbols. Will be used in sim.plot.zscore.heatmap as label.
overwrite
logical, indicate when a run.name is already present, the results can be overwritten.
run.name
Name of the analysis. The results will be stored in a folder with this name in the current working directory (use getwd() to print the current working directory). If the missing, the default folder "analysis_results" will be generated.

Value

No values are returned. Instead, the datasets and annotation columns are stored in separate files in the data folder in the directory specified in run.name. If assemble.data has run succesfully, the integrated.analysis function can be performed.

Details

Based on the chromosome and probe position an absolute position is calculated according to $chromosome number * 1e9 + probe position$. Chromosome column is converted to factor and releveled according to the levels of the chrom.table, so the only levels allowed are c(1:22, "X", "Y"). Currently only human genome support without mitochondrial DNA.

See Also

SIM, integrated.analysis

Examples

Run this code
#load the datasets and the samples to run the integrated analysis
data(expr.data)
data(acgh.data)
data(samples) 
         
#assemble the data
assemble.data(dep.data = acgh.data, 
              indep.data = expr.data,              
              dep.id="ID", 
              dep.chr = "CHROMOSOME",
              dep.pos = "STARTPOS",
              dep.ann = colnames(acgh.data)[1:4],    
              dep.symb="Symbol",                          
              indep.id="ID",
              indep.chr = "CHROMOSOME", 
              indep.pos = "STARTPOS",
              indep.ann = colnames(expr.data)[1:4], 
              indep.symb="Symbol",                
              overwrite = TRUE,
              run.name = "chr8q")

Run the code above in your browser using DataLab