Changeset 4362
- Timestamp:
- Oct 24, 2012, 8:24:43 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/plugin/src/org/proteios/plugins/CombinedHitsReport.java
r4361 r4362 699 699 log.debug("First sorting done. Setting score values"); 700 700 // Set dummy scores 701 float[][] combScores = new float[combinedHits.size()][score_types.length]; 702 int index=0; 701 703 for (CombinedHit ch : combinedHits) 702 704 { … … 714 716 } 715 717 } 716 } 718 combScores[index][i]=ch.scores[i]; 719 } 720 index++; 717 721 } 718 722 float[][] revScores = new float[revCombinedHits.size()][score_types.length]; 719 in t index=0;723 index=0; 720 724 for (CombinedHit ch : revCombinedHits) 721 725 { … … 737 741 index++; 738 742 } 739 log.debug("Addi ngof extreme scores done.");743 log.debug("Addition of extreme scores done."); 740 744 // count spots 741 745 int spots = 0; … … 778 782 } 779 783 log.debug("Counting better hits for targets."); 780 countBetterRandomHits(combinedHits, revScores);784 countBetterRandomHits(combinedHits, combScores, revScores); 781 785 log.debug("Counting better hits for decoys."); 782 countBetterRandomHits(revCombinedHits, revScores );786 countBetterRandomHits(revCombinedHits, revScores, revScores); 783 787 log.debug("Counting done. Sorting after score counts"); 784 788 if (progress != null) … … 957 961 958 962 959 private void countBetterRandomHits(List<CombinedHit> combinedHits, 963 private void countBetterRandomHits(List<CombinedHit> combinedHits, float[][] combScores, 960 964 float[][] revScores) 961 965 { … … 969 973 * Count how many reverse hits that have better score of any type. 970 974 * If the reverse hit has all the score types that the forward hit 971 * has, and a ny of them isabove those of the forward hit, it should975 * has, and all of them are above those of the forward hit, it should 972 976 * be counted. 973 977 */ … … 977 981 for (int k = 0; k < scoreSize; k++) 978 982 { 979 if ((!compareE[k] && (revScores[j][k] < combinedHits 980 .get(i).scores[k])) || (compareE[k] && (revScores 981 [j][k] > combinedHits.get(i).scores[k]))) 982 { 983 above = false; 984 } 983 if (compareE[k]) 984 { 985 if (revScores[j][k]>combScores[i][k]) above=false; 986 } 987 else 988 { 989 if (revScores[j][k]<combScores[i][k]) above=false; 990 } 985 991 } 986 992 if (above)
Note: See TracChangeset
for help on using the changeset viewer.