Export original CDR3 to a file
This commit is contained in:
parent
83819b296b
commit
4adb92e901
|
@ -10,11 +10,16 @@ generate_repertoire <- function(number_of_sequences) {
|
||||||
))
|
))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
save_data <- function(data) {
|
||||||
|
Biostrings::writeXStringSet(data$sequence, "data/sequence.fasta")
|
||||||
|
Biostrings::writeXStringSet(data$junction, "data/HVR.fasta")
|
||||||
|
}
|
||||||
|
|
||||||
process_data <- function(data) {
|
process_data <- function(data) {
|
||||||
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, " ")
|
||||||
Biostrings::writeXStringSet(data$sequence, "data/sequence.fasta")
|
return(data)
|
||||||
}
|
}
|
||||||
|
|
||||||
parse_cli_arguments <- function() {
|
parse_cli_arguments <- function() {
|
||||||
|
@ -27,4 +32,5 @@ parse_cli_arguments <- function() {
|
||||||
|
|
||||||
argument <- parse_cli_arguments()
|
argument <- parse_cli_arguments()
|
||||||
repertoire <- generate_repertoire(number_of_sequences = as.integer(argument))
|
repertoire <- generate_repertoire(number_of_sequences = as.integer(argument))
|
||||||
process_data(data = repertoire)
|
data <- process_data(data = repertoire)
|
||||||
|
save_data(data)
|
Loading…
Reference in New Issue