View source: R/rnaseq_related.R
get_fold_change_matrix | R Documentation |
This function returns a dataframe having first column gene names and subsequent columns are
fold change values for the comparisons passed through sample_comparisons
.
get_fold_change_matrix(x, sample_comparisons, genes)
x |
an abject of class "parcutils". This is an output of the function |
sample_comparisons |
a character vector denoting sample comparisons for which fold change values to be derived. |
genes |
a character vector denoting gene names for which fold change values to be derived. |
a 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"))
genes = parcutils::get_genes_by_regulation(x = res, sample_comparison = "treatment2_VS_control") %>% names()
fc_df <- get_fold_change_matrix(x = res, sample_comparison = c("treatment2_VS_control" , "treatment1_VS_control"), genes = genes)
print(fc_df)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.