get4d.msa: Extract fourfold degenerate sites from an MSA object

Description Usage Arguments Value Note Author(s) Examples

View source: R/msa.R

Description

Extract fourfold degenerate sites from an MSA object

Usage

1
get4d.msa(x, features)

Arguments

x

An object of type msa

features

an object of type feat. Should have defined coding regions with feature type "CDS"

Value

An unordered msa object containing only the sites which are fourfold degenerate.

Note

If x is stored as a pointer, it will be reduced to four-fold degenerate sites, so the original alignment will be lost. Use get4d.msa(copy.msa(x), features) to avoid this behavior. The return value will always be stored in R regardless of how the original alignment was stored.

Author(s)

Melissa J. Hubisz and Adam Siepel

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
exampleArchive <- system.file("extdata", "examples.zip", package="rphast")
files <- c("ENr334-100k.maf", "ENr334-100k.fa", "gencode.ENr334-100k.gff")
unzip(exampleArchive, files)
f <- read.feat("gencode.ENr334-100k.gff")
f$seqname <- "hg18.chr6"
m1 <- read.msa("ENr334-100k.maf", features=f, do.4d=TRUE)
m2 <- read.msa("ENr334-100k.maf")
m3 <- get4d.msa(m2, features=f)
m4 <- get4d.msa(read.msa("ENr334-100k.maf"), features=f)
m5 <- get4d.msa(read.msa("ENr334-100k.fa", offset=41405894), features=f)
unlink(files)

Example output



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