as.sequences: as.sequences

Description Usage Arguments Value Examples

View source: R/as.sequences.R

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

1

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
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)
 }

## End(Not run)

msaR documentation built on Sept. 22, 2021, 9:06 a.m.