Compare commits

..

No commits in common. "1020d610d3a26aa21bc03f24cd2cb734df0eb9f0" and "18ffbf9a758c711c5661361bba9de947259cda21" have entirely different histories.

2 changed files with 10 additions and 8 deletions

View File

@ -19,5 +19,5 @@ fastq=".fastq"
filename="sequence"
prefix="curesim_"
Rscript src/repertoire.r "$sequences" && java -jar tools/CuReSim.jar -n $((sequencing_runs * sequences)) -m "$read_mean_size" -sd "$read_variance_size" -f "$data_directory$filename$fasta" -o "$data_directory$prefix$filename$fastq"
Rscript src/repertoire.r "$sequences" "$sequencing_runs" && java -jar tools/CuReSim.jar -n "$sequencing_runs" -m "$read_mean_size" -sd "$read_variance_size" -f "$data_directory$filename$fasta" -o "$data_directory$prefix$filename$fastq"
rm "$data_directory/log.txt"

View File

@ -10,7 +10,9 @@ generate_repertoire <- function(number_of_sequences) {
))
}
process_data <- function(data) {
process_data <- function(repertoire, reads) {
columns <- c("sequence", "v_call", "j_call")
data <- repertoire[, columns]
dna_sequence <- Biostrings::DNAStringSet(data$sequence)
data$sequence <- Biostrings::reverseComplement(dna_sequence)
names(data$sequence) <- paste(rownames(data), data$v_call, data$j_call)
@ -19,12 +21,12 @@ process_data <- function(data) {
parse_cli_arguments <- function() {
args <- commandArgs(trailingOnly = TRUE)
if (length(args) != 1) {
stop("usage: repertoire.r <number of sequences>")
if (length(args) != 2) {
stop("usage: repertoire.r <number of sequences> <sequencing runs>")
}
return(args[1])
return(c(args[1], args[2]))
}
argument <- parse_cli_arguments()
repertoire <- generate_repertoire(number_of_sequences = as.integer(argument))
process_data(data = repertoire)
args <- parse_cli_arguments()
repertoire <- generate_repertoire(number_of_sequences = as.integer(args[1]))
process_data(repertoire = repertoire, reads = as.integer(args[2]))