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

Description Usage Arguments Value Note Author(s) Examples

View source: R/msa.R

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

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"))

Example output

  seqname                 src     feature start end attribute
1     MSA msa_get_informative informative     1   9         .
  seqname                 src     feature start end attribute
1     MSA msa_get_informative informative     1   1         .
2     MSA msa_get_informative informative     4   8         .
[1] seqname src     feature start   end    
<0 rows> (or 0-length row.names)

rphast documentation built on May 1, 2019, 9:26 p.m.