make_layer: Creates individual molecular layers from raw data and unique...

Description Usage Arguments Value Examples

View source: R/pipeline_functions.R

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 start_pipeline.

Usage

1
2
3
4
5
6
7
make_layer(
  name,
  data_group1,
  data_group2,
  identifier_group1,
  identifier_group2
)

Arguments

name

Character string. Names the layer.

data_group1, data_group2

Data frame containing raw molecular data of each group (each stratum). Analyzed components (e.g., genes) in columns, samples (e.g. patients) in rows.

identifier_group1, identifier_group2

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 dataset for one layer), that can be supplied to start_pipeline and 'name' giving the name of the layer. Each sublist contains the 'data' and the 'identifiers'.

Examples

1
2
3
4
5
6
data(mrna_data)

mrna_layer <- make_layer(name="mrna", data_group1=mrna_data$group1$data,
data_group2=mrna_data$group2$data,
identifier_group1=data.frame(gene_name=mrna_data$group1$identifiers),
identifier_group2=data.frame(gene_name=mrna_data$group2$identifiers))

molnet-org/molnet documentation built on Dec. 21, 2021, 8:59 p.m.