X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fdatamodel%2FProfile.java;h=546459699c588b0b75800c37f7c1027314cd7ab9;hb=494a321d41897be1492b973fdb37fa4ccb0ec94e;hp=2951e9e82bc6d9ea7b53aca7eb02d961462c0fea;hpb=66fd250940f151ec8b2322d98d6bb9627bdc516f;p=jalview.git diff --git a/src/jalview/datamodel/Profile.java b/src/jalview/datamodel/Profile.java index 2951e9e..5464596 100644 --- a/src/jalview/datamodel/Profile.java +++ b/src/jalview/datamodel/Profile.java @@ -2,21 +2,20 @@ package jalview.datamodel; /** - * A data bean to hold the result of computing a profile for a column of an - * alignment + * A profile for one column of an alignment * * @author gmcarstairs * */ -public class Profile +public class Profile implements ProfileI { /* - * counts of keys (chars) + * an object holding counts of symbols in the profile */ private ResidueCount counts; /* - * the number of sequences in the profile + * the number of sequences (gapped or not) in the profile */ private int height; @@ -57,24 +56,19 @@ public class Profile this.modalResidue = modalRes; } - /** - * Set the full profile of counts - * - * @param residueCounts + /* (non-Javadoc) + * @see jalview.datamodel.ProfileI#setCounts(jalview.datamodel.ResidueCount) */ + @Override public void setCounts(ResidueCount residueCounts) { this.counts = residueCounts; } - /** - * Returns the percentage identity of the profile, i.e. the highest proportion - * of conserved (equal) symbols. The percentage is as a fraction of all - * sequences, or only ungapped sequences if flag ignoreGaps is set true. - * - * @param ignoreGaps - * @return + /* (non-Javadoc) + * @see jalview.datamodel.ProfileI#getPercentageIdentity(boolean) */ + @Override public float getPercentageIdentity(boolean ignoreGaps) { if (height == 0) @@ -93,63 +87,55 @@ public class Profile return pid; } - /** - * Returns the full symbol counts for this profile - * - * @return + /* (non-Javadoc) + * @see jalview.datamodel.ProfileI#getCounts() */ + @Override public ResidueCount getCounts() { return counts; } - /** - * Returns the number of sequences in the profile - * - * @return + /* (non-Javadoc) + * @see jalview.datamodel.ProfileI#getHeight() */ + @Override public int getHeight() { return height; } - /** - * Returns the number of sequences in the profile which had a gap character - * (or were too short to be included in this column's profile) - * - * @return + /* (non-Javadoc) + * @see jalview.datamodel.ProfileI#getGapped() */ + @Override public int getGapped() { return gapped; } - /** - * Returns the highest count for any symbol(s) in the profile - * - * @return + /* (non-Javadoc) + * @see jalview.datamodel.ProfileI#getMaxCount() */ + @Override public int getMaxCount() { return maxCount; } - /** - * Returns the symbol (or concatenated symbols) which have the highest count - * in the profile, or an empty string if there were no symbols counted - * - * @return + /* (non-Javadoc) + * @see jalview.datamodel.ProfileI#getModalResidue() */ + @Override public String getModalResidue() { return modalResidue; } - /** - * Answers the number of non-gapped sequences in the profile - * - * @return + /* (non-Javadoc) + * @see jalview.datamodel.ProfileI#getNonGapped() */ + @Override public int getNonGapped() { return height - gapped;