Learn R Programming

msaR (version 0.6.0)

as.sequences: as.sequences

Description

functionality to convert sequence objects into R lists that can be serialized to JS as JSON. Currently, this can handle character objects which are interpreted as filenames or several of the popular means of storing sequence data: DNAbin, DNAStringSet, AAStringSet, RNAStringSet, BStringSet, DNAMultipleAlignment, RNAMultipleAlignment, or AAMultipleAlignment.

Usage

as.sequences(seqs)

Arguments

seqs

(Required.) the sequence/alignment to be displayed. A character vector, DNAbin, DNAStringSet, AAStringSet, or RNAStringSet.

Value

A list of named lists where each sublist has name, id, and seq members.

Examples

Run this code
# NOT RUN {
seqfile <- system.file("sequences","AHBA.aln",package="msaR")
as.sequences(seqfile)
help("as.sequences")

# }
# NOT RUN {
if (requireNamespace("Biostrings")) {
   seqs <- readDNAStringSet(seqfile)
   as.sequences(seqs)
 }
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab