Changeset 4282
- Timestamp:
- Feb 10, 2012, 12:15:50 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/plugin/src/org/proteios/plugins/FeatureSequencePropagator.java
r4280 r4282 225 225 featureQuery.restrict(Restrictions.eq(Hql 226 226 .property("msFile"), Hql.entity(currentMsFile))); 227 featureQuery.restrict(Restrictions. eq(Hql227 featureQuery.restrict(Restrictions.gt(Hql 228 228 .property("chargeState"),Expressions.integer(2))); 229 229 featureQuery.order(Orders.asc(Hql.property("apexRetentionTimeInMinutes"))); … … 263 263 featureQuery.restrict(Restrictions.neq(Hql 264 264 .property("peptideSequence"), null)); 265 featureQuery.restrict(Restrictions. eq(Hql265 featureQuery.restrict(Restrictions.gt(Hql 266 266 .property("chargeState"),Expressions.integer(2))); 267 267 featureQuery.order(Orders.asc(Hql.property("apexRetentionTimeInMinutes"))); … … 697 697 featureQuery.restrict(Restrictions.eq(Hql 698 698 .property("msFile"), Hql.entity(uniqueMsFiles.get(fp.getFirstFile())))); 699 featureQuery.restrict(Restrictions. eq(Hql699 featureQuery.restrict(Restrictions.gt(Hql 700 700 .property("chargeState"),Expressions.integer(2))); 701 701 featureQuery.order(Orders.asc(Hql.property("apexRetentionTimeInMinutes"))); … … 705 705 706 706 featureQuery.restrict(Restrictions.eq(Hql 707 .property("msFile"), Hql.entity(uniqueMsFiles.get(fp.getFirstFile())))); 708 featureQuery.restrict(Restrictions.gt(Hql 709 .property("chargeState"),Expressions.integer(2))); 710 featureQuery.order(Orders.asc(Hql.property("apexRetentionTimeInMinutes"))); 711 featureQuery.restrict(Restrictions.neq(Hql.property("peptideSequence"), null)); 712 List<Feature> tempAllFeaturesSeq = featureQuery.list(dc); 713 ArrayList<Feature> allFeaturesSeq = new ArrayList<Feature>(tempAllFeaturesSeq); 714 featureQuery.reset(); 715 716 featureQuery.restrict(Restrictions.eq(Hql 707 717 .property("msFile"), Hql.entity(uniqueMsFiles.get(fp.getSecondFile())))); 708 featureQuery.restrict(Restrictions. eq(Hql718 featureQuery.restrict(Restrictions.gt(Hql 709 719 .property("chargeState"),Expressions.integer(2))); 710 720 featureQuery.order(Orders.asc(Hql.property("apexRetentionTimeInMinutes"))); … … 1028 1038 1029 1039 bestMatch.setClusterId(f.getClusterId()); 1040 1041 //updating hits 1042 if (f.getPeptideSequence()!= null && bestMatch.getPeptideSequence()==null){ 1043 updateHitsList(f,bestMatch,localSampleId2,fractionId2,allFeaturesSeq,writer,dc,factory,project); 1044 } 1030 1045 1031 1046 log.debug("First feature after set: " +f.getClusterId() + " bestMatch feature: " +bestMatch.getClusterId()); … … 1058 1073 1059 1074 1060 private void updateHitsList(Feature f, Feature f2, String localSampleId2, String fractionId2, List<Feature> allFeatures, PrintWriter writer, DbControl dc, ItemFactory factory, Project project){1075 private void updateHitsList(Feature f, Feature f2, String localSampleId2, String fractionId2, ArrayList<Feature> allFeaturesSeq, PrintWriter writer, DbControl dc, ItemFactory factory, Project project){ 1061 1076 //create a hit in database for f2 (the feature whose sequence has been updated) 1062 1077 … … 1087 1102 fseq = fseq.substring(0, fseq 1088 1103 .lastIndexOf(' ')); 1089 for (Feature f3 : allFeatures )1104 for (Feature f3 : allFeaturesSeq) 1090 1105 { 1091 if(f3.getPeptideSequence()!=null){1092 // Currently ignoring charge state of hit.1093 1106 if ((fseq.equals(f3.getPeptideSequence()) || (fseq 1094 1107 .contains(" ") && f3 1095 1108 .getPeptideSequence().startsWith(fseq))) && !f3 1096 .getHits().isEmpty() )1109 .getHits().isEmpty() && f.getChargeState().equals(f3.getChargeState())) 1097 1110 { 1098 1111 for (Hit h1 : f3.getHits()) … … 1112 1125 } 1113 1126 } 1114 }1127 1115 1128 } 1116 1129 }
Note: See TracChangeset
for help on using the changeset viewer.