iBAG_data: iBAG_data

iBAG_dataR Documentation

iBAG_data

Description

R6 class to store and manage the iBAG data. This does not contain or manage model result data.

Usage

iBAG_data$new()

iBAG_data$new()$get.data()

iBAG_data$new()$get.mrna()

iBAG_data$new()$get.outcome()

iBAG_data$new()$get.n_data()

iBAG_data$new()$get.n_patients()

iBAG_data$new()$get.patients()

iBAG_data$new()$get.n_genes()

iBAG_data$new()$get.genes()

iBAG_data$new()$get.data_names()

Methods

Public methods


Method new()

constructor

Usage
iBAG_data$new(
  mrna = iBAG::demo_mrna,
  outcome = iBAG::demo_outcome,
  data = list(cnv = iBAG::demo_cnv, meth = iBAG::demo_meth),
  DEBUG = FALSE,
  validate = TRUE,
  one_val_per_gene = TRUE,
  data.name.sep = "_",
  default.data.name = "data",
  ...
)
Arguments
mrna

(iBAG::demo_mrna) dataframe of mrna data

outcome

(iBAG::demo_outcome) dataframe of outcome data

data

(list(cnv = iBAG::demo_cnv, meth = iBAG::demo_meth)) list of upstream data

DEBUG

(FALSE) initialize object in DEBUG mode

validate

(TRUE) to validate the data supplied. Will raise Error if data is not valid.

one_val_per_gene

(TRUE) whether all the upstream data has 1 column per gene or not.

data.name.sep

("_") the default character seperator for collisions in names

default.data.name

("data") the default upstream dataset name. Only applied in get.data.names

...

: ... get.data


Method get.data()

get the dataset specified by user

Usage
iBAG_data$get.data(index = NULL)
Arguments
index

(NULL): index of the dataset to return. Can either be integer or string. if null, return list.

Returns

dataframe of the requested dataset or list of all dataframes

TODO: address not found/out of bounds conditions get.mrna


Method get.mrna()

get the mrna dataset

Usage
iBAG_data$get.mrna()
Returns

dataframe get.outcome


Method get.outcome()

get the outcome dataset

Usage
iBAG_data$get.outcome()
Returns

dataframe get.n_data


Method get.n_data()

get the number of upstream datasets

Usage
iBAG_data$get.n_data()
Returns

numeric (integer) get.n_patients


Method get.n_patients()

get the number of patients in dataset

Usage
iBAG_data$get.n_patients()
Returns

numeric (integer)


Method get.patients()

get a vector of patients in dataset

Usage
iBAG_data$get.patients()
Returns

vector of numeric or strings get.n_genes


Method get.n_genes()

get the number of genes in dataset

Usage
iBAG_data$get.n_genes()
Returns

numeric (integer) get.genes


Method get.genes()

get a vector of genes in dataset

Usage
iBAG_data$get.genes()
Returns

vector of numeric or strings get.data_names


Method get.data_names()

gets a list of datanames from data. Does some error handling.

Usage
iBAG_data$get.data_names()
Returns

vector of string refering to names


Method clone()

The objects of this class are cloneable with this method.

Usage
iBAG_data$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.


cvraut/iBAGpkg documentation built on July 26, 2022, 9:55 p.m.