Learn R Programming

bgafun (version 1.34.0)

add_pseudo_counts: Add pseudo counts to amino acid matrix based on defined groups

Description

This function will add pseudo counts to binary amino acid matrix based on the defined groups. It is used to minimise the effect of small sample size. The method of Henikoff and Henikoff is used to calculate the pseudocounts An alternative method is to simply add 1 to the binary matrix

Usage

add_pseudo_counts(amino,groups)

Arguments

amino
Matrix representation of alignment generated by convert\_aln\_amino
groups
Vector or factor that shows the group representation for each sequence in the alignment

Examples

Run this code
library(bgafun)
data(LDH.amino.gapless)
data(LDH.groups)
LDH.pseudo=LDH.amino.gapless+1
#or use the function 
LDH.pseudo=add_pseudo_counts(LDH.amino.gapless,LDH.groups)

Run the code above in your browser using DataLab