new_maf_dataset_wrapper: Constructor Objects of Class: *maf_dataset_wrapper*

View source: R/class_maf_dataset_wrapper.R

new_maf_dataset_wrapperR Documentation

Constructor Objects of Class: maf_dataset_wrapper

Description

maf_dataset_wrapper objects store the details of each dataset including the functions to download/load the data and its current status

Usage

new_maf_dataset_wrapper(
  maf_data_pool,
  display_name,
  short_name,
  unique_name,
  start_status,
  data_description,
  is_dataset_downloadable,
  function_to_download_data = function() {
     return(NA)
 },
  is_dataset_loadable = TRUE,
  function_to_load_data,
  name_of_data_source = "unknown",
  local_path_to_data = "",
  clinical_data = NA,
  datatype_of_stored_object = "",
  derived_from = NA,
  loaded_data = NA,
  rnaseq_filepath = NA,
  number_of_samples = NA
)

Arguments

maf_data_pool

A maf_data_pool object. Used to check supplied 'unique_name' is actually going to be unique. If not, characaters are appended to make it truly unique in the context of the supplied dataframe. (maf_data_pool)

display_name

Name that the end-user will see (string)

short_name

Abbreviated dataset name (string)

unique_name

Some unique identifier. (string)

start_status

one of: "not_downloaded","not_loaded", "ready" (string)

data_description

a description of the dataset (string)

is_dataset_downloadable

is the dataset downloadable? The alternative is if its packaged in a compressed form with the tool.

function_to_download_data

a function that when run will download the required data return the path to which it was downloaded if successful. Will return NA if it failed (function that returns string or NA). If is_dataset_downloadable is false, this is ignored (just use default)

is_dataset_loadable

is dataset loadable (flag)

function_to_load_data

a function that takes 'local_path_to_data' as its argument and returns the loaded maf object when complete. The function needs to take a single argument, but it doesn't actually have to use it. For example, when loading tcga data using the TCGAmutations package, this function could be function(filepath)maftools::tcgaLoad(). This function completely ignores the filepath argument but you NEED to include it anyway (function)

name_of_data_source

name of the data source. For Example "USER" or "TCGA" or "PCAWG" (string)

local_path_to_data

a path to data which will be configured based on function_to_download_data. If this option is configured ahead of time (string)

clinical_data

the clinical data of the object

datatype_of_stored_object

type of stored data object. Not used for anything right now, just interesting metadata. examples are \*.Rds or \*.mafs (string)

derived_from

the maf_dataset_wrapper_object from which the new object was derived. If the dataset was obtained directly from an online source, leave as NA (maf_dataset_wrapper or NA)

loaded_data

the loaded R object (MAF or NA)

rnaseq_filepath

the path to the rnaseq data (string)

number_of_samples

the number of samples in the cohort (integer)

Value

an object of type maf_dataset_wrapper (maf_dataset_wrapper)

All Properties

  • display_name

  • short_name

  • unique_name

  • status

  • data_description

  • download_data

  • load_data

  • name_of_data_source

  • local_path_to_data

  • datatype_of_stored_object

  • loaded_data

  • derived_from

  • rnaseq_filepath

  • number_of_samples


CCICB/CRUX documentation built on Jan. 28, 2024, 10:12 p.m.