View source: R/rnaseq_related.R
get_genes_by_regulation | R Documentation |
Get genes based on their differential regulation
get_genes_by_regulation(
x,
sample_comparisons,
regulation = "both",
simplify = FALSE
)
get_genesets_by_regulation(x, sample_comparisons, regulation = "both")
x |
an abject of class "parcutils". This is an output of the function |
sample_comparisons |
a character vector denoting sample comparisons for which genes to be obtained. |
regulation |
a character string, default
|
simplify |
logical, default FALSE, if TRUE returns result in a dataframe format. |
For a given differential comparison this function returns up
, down
, both
, other
and all
genes.
a list or dataframe.
count_file <- system.file("extdata","toy_counts.txt" , package = "parcutils")
count_data <- readr::read_delim(count_file, delim = "\t")
sample_info <- count_data %>% colnames() %>% .[-1] %>%
tibble::tibble(samples = . , groups = rep(c("control" ,"treatment1" , "treatment2"), each = 3) )
res <- run_deseq_analysis(counts = count_data ,
sample_info = sample_info,
column_geneid = "gene_id" ,
group_numerator = c("treatment1", "treatment2") ,
group_denominator = c("control"))
# get both up and down regulated genes
get_genes_by_regulation(x = res, sample_comparisons = c("treatment1_VS_control")) %>% head()
# get up genes only
get_genes_by_regulation(x = res, sample_comparisons = c("treatment1_VS_control") , regul = "up") %>% head()
# get down genes only
get_genes_by_regulation(x = res, sample_comparisons = c("treatment1_VS_control") , regul = "down") %>% head()
# get genes other than up and down
get_genes_by_regulation(x = res, sample_comparisons = c("treatment1_VS_control") , regul = "other") %>% head()
# Simplify output for multiple sample comparisons
get_genes_by_regulation(x = res, sample_comparisons = res$de_comparisons, simplify = TRUE, regul= "up")
# get genesets by regulation. It uses sample comparison and regulation to name each output geneset.
get_genesets_by_regulation(x = res, sample_comparisons = "treatment1_VS_control", regul = "both")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.