コード例 #1
0
  public PeptideCollection getNonIndeterminents() {
    PeptideCollection pc = new PeptideCollection();

    for (PeptideHit p : peptideHits) {
      if (!p.isIndeterminate()) {
        pc.addPeptideHit(p);
      }
    }
    return pc;
  }
コード例 #2
0
 public PeptideCollection filterByProteinCoverage(int minCoverage) {
   HashSet<String> proDiscard = new HashSet<String>();
   for (String pName : minProteins.keySet()) {
     Protein p = minProteins.get(pName);
     if (p.getCoveragePercent() < minCoverage) {
       proDiscard.add(pName);
     }
   }
   PeptideCollection new_pc = new PeptideCollection();
   for (PeptideHit ph : peptideHits) {
     new_pc.addPeptideHit(ph.maskProtein(proDiscard));
   }
   new_pc.createProteinList();
   return new_pc;
 }
コード例 #3
0
 public PeptideCollection filterByPeptidePerProtein(int numPeps) {
   HashSet<String> proDiscard = new HashSet<String>();
   for (String pName : minProteins.keySet()) {
     Protein p = minProteins.get(pName);
     if (p.getNumUniquePeptides() < numPeps) {
       proDiscard.add(pName);
     }
   }
   PeptideCollection new_pc = new PeptideCollection();
   for (PeptideHit ph : peptideHits) {
     new_pc.addPeptideHit(ph.maskProtein(proDiscard));
   }
   new_pc.createProteinList();
   return new_pc;
 }
コード例 #4
0
  //    public PeptideCollection getCutoffCollection(double omssa, double mascot, double xtandem) {
  //        return getCutoffCollection(omssa, mascot, xtandem, false);
  //    }
  public PeptideCollection getCutoffCollection(FilterSettings fs) {
    PeptideCollection pc = new PeptideCollection();

    for (PeptideHit p : peptideHits) {
      if (fs.getUsePepProphet() && p.isPepXML()) {
        if (p.getPepProphet() >= fs.getPeptideProphetCutoff()) {
          pc.addPeptideHit(p);
        }
      } else {
        switch (p.getSourceType()) {
          case MASCOT:
            if (fs.getUseIonIdent()) {
              if (p.getIonScore() >= p.getIdent()) {
                pc.addPeptideHit(p);
              }
            } else if (p.getExpect() <= fs.getMascotCutoff()) {
              pc.addPeptideHit(p);
            }
            break;
          case OMSSA:
            if (p.getExpect() <= fs.getOmssaCutoff()) {
              pc.addPeptideHit(p);
            }
            break;
          case XTANDEM:
            if (p.getExpect() <= fs.getXtandemCutoff()) {
              pc.addPeptideHit(p);
            }
            break;
          case SEQUEST:
            if (p.getExpect() <= fs.getSequestCutoff()) {
              pc.addPeptideHit(p);
            }
            break;
          case PEPXML:
            if (!p.CanGetPepProphet() || (p.getPepProphet() >= fs.getPeptideProphetCutoff())) {
              pc.addPeptideHit(p);
            }
            break;
        }
      }
    }

    return pc;
  }