Compare commits
2 Commits
18ffbf9a75
...
1020d610d3
Author | SHA1 | Date |
---|---|---|
coolneng | 1020d610d3 | |
coolneng | 5154a35fca |
|
@ -19,5 +19,5 @@ fastq=".fastq"
|
||||||
filename="sequence"
|
filename="sequence"
|
||||||
prefix="curesim_"
|
prefix="curesim_"
|
||||||
|
|
||||||
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"
|
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"
|
||||||
rm "$data_directory/log.txt"
|
rm "$data_directory/log.txt"
|
||||||
|
|
|
@ -10,9 +10,7 @@ generate_repertoire <- function(number_of_sequences) {
|
||||||
))
|
))
|
||||||
}
|
}
|
||||||
|
|
||||||
process_data <- function(repertoire, reads) {
|
process_data <- function(data) {
|
||||||
columns <- c("sequence", "v_call", "j_call")
|
|
||||||
data <- repertoire[, columns]
|
|
||||||
dna_sequence <- Biostrings::DNAStringSet(data$sequence)
|
dna_sequence <- Biostrings::DNAStringSet(data$sequence)
|
||||||
data$sequence <- Biostrings::reverseComplement(dna_sequence)
|
data$sequence <- Biostrings::reverseComplement(dna_sequence)
|
||||||
names(data$sequence) <- paste(rownames(data), data$v_call, data$j_call)
|
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() {
|
parse_cli_arguments <- function() {
|
||||||
args <- commandArgs(trailingOnly = TRUE)
|
args <- commandArgs(trailingOnly = TRUE)
|
||||||
if (length(args) != 2) {
|
if (length(args) != 1) {
|
||||||
stop("usage: repertoire.r <number of sequences> <sequencing runs>")
|
stop("usage: repertoire.r <number of sequences>")
|
||||||
}
|
}
|
||||||
return(c(args[1], args[2]))
|
return(args[1])
|
||||||
}
|
}
|
||||||
|
|
||||||
args <- parse_cli_arguments()
|
argument <- parse_cli_arguments()
|
||||||
repertoire <- generate_repertoire(number_of_sequences = as.integer(args[1]))
|
repertoire <- generate_repertoire(number_of_sequences = as.integer(argument))
|
||||||
process_data(repertoire = repertoire, reads = as.integer(args[2]))
|
process_data(data = repertoire)
|
||||||
|
|
Loading…
Reference in New Issue