data.validate.genes: data.validate.genes

View source: R/process.R

data.validate.genesR Documentation

data.validate.genes

Description

Validates mrna and upstream data to ensure genes match.

Usage

data.validate.genes(mrna,data)

For each dataset the patient vector is assumed to be the rownames.

Arguments

mrna

:mrna data (follow convention of demo_mrna)

data

:list of other dataframes (follow demo conventions)

sep

("_"): the character seperator to use to differentiate mutliple columns of data per gene

DEBUG

FALSE: flag to print debug statements

Details

This function checks:

  • all genes are unique in mrna

  • all columns are unique across all datasets

  • given an upstream data platform:

    • for each gene in mrna there is at least 1 gene present

    • upstream platforms do not contain genes which are not present in mrna

A match across gene makes use of the sep argument. First a regex is constructed from the mrna such as r"GENE(SEP.+)?" then all gene data is found by matching this pattern.

Note: gene names are automatically converted to strings

Note: SEP should not be able to be found in any of the genes from mrna (auto-fail if sep="")

Note: if SEP == NULL then this method will perform perfect matches similar to data.validate.patient

Note: the order of the genes don't have to match, but it is important that the contents do.

Value

boolean: whether this set of iBAG data is valid for the genes only


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