Skip to content

Commit

Permalink
removed set_seed() from DESeq2 negative binomial check
Browse files Browse the repository at this point in the history
  • Loading branch information
jessmcc22 committed Jan 29, 2025
1 parent 465e4a6 commit b6b56e6
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 16 deletions.
1 change: 0 additions & 1 deletion NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ export(dendrogram_plotter)
export(goodness_of_fit_DESeq2)
export(heatmap_num_to_char_converter)
export(heatmap_plotter)
export(limma_correction)
export(normalize_SE)
export(process_dendrogram)
export(pval_plotter)
Expand Down
5 changes: 1 addition & 4 deletions R/negative_binomial_check.R
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ counts2pvalue <- function(counts, size, mu) {
#' @param other_variables name of the se colData containing other variables of
#' interest that should be considered in the DESeq2 model
#' @param num_genes downsample value, default is 500 (or all genes if less)
#' @param seeding integer to set the seed to for reproducibility; default is 13
#' @return a matrix of pvalues where each row is a gene and each column is a
#' level within the condition of interest
#' @export
Expand All @@ -49,9 +48,7 @@ counts2pvalue <- function(counts, size, mu) {


goodness_of_fit_DESeq2 <- function(se, count_matrix, condition,
other_variables = NULL, num_genes = 500, seeding = 13) {
# set seed
set.seed(seeding)
other_variables = NULL, num_genes = 500) {
# Obtain needed data from se object
count_matrix <- SummarizedExperiment::assays(se)[[count_matrix]]
condition <- SummarizedExperiment::colData(se)[[condition]]
Expand Down
3 changes: 1 addition & 2 deletions inst/shiny/server/server_01_upload.R
Original file line number Diff line number Diff line change
Expand Up @@ -271,8 +271,7 @@ observeEvent(input$nb_check, {
input$counts_matrix,
input$condition_of_interest,
input$nb_variables,
input$num_genes,
input$set_seed)
input$num_genes)
output$recommendation <- renderText(check_res$recommendation)
output$nb_histogram <- renderPlot(check_res$res_histogram)
output$reference <- renderText(check_res$reference)
Expand Down
6 changes: 1 addition & 5 deletions inst/shiny/ui/ui_01_upload.R
Original file line number Diff line number Diff line change
Expand Up @@ -174,11 +174,7 @@ tabPanel("Upload Data",
numericInput('num_genes',
'Number of genes to analyze (downsampling)',
value = 500,
min = 2),
numericInput('set_seed',
'Number to set seed to for reproducibility',
value = 13,
min = 0)),
min = 2)),
withBusyIndicatorUI(actionButton(inputId = 'nb_check',
label = 'Check Distribution')),
textOutput('recommendation'),
Expand Down
5 changes: 1 addition & 4 deletions man/goodness_of_fit_DESeq2.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit b6b56e6

Please sign in to comment.