Export the data to FASTQ files

This commit is contained in:
coolneng 2021-02-26 02:20:11 +01:00
parent b035c496f7
commit 53dda36c66
Signed by: coolneng
GPG Key ID: 9893DA236405AF57
1 changed files with 7 additions and 0 deletions

View File

@ -34,6 +34,12 @@ preprocess_data <- function(repertoires) {
return(filtered_repertoires)
}
save_data <- function(repertoires) {
for (chain in names(repertoires)) {
file_name <- paste("data/", chain, ".fastq", sep = "")
Biostrings::writeXStringSet(repertoires[[chain]], file_name, format = "fastq")
}
}
parse_cli_arguments <- function(args) {
if (length(args) != 1) {
@ -46,3 +52,4 @@ args <- commandArgs(trailingOnly = TRUE)
number_of_sequences <- parse_cli_arguments(args)
sim_repertoire <- generate_repertoires(number_of_sequences)
processed_data <- preprocess_data(sim_repertoire)
save_data(processed_data)