seq2tab: Convert sequences into a table

Description Usage Arguments Value See Also Examples

View source: R/tab2seq.r

Description

Convert a named vector of sequences into a matrix by splitting up sequences into individual positions.

Usage

1
seq2tab(x, margin = 1)

Arguments

x

a named vector of sequences, such as from read_fasta

margin

optional whether rows sequences should be in rows (1) or columns (2)

Value

a matrix of fasta sequences

See Also

tab2seq to transform table into a vector of sequences, read_fasta to read sequences from a fasta file, write_fasta to write sequences into a fasta file

Examples

1
2
3
seq = c("ac", "bd")
mat = seq2tab(seq)
identical(seq, c("ac","bd"))

bioDS/phyloRNA documentation built on Feb. 21, 2022, 3:28 p.m.