preprocessBEclear: preprocessBEclear

View source: R/preprocessBEclear.R

preprocessBEclearR Documentation

preprocessBEclear

Description

this methods does some preprocessing steps for the later methods like removing rows containing only missing values

Usage

preprocessBEclear(data, samples)

Arguments

data

any matrix filled with beta values, column names have to be sample_ids corresponding to the ids listed in "samples", row names have to be gene names.

samples

data frame with two columns, the first column has to contain the sample numbers, the second column has to contain the corresponding batch number. Colnames have to be named as "sample_id" and "batch_id".

Details

Here we describe the preprocessing steps in the order they are executed:

  • Values below 0 or above 1 are set to NA, as the other methods expect methylation beta values

  • columns that only contain NAs are removed

  • rows that only contain NAs are removed

  • samples that are present in the data, but are not annoted in the samples are removed. If this is the case with your data-set, please check those samples.

  • samples that are annoted but not in the data matrix are removed

  • if there are duplicate sample names in the data matrix, all sample names get replaced through a new unique ID. In this case a data.table containing the mapping is returned as well

Value

a list containing the processed data and samples and a data.table containing mappings from the original sample names to the new ones. If sample names weren't changed this third object is NULL

Examples

data(BEclearData)
res <- preprocessBEclear(ex.data, ex.samples)

David-J-R/BEclear documentation built on April 17, 2023, 2:19 p.m.