diff --git a/.gitignore b/.gitignore index ec996fb..2447fda 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,2 @@ *.txt -*.fastq +*.fasta diff --git a/src/repertoire.r b/src/repertoire.r index 0650f87..9cb5147 100644 --- a/src/repertoire.r +++ b/src/repertoire.r @@ -1,7 +1,7 @@ library(immuneSIM) library(Biostrings) -generate_repertoires <- function(number_of_sequences) { +generate_repertoire <- function(number_of_sequences) { b_chain <- immuneSIM( number_of_seqs = number_of_sequences, species = "hs", @@ -22,9 +22,8 @@ preprocess_data <- function(repertoire, sequencing_runs) { } save_data <- function(repertoire) { - file_name <- "data/sequence.fastq" - # TODO Change format to fasta - Biostrings::writeXStringSet(repertoire, file_name, format = "fastq") + file_name <- "data/sequence.fasta" + Biostrings::writeXStringSet(repertoire, file_name, format = "fasta") } parse_cli_arguments <- function(args) { @@ -35,9 +34,9 @@ parse_cli_arguments <- function(args) { } args <- commandArgs(trailingOnly = TRUE) -parameters <- parse_cli_arguments(args) -number_of_sequences <- as.integer(parameters[1]) -sequencing_runs <- as.integer(parameters[2]) -repertoire <- generate_repertoires(number_of_sequences) +arguments <- parse_cli_arguments(args) +number_of_sequences <- as.integer(arguments[1]) +sequencing_runs <- as.integer(arguments[2]) +repertoire <- generate_repertoire(number_of_sequences) processed_data <- preprocess_data(repertoire, sequencing_runs) save_data(processed_data) \ No newline at end of file