features_greater_than: Count the number of features(genes) greater than x in a data...

View source: R/expt.R

features_greater_thanR Documentation

Count the number of features(genes) greater than x in a data set.

Description

Sometimes I am asked how many genes have >= x counts. Well, here you go.

Usage

features_greater_than(data, cutoff = 1, hard = TRUE, inverse = FALSE)

Arguments

data

Dataframe/exprs/matrix/whatever of counts.

cutoff

Minimum number of counts.

hard

Greater-than is hard, greater-than-equals is not.

inverse

when inverted, this provides features less than the cutoff.

Details

Untested as of 2016-12-01 but used with Lucia. I think it would be interesting to iterate this function from small to large cutoffs and plot how the number of kept genes decreases.

Value

A list of two elements, the first comprised of the number of genes greater than the cutoff, the second with the identities of said genes.

See Also

[Biobase]

Examples

## Not run: 
 features <- features_greater_than(expt)
 fewer <- features_greater_than(expt, cutoff = 100)

## End(Not run)

elsayed-lab/hpgltools documentation built on May 9, 2024, 5:02 a.m.