Description Usage Arguments Author(s) Examples
View source: R/filter_data_table.R
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.
1 | filterDataTable(rawCounts, draw.plot = TRUE)
|
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. |
Mustafa AbuElQumsan and Jacques van Helden
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.