Get informative regions of an alignment

Share:

Description

Get informative regions of an alignment

Usage

1
2
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.

Note

  • If the msa object has an idx.offset, it is assumed to be a coordinate offset for the first species in the alignment. So the idx.offset will be added to the coordinates in the returned features object only if refseq==names.msa(x)[1].

  • This function will not alter the value of x even if it is stored as a pointer.

Author(s)

Melissa J. Hubisz and Adam Siepel

Examples

1
2
3
4
5
6
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"))

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.