genefilter
Dependencies & Environment
Package-intrinsic requirements from the Bioconductor landing page — reproduce in any R environment.
- Version: 1.94.0 · Bioconductor: 3.23 · R: ≥ 4.6
- Depends: AnnotationDbi, annotate, Biobase, survival
- Imports: MatrixGenerics, AnnotationDbi, annotate, Biobase, survival
- System requirements: URL
- Install:
BiocManager::install("genefilter")
When to Use
- Filtering genes from a microarray or expression dataset according to specific or non-specific filtering mechanisms using
genefilter.
- Selecting genes that have an expression measure above a certain threshold in at least a minimum number of samples using
kOverA.
- Finding genes that are close to specific genes of interest based on distance measures using
genefinder.
- Performing independent filtering to adjust p-values and increase power using
filtered_p and filtered_R.
When NOT to Use
- For modern RNA-seq count-based differential expression; use
DESeq2 or edgeR built-in filtering because they are optimized for negative binomial distributions.
- For single-cell RNA-seq data; use
scran or Seurat because they handle high sparsity and dropout rates better than basic variance/mean filters.
Data Requirements
- Input expression data typically provided as an
ExpressionSet object (e.g., from the Biobase package) or a numeric matrix.
- Covariates or sample metadata (e.g., factors with two levels) for specific filtering like
ttest.
Key Parameters
- k (5): The minimum number of samples required to exceed the threshold in
kOverA.
- A (200): The expression measure threshold in
kOverA.
- method ("euc"): The distance measure used in
genefinder (e.g., "euc", "maximum", "manhattan").
- scale ("none"): Controls the scaling of the rows in
genefinder (e.g., "none", "range", "zscore").
- theta (0.5): The filtering fraction/threshold used in
filtered_p and filtered_R.
- p (0.1): The p-value threshold used in
ttest for specific filtering.
Best Practices
- Assemble individual filtering criteria (like
kOverA or ttest) into a combined filtering function using filterfun before applying it with genefilter.
- Use
rowSds, rowVars, or rowttests for fast row-wise statistical calculations on expression matrices.
- Visualize the effect of filtering on multiple testing adjustments using
rejection_plot or filter_volcano.
Common Pitfalls
- Biased multiple testing: Using a specific filter (e.g., differential expression p-values) before applying multiple testing correction. Fix: Use non-specific filters (like overall variance via
rowVars) for independent filtering.
- Scale dominance in distance metrics: Finding nearest genes with
genefinder without scaling can be dominated by overall expression magnitude. Fix: Set scale="zscore" or scale="range" in genefinder to normalize row variances.
- Slow row-wise operations: Using
apply with standard t.test or var on large matrices. Fix: Use the optimized rowttests, rowSds, and rowVars functions provided by the package.
Alternatives
DESeq2: For RNA-seq independent filtering integrated directly into the results extraction.
edgeR: Provides filterByExpr which is specifically designed for count-based library size adjustments.
matrixStats: For fast row/column-wise statistics if filtering functions are not needed.
Citations
- Bourgon R, Gentleman R, Huber W. (2010). "Independent filtering increases power for detecting differentially expressed genes." Proceedings of the National Academy of Sciences.
References
- Homepage: bioconductor.org/packages/genefilter
- Vignette: vignette_0_5fb6bf3b.txt
Run this on BioMate
This skill is the knowledge layer — when, why, and how to use genefilter. To run this analysis on your own data with managed compute, automated QC, and reproducible outputs, use BioMate — free to start.
▶ Open genefilter on BioMate →
1---2name: bioconductor-genefilter3description: Some basic functions for filtering genes.4---56# genefilter78## Dependencies & Environment910> Package-intrinsic requirements from the Bioconductor landing page — reproduce in any R environment.1112- **Version:** 1.94.0 · **Bioconductor:** 3.23 · **R:** ≥ 4.613- **Depends:** AnnotationDbi, annotate, Biobase, survival14- **Imports:** MatrixGenerics, AnnotationDbi, annotate, Biobase, survival15- **System requirements:** URL16- **Install:** `BiocManager::install("genefilter")`1718## When to Use19- Filtering genes from a microarray or expression dataset according to specific or non-specific filtering mechanisms using `genefilter`.20- Selecting genes that have an expression measure above a certain threshold in at least a minimum number of samples using `kOverA`.21- Finding genes that are close to specific genes of interest based on distance measures using `genefinder`.22- Performing independent filtering to adjust p-values and increase power using `filtered_p` and `filtered_R`.2324## When NOT to Use25- For modern RNA-seq count-based differential expression; use `DESeq2` or `edgeR` built-in filtering because they are optimized for negative binomial distributions.26- For single-cell RNA-seq data; use `scran` or `Seurat` because they handle high sparsity and dropout rates better than basic variance/mean filters.2728## Data Requirements29- Input expression data typically provided as an `ExpressionSet` object (e.g., from the `Biobase` package) or a numeric matrix.30- Covariates or sample metadata (e.g., factors with two levels) for specific filtering like `ttest`.3132## Key Parameters33- **k** (5): The minimum number of samples required to exceed the threshold in `kOverA`.34- **A** (200): The expression measure threshold in `kOverA`.35- **method** ("euc"): The distance measure used in `genefinder` (e.g., `"euc"`, `"maximum"`, `"manhattan"`).36- **scale** ("none"): Controls the scaling of the rows in `genefinder` (e.g., `"none"`, `"range"`, `"zscore"`).37- **theta** (0.5): The filtering fraction/threshold used in `filtered_p` and `filtered_R`.38- **p** (0.1): The p-value threshold used in `ttest` for specific filtering.3940## Best Practices41- Assemble individual filtering criteria (like `kOverA` or `ttest`) into a combined filtering function using `filterfun` before applying it with `genefilter`.42- Use `rowSds`, `rowVars`, or `rowttests` for fast row-wise statistical calculations on expression matrices.43- Visualize the effect of filtering on multiple testing adjustments using `rejection_plot` or `filter_volcano`.4445## Common Pitfalls46- **Biased multiple testing**: Using a specific filter (e.g., differential expression p-values) before applying multiple testing correction. *Fix*: Use non-specific filters (like overall variance via `rowVars`) for independent filtering.47- **Scale dominance in distance metrics**: Finding nearest genes with `genefinder` without scaling can be dominated by overall expression magnitude. *Fix*: Set `scale="zscore"` or `scale="range"` in `genefinder` to normalize row variances.48- **Slow row-wise operations**: Using `apply` with standard `t.test` or `var` on large matrices. *Fix*: Use the optimized `rowttests`, `rowSds`, and `rowVars` functions provided by the package.4950## Alternatives51- `DESeq2`: For RNA-seq independent filtering integrated directly into the results extraction.52- `edgeR`: Provides `filterByExpr` which is specifically designed for count-based library size adjustments.53- `matrixStats`: For fast row/column-wise statistics if filtering functions are not needed.5455## Citations56- Bourgon R, Gentleman R, Huber W. (2010). "Independent filtering increases power for detecting differentially expressed genes." *Proceedings of the National Academy of Sciences*.5758## References59- Homepage: bioconductor.org/packages/genefilter60- Vignette: vignette_0_5fb6bf3b.txt6162<!-- biomate-cta -->63---6465## Run this on BioMate6667This skill is the **knowledge layer** — when, why, and how to use `genefilter`. To **run this analysis on your own data** with managed compute, automated QC, and reproducible outputs, use **[BioMate](https://www.biomate.ai?ref=kb&pkg=genefilter)** — free to start.6869▶ **[Open `genefilter` on BioMate →](https://www.biomate.ai?ref=kb&pkg=genefilter)**