filterDataTable: Apply various filters on the observations and variables of a...

Description Usage Arguments Author(s) Examples

View source: R/filter_data_table.R

Description

Apply various filters on the individuals (e.g. biological samples) and features (e.g. genes, transcripts, ...) of a count table in order to prepare it for classification.

Usage

1
filterDataTable(rawCounts, draw.plot = TRUE)

Arguments

countsWithClasses

an object of the class DataTableWithClasses. This object contains the data table + the parameters (including filtering parameters).

draw.plot=TRUE

if TRUE, draw an histogram of variance per feature.

plot.heigh=NULL

htigh of the pdf plot. If NULL, computed autopatically depending on the number of panels.

Author(s)

Mustafa AbuElQumsan and Jacques van Helden

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
## Load a data set
countdata <- loadRecountExperiment(recountID = "SRP048759", mergeRuns = TRUE)
dataTable <- t(countdata$merged$sampleCounts)
phenoTable <- countdata$merged$samplePheno

# Run the filtering
filteredData <- filterDataTable(dataTable, phenoTable, classColumn="tissue")

# Replace unfiltered data by filtered data
dataTable <- filteredData$dataTable
phenoTable <- filteredData$phenoTable
classLabels <- filteredData$classLabels

## Filter a dataset and build classLabels based on 2 columns
countdata <- loadRecountExperiment(recountID = "SRP057196", mergeRuns = TRUE)
dataTable <- t(countdata$merged$sampleCounts)
phenoTable <- countdata$merged$samplePheno

#' # Run the filtering
filteredData <- filterDataTable(dataTable, phenoTable, classColumn=c("tissue", "cell.type"), minSamplesPerClass=5)
table(filteredData$classLabels)

elqumsan/RNAseqMVA documentation built on March 10, 2021, 8:10 a.m.