|
| 1 | +--- |
| 2 | +title: BioJava:CookBook:AAPROP:profeat |
| 3 | +--- |
| 4 | + |
| 5 | +### How can I compute PROFEAT properties via APIs? |
| 6 | + |
| 7 | +BioJava provides a set of APIs to generate PROFEAT properties. |
| 8 | + PROFEAT generate properties of a protein sequence based on its |
| 9 | +converted attributes. |
| 10 | + \* The seven different attributes are |
| 11 | + |
| 12 | +`* Hydrophobicity (Polar, Neutral, Hydrophobicity)` |
| 13 | +` * Normalized van der Waals volume (Range 0 - 2.78, 2.95 - 4.0, 4.03 - 8.08)` |
| 14 | +` * Polarity (Value 4.9 - 6.2, 8.0 - 9.2, 10.4 - 13.0)` |
| 15 | +` * Polarizability (Value 0 - 1.08, 0.128 - 0.186, 0.219 - 0.409)` |
| 16 | +` * Charge (Positive, Neutral, Negative)` |
| 17 | +` * Secondary structure (Helix, Strand, Coil)` |
| 18 | +` * Solvent accessibility (Buried, Exposed, Intermediate)` |
| 19 | + |
| 20 | +Please see |
| 21 | +[PROFEAT](http://nar.oxfordjournals.org/content/34/suppl_2/W32.abstract) |
| 22 | +for more information about these properties. |
| 23 | + The class providing the core functionality for this is the |
| 24 | +IProfeatProperties class. |
| 25 | + |
| 26 | +Short Example 1: Computing composition of the various grouping for all seven attributes |
| 27 | +--------------------------------------------------------------------------------------- |
| 28 | + |
| 29 | +<java> String sequence = |
| 30 | +"QIKDLLVSSSTDLDTTLVLVNAIYFKGMWKTAFNAEDTREMPFHVTKQESKPVQMMCMNNSFNVATLPAE"; |
| 31 | +Map<ATTRIBUTE, Map<GROUPING, Double>\> attribute2Grouping2Double = |
| 32 | +ProfeatProperties.getComposition(sequence); for(ATTRIBUTE |
| 33 | +a:attribute2Grouping2Double.keySet()){ |
| 34 | + |
| 35 | +` System.out.println("=======" + a + "=======");` |
| 36 | +` System.out.println("GROUP1 = " + attribute2Grouping2Double.get(a).get(GROUPING.GROUP1));` |
| 37 | +` System.out.println("GROUP2 = " + attribute2Grouping2Double.get(a).get(GROUPING.GROUP2));` |
| 38 | +` System.out.println("GROUP3 = " + attribute2Grouping2Double.get(a).get(GROUPING.GROUP3));` |
| 39 | +` System.out.println();` |
| 40 | + |
| 41 | +} </java> |
| 42 | + |
| 43 | +Short Example 2: Computing the number of transition between various grouping for all seven attribute with respect to the length of sequence |
| 44 | +------------------------------------------------------------------------------------------------------------------------------------------- |
| 45 | + |
| 46 | +<java> String sequence = |
| 47 | +"QIKDLLVSSSTDLDTTLVLVNAIYFKGMWKTAFNAEDTREMPFHVTKQESKPVQMMCMNNSFNVATLPAE"; |
| 48 | +Map<ATTRIBUTE, Map<TRANSITION, Double>\> attribute2Transition2Double = |
| 49 | +ProfeatProperties.getTransition(sequence); for(ATTRIBUTE |
| 50 | +a:attribute2Transition2Double.keySet()){ |
| 51 | + |
| 52 | +` System.out.println("=======" + a + "=======");` |
| 53 | +` System.out.println("1<=>1 = " + attribute2Transition2Double.get(a).get(TRANSITION.BETWEEN_11));` |
| 54 | +` System.out.println("2<=>2 = " + attribute2Transition2Double.get(a).get(TRANSITION.BETWEEN_22));` |
| 55 | +` System.out.println("3<=>3 = " + attribute2Transition2Double.get(a).get(TRANSITION.BETWEEN_33));` |
| 56 | +` System.out.println("1<=>2 = " + attribute2Transition2Double.get(a).get(TRANSITION.BETWEEN_12));` |
| 57 | +` System.out.println("1<=>3 = " + attribute2Transition2Double.get(a).get(TRANSITION.BETWEEN_13));` |
| 58 | +` System.out.println("2<=>3 = " + attribute2Transition2Double.get(a).get(TRANSITION.BETWEEN_23));` |
| 59 | +` System.out.println();` |
| 60 | + |
| 61 | +} </java> |
| 62 | + |
| 63 | +(See also: [How to define the XML files to customize mass of Amino Acids |
| 64 | +in the computation of Molecular |
| 65 | +Weight?](BioJava:CookBook:AAPROP:xmlfiles "wikilink")) |
| 66 | + |
| 67 | +Short Example 3: Computing the position with respect to the sequence where the given distribution of the grouping can be found |
| 68 | +------------------------------------------------------------------------------------------------------------------------------ |
| 69 | + |
| 70 | +<java> String[] sequences = new String[3]; String sequence = |
| 71 | +"QIKDLLVSSSTDLDTTLVLVNAIYFKGMWKTAFNAEDTREMPFHVTKQESKPVQMMCMNNSFNVATLPAE"; |
| 72 | +Map<ATTRIBUTE , Map<GROUPING, Map<DISTRIBUTION, Double>\>\> |
| 73 | +attribute2Grouping2Distribution2Double = |
| 74 | +ProfeatProperties.getDistributionPosition(sequence); for(ATTRIBUTE |
| 75 | +a:attribute2Grouping2Distribution2Double.keySet()){ |
| 76 | + |
| 77 | +` System.out.println("=======" + a + "=======");` |
| 78 | +` System.out.println("GROUP1 = " + attribute2Grouping2Distribution2Double.get(a).get(GROUPING.GROUP1));` |
| 79 | +` System.out.println("GROUP2 = " + attribute2Grouping2Distribution2Double.get(a).get(GROUPING.GROUP2));` |
| 80 | +` System.out.println("GROUP3 = " + attribute2Grouping2Distribution2Double.get(a).get(GROUPING.GROUP3));` |
| 81 | + |
| 82 | +} </java> |
0 commit comments