Joins multiple vectors of sequences into one vector.
# S3 method for sq
paste(..., NA_letter = getOption("tidysq_NA_letter"))
[sq
]
Sequences to paste together.
[character(1)
]
A string that is used to interpret and display NA
value in the
context of sq class
. Default value equals to
"!
".
sq
object of common type of input objects.
Common type is determined in the same process as for
c.sq()
.
paste()
joins sequences in the same way as it does with strings.
All sq
objects must have the same length, that is, contain the same
number of sequences. An exception is made for scalar (length 1) sq
objects, which are replicated instead.
# Creating objects to work on:
sq_dna_1 <- sq(c("TTCAGGGCTAG", "CGATTGC", "CAGTTTA"),
alphabet = "dna_bsc")
sq_dna_2 <- sq(c("ATCTTGAAG", "CATATGCGCTA", "ACGTGTCGA"),
alphabet = "dna_bsc")
sq_unt_1 <- sq(c("ATGCAGGA?", "TGACGAGCTTA", "", "TIAALGNIIYRAIE"))
sq_unt_2 <- sq(c("OVNU!!OK!!J", "GOK!MI!N!BB!", "DPOFIN!!", "??!?"))
# Pasting sequences:
collapse(sq_dna_1, sq_dna_2)
#> Error in collapse(sq_dna_1, sq_dna_2): unused argument (sq_dna_2)
collapse(sq_unt_1, sq_unt_2)
#> Error in collapse(sq_unt_1, sq_unt_2): unused argument (sq_unt_2)
collapse(sq_dna_2, sq_unt_2, sq_dna_1)
#> Error in collapse(sq_dna_2, sq_unt_2, sq_dna_1): unused arguments (sq_unt_2, sq_dna_1)