Compare commits
1 Commits
18ffbf9a75
...
282b86e31b
Author | SHA1 | Date |
---|---|---|
coolneng | 282b86e31b |
|
@ -10,13 +10,19 @@ generate_repertoire <- function(number_of_sequences) {
|
||||||
))
|
))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
save_data <- function(data, reads) {
|
||||||
|
vdj_sequences <- data[-1]
|
||||||
|
amplified_vdj <- vdj_sequences[rep(seq_len(nrow(vdj_sequences)), reads), ]
|
||||||
|
Biostrings::writeXStringSet(data$sequence, "data/sequence.fasta")
|
||||||
|
}
|
||||||
|
|
||||||
process_data <- function(repertoire, reads) {
|
process_data <- function(repertoire, reads) {
|
||||||
columns <- c("sequence", "v_call", "j_call")
|
columns <- c("sequence", "v_call", "j_call")
|
||||||
data <- repertoire[, columns]
|
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)
|
||||||
Biostrings::writeXStringSet(data$sequence, "data/sequence.fasta")
|
save_data(data, reads)
|
||||||
}
|
}
|
||||||
|
|
||||||
parse_cli_arguments <- function() {
|
parse_cli_arguments <- function() {
|
||||||
|
|
Loading…
Reference in New Issue