|
| 1 | +package org.biojava3.aaproperties; |
| 2 | + |
| 3 | +import java.util.Map; |
| 4 | + |
| 5 | +import org.biojava3.core.sequence.ProteinSequence; |
| 6 | + |
| 7 | +public interface IProfeatProperties { |
| 8 | + /** |
| 9 | + * Based on Table 2 of http://nar.oxfordjournals.org/content/34/suppl_2/W32.full.pdf<br/> |
| 10 | + * An interface class to generate the properties of a protein sequence based on its converted attributes.<br/> |
| 11 | + * The seven different attributes are<p/> |
| 12 | + * Hydrophobicity (Polar, Neutral, Hydrophobicity)<br/> |
| 13 | + * Normalized van der Waals volume (Range 0 - 2.78, 2.95 - 4.0, 4.03 - 8.08)<br/> |
| 14 | + * Polarity (Value 4.9 - 6.2, 8.0 - 9.2, 10.4 - 13.0)<br/> |
| 15 | + * Polarizability (Value 0 - 1.08, 0.128 - 0.186, 0.219 - 0.409)<br/> |
| 16 | + * Charge (Positive, Neutral, Negative)<br/> |
| 17 | + * Secondary structure (Helix, Strand, Coil)<br/> |
| 18 | + * Solvent accessibility (Buried, Exposed, Intermediate)<br/> |
| 19 | + * |
| 20 | + * @author kohchuanhock |
| 21 | + * @version 2011.06.16 |
| 22 | + * |
| 23 | + */ |
| 24 | + |
| 25 | + /** |
| 26 | + * Enumeration of the seven different attributes |
| 27 | + */ |
| 28 | + public enum ATTRIBUTE {HYDROPHOBICITY, VOLUME, POLARITY, POLARIZABILITY, CHARGE, SECONDARYSTRUCTURE, SOLVENTACCESSIBILITY}; |
| 29 | + /** |
| 30 | + * Enumeration of the three different groupings for each attributes |
| 31 | + */ |
| 32 | + public enum GROUPING {GROUP1, GROUP2, GROUP3}; |
| 33 | + /** |
| 34 | + * Enumeration of the transition between groupA and groupB |
| 35 | + */ |
| 36 | + public enum TRANSITION {GROUP12, GROUP13, GROUP23}; |
| 37 | + /** |
| 38 | + * Enumeration of the distribution for the first, first 25%, first 50%, first 75% and 100% of the grouping |
| 39 | + */ |
| 40 | + public enum DISTRIBUTION {FIRST, FIRST25, FIRST50, FIRST75, ALL}; |
| 41 | + |
| 42 | + /** |
| 43 | + * Returns the composition of the specific grouping for the given attribute. |
| 44 | + * |
| 45 | + * @param sequence |
| 46 | + * a protein sequence consisting of non-ambiguous characters only |
| 47 | + * @param attribute |
| 48 | + * one of the seven attributes (Hydrophobicity, Volume, Polarity, Polarizability, Charge, SecondaryStructure or SolventAccessibility) |
| 49 | + * @param group |
| 50 | + * the grouping to be computed |
| 51 | + * @return |
| 52 | + * returns the composition of the specific grouping for the given attribute |
| 53 | + * @throws Exception |
| 54 | + * throws Exception if attribute or group are unknown |
| 55 | + */ |
| 56 | + public double getComposition(ProteinSequence sequence, ATTRIBUTE attribute, GROUPING group) throws Exception; |
| 57 | + |
| 58 | + public Map<GROUPING, Double> getComposition(ProteinSequence sequence, ATTRIBUTE attribute) throws Exception; |
| 59 | + |
| 60 | + public Map<ATTRIBUTE, Map<GROUPING, Double>> getComposition(ProteinSequence sequence) throws Exception; |
| 61 | + |
| 62 | + /** |
| 63 | + * Returns the number of transition between the specified groups for the given attribute with respect to the length of sequence. |
| 64 | + * |
| 65 | + * @param sequence |
| 66 | + * a protein sequence consisting of non-ambiguous characters only |
| 67 | + * @param attribute |
| 68 | + * one of the seven attributes (Hydrophobicity, Volume, Polarity, Polarizability, Charge, SecondaryStructure or SolventAccessibility) |
| 69 | + * @param transition |
| 70 | + * the interested transition between the groups |
| 71 | + * @return |
| 72 | + * returns the number of transition between the specified groups for the given attribute with respect to the length of sequence. |
| 73 | + * @throws Exception |
| 74 | + * throws Exception if attribute or group are unknown |
| 75 | + */ |
| 76 | + public double getTransition(ProteinSequence sequence, ATTRIBUTE attribute, TRANSITION transition) throws Exception; |
| 77 | + |
| 78 | + public Map<TRANSITION, Double> getTransition(ProteinSequence sequence, ATTRIBUTE attribute) throws Exception; |
| 79 | + |
| 80 | + public Map<ATTRIBUTE, Map<TRANSITION, Double>> getTransition(ProteinSequence sequence) throws Exception; |
| 81 | + |
| 82 | + /** |
| 83 | + * Computes and return the position with respect to the sequence where the given distribution of the grouping can be found.<br/> |
| 84 | + * Example: "1111122222"<br/> |
| 85 | + * For the above example,<br/> |
| 86 | + * position of the GROUPING.GROUP1 && DISTRIBUTION.FIRST = 0/10 (because the first occurrence of '1' is at position 0)<br/> |
| 87 | + * position of the GROUPING.GROUP1 && DISTRIBUTION.ALL = 4/10 (because all occurrences of '1' happens on and before position 4)<br/> |
| 88 | + * |
| 89 | + * @param sequence |
| 90 | + * a protein sequence consisting of non-ambiguous characters only |
| 91 | + * @param attribute |
| 92 | + * one of the seven attributes (Hydrophobicity, Volume, Polarity, Polarizability, Charge, SecondaryStructure or SolventAccessibility) |
| 93 | + * @param group |
| 94 | + * one the three groups for the attribute |
| 95 | + * @param distribution |
| 96 | + * the distribution of the grouping |
| 97 | + * |
| 98 | + * @return |
| 99 | + * the position with respect to the length of sequence where the given distribution of the grouping can be found.<br/> |
| 100 | + * @throws Exception |
| 101 | + * throws Exception if attribute or group are unknown |
| 102 | + */ |
| 103 | + public double getPosition(ProteinSequence sequence, ATTRIBUTE attribute, GROUPING group, DISTRIBUTION distribution) throws Exception; |
| 104 | + |
| 105 | + public Map<DISTRIBUTION, Double> getPosition(ProteinSequence sequence, ATTRIBUTE attribute, GROUPING group) throws Exception; |
| 106 | + |
| 107 | + public Map<GROUPING, Map<DISTRIBUTION, Double>> getPosition(ProteinSequence sequence, ATTRIBUTE attribute) throws Exception; |
| 108 | + |
| 109 | + public Map<ATTRIBUTE , Map<GROUPING, Map<DISTRIBUTION, Double>>> getPosition(ProteinSequence sequence) throws Exception; |
| 110 | +} |
0 commit comments