subset_genes | R Documentation |
Because I am too lazy to remember that expressionsets use matrix subsets for gene and sample. Also those methods lead to shenanigans when I want to know what happened to the data over the course of the subset.
subset_genes(
expt,
column = "txtype",
method = "remove",
ids = NULL,
warning_cutoff = 90,
meta_column = NULL,
patterns = c("snRNA", "tRNA", "rRNA"),
...
)
expt |
Expressionset containing expt object. |
column |
fData column to use for subsetting. |
method |
Either remove explicit rows, or keep them. |
ids |
Specific IDs to exclude. |
warning_cutoff |
Print the sample IDs for anything which has less than this percent left. |
meta_column |
Save the amount of data lost to this metadata column when not null. |
patterns |
Character list of patterns to remove/keep |
... |
Extra arguments are passed to arglist, currently unused. |
A smaller expt
[create_expt()] [Biobase]
## Not run:
all_expt <- create_expt(metadata)
## This assumes a column in the metadata named 'txtype' containing the
## information telling us what type of transcript each gene is.
no_ribosomes <- exclude_genes_expt(all_expt, column = "txtype",
patterns = c("snRNA", "tRNA", "rRNA"))
i_hate_these_genes <- exclude_genes_expt(all_expt, ids = c("gene1", "gene2"))
only_ribosomes <- exclude_genes_expt(all_expt, method = "keep")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.