Changeset 3913


Ignore:
Timestamp:
Oct 21, 2010, 3:49:58 PM (13 years ago)
Author:
Fredrik Levander
Message:

Refs #672. Handling peptide total intensity of null

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/plugin/src/org/proteios/plugins/ProteiosProteinAssembly.java

    r3912 r3913  
    11111111      .debug("Trying to add sequence:" + peptide.getDescription() + " to protein " + prot
    11121112        .getExternalId());
     1113    double pep_tot_int = peptide.getTotalIntensity() == null ? 0 : peptide.getTotalIntensity();
    11131114    List<String> sequences = protein.sequences;
    11141115    if (sequences.contains(peptide.getDescription()) && uniqueSequences)
     
    11211122      if (fdr)
    11221123        currentScore = peptide.getCombinedFDR();
    1123       if ((score >= currentScore) && tot_int <= peptide
    1124         .getTotalIntensity())
     1124      if ((score >= currentScore) && tot_int <= pep_tot_int)
    11251125      {
    11261126        // replace
     
    11381138        }
    11391139        protein.peptides.add(peptide);
    1140         protein.totalIntensities.add(peptide.getTotalIntensity());
     1140        protein.totalIntensities.add(pep_tot_int);
    11411141        protein.spectrumStringIds.add(peptide.getSpectrumStringId());
    11421142        protein.spectrumFileIds.add(peptide.getPeakListFile().getId());
     
    11591159      protein.peptides.add(peptide);
    11601160      protein.sequences.add(peptide.getDescription());
    1161       protein.totalIntensities.add(peptide.getTotalIntensity());
     1161      protein.totalIntensities.add(pep_tot_int);
    11621162      protein.spectrumStringIds.add(peptide.getSpectrumStringId());
    11631163      protein.spectrumFileIds.add(peptide.getPeakListFile().getId());
     
    11761176        protein.scores.add(peptide.getExpectationValue());
    11771177      }
    1178       if (prot.getTotalIntensity() != null && peptide.getTotalIntensity() != null)
    1179       {
    1180         prot.setTotalIntensity(prot.getTotalIntensity() + peptide
    1181           .getTotalIntensity());
     1178      if (prot.getTotalIntensity() != null)
     1179      {
     1180        prot.setTotalIntensity(prot.getTotalIntensity() + pep_tot_int);
    11821181      }
    11831182      log.debug("Added sequence to protein");
Note: See TracChangeset for help on using the changeset viewer.