findConservedNul: This function finds the nucleotide that has highest frequency...

Description Usage Arguments Value References Examples

View source: R/PositionCal.R

Description

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

Usage

1

Arguments

str

A string containing character nucleotides

Value

Return a vector that has one or more nucleotides with highest frequency

References

Antonis. (2018) How to find the most repeated word in a vector with R Stack oveflow Link

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
# Example 1: find the the letter in string
# with highest occurrence.

str <- "ATTTGGGGCC"
findConservedNul(str) # "G"

# Example 2: find the highest frequency nucleotide from a
# string of nucleotides generated by createPosVec()

data(testSeqShort)
testSeq <- testSeqShort
position1Vec <- createPosVec(testSeq, 1)
findConservedNul(position1Vec) # "T"

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