Package jebl.evolution.align
Class ProfileCharacter
java.lang.Object
jebl.evolution.align.ProfileCharacter
- Version:
- $Id: ProfileCharacter.java 1025 2009-10-23 01:29:48Z matt_kearse $ Represents a single residue in a multiple alignment profile It can represent character frequencies inside an alignment column as a fraction of the total number of characters in that column.
- Author:
- Matt Kearse
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddCharacter(char character, int increment) voidaddGaps(int count) voidaddProfileCharacter(ProfileCharacter character) voidclear()floatstatic ProfileCharactergetImmutableProfileCharacter(char character) An immutable ProfileCharacter that uses less memory than a mutable profile character.booleanintprint()voidremoveProfileCharacter(ProfileCharacter character) static floatscore(ProfileCharacter character1, ProfileCharacter character2, Scores scores) static floatscoreSelf(ProfileCharacter character, Scores scores) toString()
-
Constructor Details
-
ProfileCharacter
public ProfileCharacter(int alphabetSize)
-
-
Method Details
-
getImmutableProfileCharacter
An immutable ProfileCharacter that uses less memory than a mutable profile character. The same immtuable ProfileCharacter may also be returned from other calls to this method.- Parameters:
character- the single character to wrap in a profile.- Returns:
- an immutable ProfileCharacter
-
addCharacter
public void addCharacter(char character, int increment) -
addProfileCharacter
-
removeProfileCharacter
-
addGaps
public void addGaps(int count) -
score
-
scoreSelf
-
print
public int print() -
toString
-
isAllGaps
public boolean isAllGaps() -
clear
public void clear() -
gapFraction
public float gapFraction()- Returns:
- the fraction of characters that are gap Characters in this profile
-