Takes an object of arbitrary type and returns an sq object as an output.

as.sq(x, ...)

# S3 method for default
as.sq(x, ...)

# S3 method for character
as.sq(x, ...)

Arguments

x

[any] An object of a class that supports conversion to sq class.

...

further arguments to be passed from or to other methods.

Value

An sq object.

Details

There are two possible cases: if x is a character vector, then this method calls sq function, else it passes x to import_sq and hopes it works.

See also

Functions from output module: as.character.sq(), as.matrix.sq(), export_sq(), write_fasta()

Examples

# Constructing an example sequence in the usual way:
sq_1 <- sq("CTGA")

# Using a method for character vector:
sq_2 <- as.sq("CTGA")

# Checking that both objects are identical:
identical(sq_1, sq_2)
#> [1] TRUE