Returns type of sequences/alphabet contained in
sq
object.
sq_type(x, ...)
# S3 method for sq
sq_type(x, ...)
sq_type(x) <- value
# S3 method for sq
sq_type(x) <- value
[sq
]
An object this function is applied to.
further arguments to be passed from or to other methods.
[character(1)
]
The name of destination type - any valid sq type.
A string, one of: "ami_bsc", "ami_ext", "dna_bsc", "dna_ext", "rna_bsc", "rna_ext", "unt" or "atp".
Types returned by this function can be passed as argument to functions like
random_sq
and find_invalid_letters
.
Functions that manipulate type of sequences:
find_invalid_letters()
,
is.sq()
,
substitute_letters()
,
typify()
# Creating objects to work on:
sq_ami <- sq(c("MIAANYTWIL","TIAALGNIIYRAIE", "NYERTGHLI", "MAYXXXIALN"),
alphabet = "ami_ext")
sq_dna <- sq(c("ATGCAGGA", "GACCGAACGA", "TGACGAGCTTA", "ACTTTAGC"),
alphabet = "dna_bsc")
# Extracting type of sq objects:
sq_type(sq_ami)
#> [1] "ami_ext"
sq_type(sq_dna)
#> [1] "dna_bsc"
# Classes are tightly related to these types:
class(sq_ami)[1]
#> [1] "sq_ami_ext"
class(sq_dna)[1]
#> [1] "sq_dna_bsc"