keep_variable {tidybulk} | R Documentation |
keep_variable() takes as input A 'tbl' (with at least three columns for sample, feature and transcript abundance) or 'SummarizedExperiment' (more convenient if abstracted to tibble with library(tidySummarizedExperiment)) and returns a consistent object (to the input) with additional columns for the statistics from the hypothesis test.
keep_variable( .data, .sample = NULL, .transcript = NULL, .abundance = NULL, top = 500, log_transform = TRUE ) ## S4 method for signature 'spec_tbl_df' keep_variable( .data, .sample = NULL, .transcript = NULL, .abundance = NULL, top = 500, log_transform = TRUE ) ## S4 method for signature 'tbl_df' keep_variable( .data, .sample = NULL, .transcript = NULL, .abundance = NULL, top = 500, log_transform = TRUE ) ## S4 method for signature 'tidybulk' keep_variable( .data, .sample = NULL, .transcript = NULL, .abundance = NULL, top = 500, log_transform = TRUE ) ## S4 method for signature 'SummarizedExperiment' keep_variable(.data, top = 500, log_transform = TRUE) ## S4 method for signature 'RangedSummarizedExperiment' keep_variable(.data, top = 500, log_transform = TRUE)
.data |
A 'tbl' (with at least three columns for sample, feature and transcript abundance) or 'SummarizedExperiment' (more convenient if abstracted to tibble with library(tidySummarizedExperiment)) |
.sample |
The name of the sample column |
.transcript |
The name of the transcript/gene column |
.abundance |
The name of the transcript/gene abundance column |
top |
Integer. Number of top transcript to consider |
log_transform |
A boolean, whether the value should be log-transformed (e.g., TRUE for RNA sequencing data) |
'r lifecycle::badge("maturing")'
At the moment this function uses edgeR https://doi.org/10.1093/bioinformatics/btp616
A consistent object (to the input) with additional columns for the statistics from the hypothesis test (e.g., log fold change, p-value and false discovery rate).
Underlying method: s <- rowMeans((x - rowMeans(x)) ^ 2) o <- order(s, decreasing = TRUE) x <- x[o[1L:top], , drop = FALSE] variable_trancripts = rownames(x)
A consistent object (to the input) with additional columns for the statistics from the hypothesis test (e.g., log fold change, p-value and false discovery rate).
A consistent object (to the input) with additional columns for the statistics from the hypothesis test (e.g., log fold change, p-value and false discovery rate).
A consistent object (to the input) with additional columns for the statistics from the hypothesis test (e.g., log fold change, p-value and false discovery rate).
A 'SummarizedExperiment' object
A 'SummarizedExperiment' object
keep_variable( tidybulk::se_mini, top = 500 )