make_layer {DrDimont} | R Documentation |
Creates individual molecular layers from raw data and unique identifiers
Description
Helper function to transform input data to required pipeline input format. Additionally, the
supplied input is checked. Allows easy conversion of raw data into the structure accepted by
run_pipeline
.
Usage
make_layer(
name,
data_groupA,
data_groupB,
identifiers_groupA,
identifiers_groupB
)
Arguments
name |
[string] Name of the layer. |
data_groupA , data_groupB |
[data.frame] Data frame containing raw molecular data of each group (each stratum). Analyzed components (e.g. genes) in columns, samples (e.g. patients) in rows. |
identifiers_groupA , identifiers_groupB |
[data.frame] Data frame containing component identifiers (columns) of each component (rows) in the same order as the molecular data frame of each group. These identifiers are used to (a) interconnect graphs and (b) match drugs to drug targets. Must contain a column 'type' which identifies the nature of the component (e.g., "protein") |
Value
Named list containing the supplied data for each group (i.e., the data set for one
layer), that can be supplied to run_pipeline
and 'name' giving the name of the
layer. Each sub-list contains the 'data' and the 'identifiers'.
Examples
data(protein_data)
example_protein_layer <- make_layer(
name="protein",
data_groupA=protein_data$groupA[, c(-1,-2)],
data_groupB=protein_data$groupB[, c(-1,-2)],
identifiers_groupA=data.frame(
gene_name=protein_data$groupA$gene_name,
ref_seq=protein_data$groupA$ref_seq),
identifiers_groupB=data.frame(
gene_name=protein_data$groupB$gene_name,
ref_seq=protein_data$groupB$ref_seq))