Learn R Programming

bgafun (version 1.34.0)

average_cols_aap: Replaces gaps with the average of the column

Description

This function will deal with gaps in the Amino Acid Property encoding scheme It replaces gaps with the average in the column for each group, provided the column is highly occupied for that group. It will only average out over columns that have high percentage of gaps It will remove all other columns containing gaps.

Usage

average_cols_aap(x,y)

Arguments

x
Matrix representation of alignment generated by convert\_aln\_AAP
y
Vector or factor that shows the group representation for each sequence in the alignment

Examples

Run this code
library(bgafun)
data(LDH)
data(LDH.groups)
LDH.aap=convert_aln_AAP(LDH)
LDH.aap.ave=average_cols_aap(LDH.aap,LDH.groups)
dim(LDH.aap.ave)

Run the code above in your browser using DataLab