Change output format to FASTA
This commit is contained in:
parent
deb1066982
commit
d2e45bc00f
|
@ -1,2 +1,2 @@
|
||||||
*.txt
|
*.txt
|
||||||
*.fastq
|
*.fasta
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
library(immuneSIM)
|
library(immuneSIM)
|
||||||
library(Biostrings)
|
library(Biostrings)
|
||||||
|
|
||||||
generate_repertoires <- function(number_of_sequences) {
|
generate_repertoire <- function(number_of_sequences) {
|
||||||
b_chain <- immuneSIM(
|
b_chain <- immuneSIM(
|
||||||
number_of_seqs = number_of_sequences,
|
number_of_seqs = number_of_sequences,
|
||||||
species = "hs",
|
species = "hs",
|
||||||
|
@ -22,9 +22,8 @@ preprocess_data <- function(repertoire, sequencing_runs) {
|
||||||
}
|
}
|
||||||
|
|
||||||
save_data <- function(repertoire) {
|
save_data <- function(repertoire) {
|
||||||
file_name <- "data/sequence.fastq"
|
file_name <- "data/sequence.fasta"
|
||||||
# TODO Change format to fasta
|
Biostrings::writeXStringSet(repertoire, file_name, format = "fasta")
|
||||||
Biostrings::writeXStringSet(repertoire, file_name, format = "fastq")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
parse_cli_arguments <- function(args) {
|
parse_cli_arguments <- function(args) {
|
||||||
|
@ -35,9 +34,9 @@ parse_cli_arguments <- function(args) {
|
||||||
}
|
}
|
||||||
|
|
||||||
args <- commandArgs(trailingOnly = TRUE)
|
args <- commandArgs(trailingOnly = TRUE)
|
||||||
parameters <- parse_cli_arguments(args)
|
arguments <- parse_cli_arguments(args)
|
||||||
number_of_sequences <- as.integer(parameters[1])
|
number_of_sequences <- as.integer(arguments[1])
|
||||||
sequencing_runs <- as.integer(parameters[2])
|
sequencing_runs <- as.integer(arguments[2])
|
||||||
repertoire <- generate_repertoires(number_of_sequences)
|
repertoire <- generate_repertoire(number_of_sequences)
|
||||||
processed_data <- preprocess_data(repertoire, sequencing_runs)
|
processed_data <- preprocess_data(repertoire, sequencing_runs)
|
||||||
save_data(processed_data)
|
save_data(processed_data)
|
Loading…
Reference in New Issue