Skip to content

Commit

Permalink
report: If random seed is set, use this information also in the repor…
Browse files Browse the repository at this point in the history
…t-figure to get consistent colors
  • Loading branch information
reslp committed Apr 4, 2022
1 parent b87875a commit b9b4ae4
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions bin/report_figure.R
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,13 @@ local_species_file <- "../results/statistics/local_species.txt"

pars_sites <-config_data$filtering$min_parsimony_sites
pars_sites <- strtoi(pars_sites)


# check if seed was specified or not:
if (is.null(config_data$seed) || config_data$seed == "") {
config_data$seed <- "random"
} else {
set.seed(strtoi(config_data$seed))
}

## functions:

Expand Down Expand Up @@ -590,10 +596,6 @@ align_text <- paste0(
"\nMinimum number of sequences per alignment: ", config_data$filtering$minsp
)

# check if seed was specified or not:
if (is.null(config_data$seed) || config_data$seed == "") {
config_data$seed <- "random"
}
reprod_text <- paste0(
"\n\nAnalysis seed: ", config_data$seed
)
Expand Down

0 comments on commit b9b4ae4

Please sign in to comment.