Set number of sequences via a CLI argument

This commit is contained in:
coolneng 2021-02-25 20:02:11 +01:00
parent 010849d4c9
commit 2cece5e53e
Signed by: coolneng
GPG Key ID: 9893DA236405AF57
1 changed files with 10 additions and 0 deletions

View File

@ -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)