Remove sequencing runs argument from repertoire
This commit is contained in:
parent
18ffbf9a75
commit
5154a35fca
|
@ -10,9 +10,7 @@ generate_repertoire <- function(number_of_sequences) {
|
|||
))
|
||||
}
|
||||
|
||||
process_data <- function(repertoire, reads) {
|
||||
columns <- c("sequence", "v_call", "j_call")
|
||||
data <- repertoire[, columns]
|
||||
process_data <- function(data) {
|
||||
dna_sequence <- Biostrings::DNAStringSet(data$sequence)
|
||||
data$sequence <- Biostrings::reverseComplement(dna_sequence)
|
||||
names(data$sequence) <- paste(rownames(data), data$v_call, data$j_call)
|
||||
|
@ -21,12 +19,12 @@ process_data <- function(repertoire, reads) {
|
|||
|
||||
parse_cli_arguments <- function() {
|
||||
args <- commandArgs(trailingOnly = TRUE)
|
||||
if (length(args) != 2) {
|
||||
stop("usage: repertoire.r <number of sequences> <sequencing runs>")
|
||||
if (length(args) != 1) {
|
||||
stop("usage: repertoire.r <number of sequences>")
|
||||
}
|
||||
return(c(args[1], args[2]))
|
||||
return(args[1])
|
||||
}
|
||||
|
||||
args <- parse_cli_arguments()
|
||||
repertoire <- generate_repertoire(number_of_sequences = as.integer(args[1]))
|
||||
process_data(repertoire = repertoire, reads = as.integer(args[2]))
|
||||
argument <- parse_cli_arguments()
|
||||
repertoire <- generate_repertoire(number_of_sequences = as.integer(argument))
|
||||
process_data(data = repertoire)
|
||||
|
|
Loading…
Reference in New Issue