Learn R Programming

rphast (version 1.0)

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=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. A value of 1 means use the first sequence in the alignment. A value of 0 or NULL means use the reference frame of the entire alignment. Valid values are integer
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==0 || 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
require("rphast")
m <- msa(seqs=c("A--ACGTAT-", "AG-AGGTAA-", "AGGAGGTA--"),
         names=c("human", "mouse", "rat"))
informative.regions.msa(m, 1, refseq=0)
informative.regions.msa(m, 3, refseq=0)
informative.regions.msa(m, 3, refseq=2, spec=c("mouse", "rat"))

Run the code above in your browser using DataLab