This function takes a TCC object and returns a new TCC object
without genes having low count tags across samples.
The threshold is configurable with low.count parameter.
Usage
filterLowCountGenes(tcc, low.count = 0)
Arguments
tcc
TCC-class object.
low.count
numeric value (>= 0) specifying the threshold
for filtering genes. The higher value indicates the more
numbers of genes to be filtered out.
Value
TCC-class object consisting of genes whose sum of the counts
across samples is equal or higher than the low.count value.
Examples
# Filtering genes with zero counts across samples (default) from
# a hypothetical count dataset that originally has 1,000 genes.
data(hypoData)
group <- c(1, 1, 1, 2, 2, 2)
tcc <- new("TCC", hypoData, group)
dim(tcc$count)
tcc <- filterLowCountGenes(tcc)
dim(tcc$count)
# Filtering genes with 10 counts across samples from hypoData.
data(hypoData)
group <- c(1, 1, 1, 2, 2, 2)
tcc <- new("TCC", hypoData, group)
dim(tcc$count)
tcc <- filterLowCountGenes(tcc, low.count = 10)
dim(tcc$count)
Results
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(TCC)
Loading required package: DESeq
Loading required package: BiocGenerics
Loading required package: parallel
Attaching package: 'BiocGenerics'
The following objects are masked from 'package:parallel':
clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
clusterExport, clusterMap, parApply, parCapply, parLapply,
parLapplyLB, parRapply, parSapply, parSapplyLB
The following objects are masked from 'package:stats':
IQR, mad, xtabs
The following objects are masked from 'package:base':
Filter, Find, Map, Position, Reduce, anyDuplicated, append,
as.data.frame, cbind, colnames, do.call, duplicated, eval, evalq,
get, grep, grepl, intersect, is.unsorted, lapply, lengths, mapply,
match, mget, order, paste, pmax, pmax.int, pmin, pmin.int, rank,
rbind, rownames, sapply, setdiff, sort, table, tapply, union,
unique, unsplit
Loading required package: Biobase
Welcome to Bioconductor
Vignettes contain introductory material; view with
'browseVignettes()'. To cite Bioconductor, see
'citation("Biobase")', and for packages 'citation("pkgname")'.
Loading required package: locfit
locfit 1.5-9.1 2013-03-22
Loading required package: lattice
Welcome to 'DESeq'. For improved performance, usability and
functionality, please consider migrating to 'DESeq2'.
Loading required package: DESeq2
Loading required package: S4Vectors
Loading required package: stats4
Attaching package: 'S4Vectors'
The following objects are masked from 'package:base':
colMeans, colSums, expand.grid, rowMeans, rowSums
Loading required package: IRanges
Loading required package: GenomicRanges
Loading required package: GenomeInfoDb
Loading required package: SummarizedExperiment
Attaching package: 'DESeq2'
The following objects are masked from 'package:DESeq':
estimateSizeFactorsForMatrix, getVarianceStabilizedData,
varianceStabilizingTransformation
Loading required package: edgeR
Loading required package: limma
Attaching package: 'limma'
The following object is masked from 'package:DESeq2':
plotMA
The following object is masked from 'package:DESeq':
plotMA
The following object is masked from 'package:BiocGenerics':
plotMA
Loading required package: baySeq
Loading required package: abind
Loading required package: perm
Loading required package: ROC
Attaching package: 'TCC'
The following object is masked from 'package:edgeR':
calcNormFactors
> png(filename="/home/ddbj/snapshot/RGM3/R_BC/result/TCC/filterLowCountGenes.Rd_%03d_medium.png", width=480, height=480)
> ### Name: filterLowCountGenes
> ### Title: Filter genes from a TCC-class object
> ### Aliases: filterLowCountGenes
> ### Keywords: methods
>
> ### ** Examples
>
> # Filtering genes with zero counts across samples (default) from
> # a hypothetical count dataset that originally has 1,000 genes.
> data(hypoData)
> group <- c(1, 1, 1, 2, 2, 2)
> tcc <- new("TCC", hypoData, group)
> dim(tcc$count)
[1] 1000 6
> tcc <- filterLowCountGenes(tcc)
> dim(tcc$count)
[1] 996 6
>
> # Filtering genes with 10 counts across samples from hypoData.
> data(hypoData)
> group <- c(1, 1, 1, 2, 2, 2)
> tcc <- new("TCC", hypoData, group)
> dim(tcc$count)
[1] 1000 6
> tcc <- filterLowCountGenes(tcc, low.count = 10)
> dim(tcc$count)
[1] 837 6
>
>
>
>
>
> dev.off()
null device
1
>