create_profile_strings: Create a profile string for each group in an alignment

Description Usage Arguments Examples

Description

This function is used to analysis the amino acids at each position in the alignment. It can be used to analysis the columns that the bga analysis identified as interesting It creates a profile string, 1D vector which shows the number of amino acids at each position in an alignment for each group that has been defined

Usage

1

Arguments

x

Matrix representation of alignment generated by convert\_aln\_amino

y

Vector or factor that shows the group representation for each sequence in the alignment

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
library(bgafun)
data(LDH.groups)
data(LDH.amino.gapless)
#run the analysis
LDH.binary.bga=bga(t(LDH.amino.gapless+1),LDH.groups)
#Get the important residues
top_res=top_residues_2_groups(LDH.binary.bga)
#To tidy up the results
names(top_res)=sub("X","",names(top_res))
# and now look at the amino acid content in the alignment 
LDH.profiles=create_profile_strings(LDH.amino.gapless,LDH.groups)
# and now look at only those columns that are identified by BGA
#LDH.profiles[,(colnames(LDH.profiles) %in% names(top_res))]

bgafun documentation built on April 28, 2020, 7:56 p.m.