# S3 method for sq
as.character(x, ..., NA_letter = getOption("tidysq_NA_letter"))
[sq
]
An object this function is applied to.
further arguments to be passed from or to other methods.
[character(1)
]
A string that is used to interpret and display NA
value in the
context of sq class
. Default value equals to
"!
".
A character
vector where each element represents the content
of respective sequence in input sq
object.
This method for sq
class allows converting sequences
from the sq
object into a character vector of length equal to the
length of input. Each element of resulting vector is a separate sequence.
All attributes of the input sq are lost during the conversion to character
vector.
Functions from output module:
as.matrix.sq()
,
as.sq()
,
export_sq()
,
write_fasta()
# Creating an object to work on:
sq_dna <- sq(c("CTGAATGCAGTACCGTAAT", "ATGCCGTAAATGCCAT", "CAGACCANNNATAG"),
alphabet = "dna_ext")
# Converting sq object into a character vector:
as.character(sq_dna)
#> [1] "CTGAATGCAGTACCGTAAT" "ATGCCGTAAATGCCAT" "CAGACCANNNATAG"