Set number of sequences via a CLI argument
This commit is contained in:
parent
010849d4c9
commit
2cece5e53e
|
@ -19,3 +19,13 @@ generate_repertoires <- function(number_of_sequences) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
parse_cli_arguments <- function(args) {
|
||||||
|
if (length(args) != 1) {
|
||||||
|
stop("usage: repertoire.r <number of sequences>")
|
||||||
|
}
|
||||||
|
return(as.integer(args[1]))
|
||||||
|
}
|
||||||
|
|
||||||
|
args <- commandArgs(trailingOnly = TRUE)
|
||||||
|
number_of_sequences <- parse_cli_arguments(args)
|
||||||
|
sim_repertoire <- generate_repertoires(number_of_sequences)
|
||||||
|
|
Loading…
Reference in New Issue