Learn R Programming

alignfigR (version 0.1.1)

extract_subalign: Extract subset of sequence alignment

Description

This function builds a data frame to plot an alignment from a specified subset of the full alignment.

Usage

extract_subalign(seqs, plot_step = 1, tlist = c(), clist = c(),
  texcl = FALSE, cexcl = FALSE)

Arguments

seqs

Sequence list, as parsed by the function `read_alignment`

plot_step

Step size for alignment block. Default, 1.

tlist

Array of taxa intended to restrict figure to or to exclude from figure.

clist

Array of columns intended to restrict figure to or to exclude from figure.

texcl

Boolean indicating if taxa in tlist should be excluded. Default, False

cexcl

Boolean indicating if columns in clist should be excluded. Default, False

Value

plot_frame, a data frame to be plotted

Examples

Run this code
# NOT RUN {
fasta_file <- system.file("extdata", "example.fasta", package = "alignfigR")
plot_frame <- read_alignment(file = fasta_file)
subset_seq_list <- extract_subalign(plot_frame, tlist = c("Cow", "Human", "Whale"), texcl = TRUE)
subset_seq_list <- extract_subalign(plot_frame, clist = 1:25)
# }

Run the code above in your browser using DataLab