IUPAC_ScoreR: IUPAC_ScoreR

Description Usage Arguments Details Value Author(s) Examples

View source: R/hello.R

Description

Requires a string of IUPAC DNA codes and scores them according to the likelihood of observing the sequence by random chance. returns the sequences in a string format that can be added to a data.table

Usage

1
IUPAC_ScoreR(Conse, stringency)

Arguments

Conse

a character vector containing the DNA coded IUPAC sequences

stringency

a character either "high", "medium", or "low"

Details

The IUPAC consensus score is calculated as follows: first any positions that can contain any amino acid are removed. then: if stringency = "high", -log2(.25 for every single nucleotide position X .5 for every double nucleotide position X .75 for every tripple nucleotide position). if stringency = "medium", -log2(.25 for every single nucleotide position X .5 for every double nucleotide position). tripple nucleodide positions are removed prior to the calculation. if stringency = "low", -log2(.25 for every single nucleotide position). tripple and double nucleodide positions are removed prior to the calculation.

Value

the IUPAC consensus score for each IUPAC sequence

Author(s)

Brendan Gongol

Examples

1
2
3
4
Conseq <- c("AAAAAAAAAAAAAAAAA", "SYYCNRNSTNGCGTGNSW", "GVTTATTAAKTGGTTATATTGGKTD", "RYSWKMBDHVNATCG")
IUPAC_ScoreR(Conseq, stringency = "high")
IUPAC_ScoreR(Conseq, stringency = "medium")
IUPAC_ScoreR(Conseq, stringency = "low")

brengong/ConservationtextmineR documentation built on July 29, 2019, 10:05 a.m.