export_sq | R Documentation |
Converts object of class sq
to a class
from another package. Currently supported packages are ape,
bioseq, Bioconductor and seqinr. For exact list of
supported classes and resulting types, see details.
export_sq(x, export_format, name = NULL, ...)
x |
[ |
export_format |
[ |
name |
[ |
... |
further arguments to be passed from or to other methods. |
Currently supported formats are as follows (grouped by sq
types):
ami:
"ape::AAbin"
"bioseq::bioseq_aa"
"Biostrings::AAString"
"Biostrings::AAStringSet"
"seqinr::SeqFastaAA"
dna:
"ape::DNAbin"
"bioseq::bioseq_dna"
"Biostrings::DNAString"
"Biostrings::DNAStringSet"
"seqinr::SeqFastadna"
rna:
"bioseq::bioseq_rna"
"Biostrings::RNAString"
"Biostrings::RNAStringSet"
An object with the format specified in the parameter. To find information about the detailed structure of this object, see documentation of these objects.
sq class
Functions from output module:
as.character.sq()
,
as.matrix.sq()
,
as.sq()
,
write_fasta()
# DNA and amino acid sequences can be exported to most packages
sq_ami <- sq(c("MVVGL", "LAVPP"), alphabet = "ami_bsc")
export_sq(sq_ami, "ape::AAbin")
export_sq(sq_ami, "bioseq::bioseq_aa")
export_sq(sq_ami, "Biostrings::AAStringSet", c("one", "two"))
export_sq(sq_ami, "seqinr::SeqFastaAA")
sq_dna <- sq(c("TGATGAAGCGCA", "TTGATGGGAA"), alphabet = "dna_bsc")
export_sq(sq_dna, "ape::DNAbin", name = c("one", "two"))
export_sq(sq_dna, "bioseq::bioseq_dna")
export_sq(sq_dna, "Biostrings::DNAStringSet")
export_sq(sq_dna, "seqinr::SeqFastadna")
# RNA sequences are limited to Biostrings and bioseq
sq_rna <- sq(c("NUARYGCB", "", "DRKCNYBAU"), alphabet = "rna_ext")
export_sq(sq_rna, "bioseq::bioseq_rna")
export_sq(sq_rna, "Biostrings::RNAStringSet")
# Biostrings can export single sequences to simple strings as well
export_sq(sq_dna[1], "Biostrings::DNAString")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.