sq_type {tidysq} | R Documentation |
Get type of an sq object
Description
Returns type of sequences/alphabet contained in
sq
object.
Usage
sq_type(x, ...)
## S3 method for class 'sq'
sq_type(x, ...)
sq_type(x) <- value
## S3 replacement method for class 'sq'
sq_type(x) <- value
Arguments
x |
[ |
... |
further arguments to be passed from or to other methods. |
value |
[ |
Details
Types returned by this function can be passed as argument to functions like
random_sq
and find_invalid_letters
.
Value
A string, one of: "ami_bsc", "ami_ext", "dna_bsc", "dna_ext", "rna_bsc", "rna_ext", "unt" or "atp".
See Also
Functions that manipulate type of sequences:
find_invalid_letters()
,
is.sq()
,
substitute_letters()
,
typify()
Examples
# 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)
sq_type(sq_dna)
# Classes are tightly related to these types:
class(sq_ami)[1]
class(sq_dna)[1]
[Package tidysq version 1.1.3 Index]