Learn R Programming

rphast (version 1.6.9)

informative.regions.msa: Get informative regions of an alignment

Description

Get informative regions of an alignment

Usage

informative.regions.msa(x, min.numspec, spec = NULL,
  refseq = names.msa(x)[1], gaps.inf = FALSE)

Arguments

x

An object of type msa.

min.numspec

The minimum number of species with non-missing data required for an alignment column to be considered informative.

spec

A character vector of species names, or an integer vector of species indices. Only data in the named species count towards deciding if a site is informative. The default value of NULL implies use all species in the alignment.

refseq

Defines the frame of reference for the return value. Should be a character vector with the name of one of the sequences in the alignment, or NULL to indicate use the frame of reference of the entire alignment.

gaps.inf

Logical value indicating whether a gap should be considered informative. The default value of FALSE indicates that gaps as well as missing data are not counted as informative.

Value

An object of type feat indicating the regions of the alignment which meet the informative criteria. Note that unless refseq==NULL, columns with gaps in the reference sequence will be ignored, and will fall in "informative" or "uninformative" features based on the informativeness of neighboring columns.

Examples

Run this code
# NOT RUN {
require("rphast")
m <- msa(seqs=c("A--ACGTAT-", "AG-AGGTAA-", "AGGAGGTA--"),
         names=c("human", "mouse", "rat"))
informative.regions.msa(m, 1, refseq=NULL)
informative.regions.msa(m, 3, refseq=NULL)
informative.regions.msa(m, 3, refseq="mouse", spec=c("mouse", "rat"))
# }

Run the code above in your browser using DataLab