findConservityFromS: This function finds the highest frequency of nucleotide in...

Description Usage Arguments Value Examples

View source: R/PositionCal.R

Description

This function finds the highest frequency of nucleotide in input string.

Usage

1

Arguments

str

A string containing character nucleotides

Value

Return a numeric value for highest frequency

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
# Example 1: find the highest letter frequency in a string

str <- "AADDDCCEEEE"
freq <- findConservityFromS(str)
freq # 0.363636...

# Example 2: find the highest frequency of nucleotide from a string of
# nucleotide generated by createPosVec()
data(testSeqShort)
position1Vec <- createPosVec(testSeqShort, 1)
freq <- findConservityFromS(position1Vec)
freq # 0.66666...

hezijin/conservedPos documentation built on Jan. 1, 2021, 3:18 a.m.