Ejemplo n.º 1
0
  // Added by Fawaz Ghali 13/05/2014 exportProteoAnnotator
  private String proteoAnnotatorLineToString(ProteinAmbiguityGroup pag) {

    String line = "";
    List<UserParam> userParams = pag.getUserParam();
    String countNonA = "";
    String scoreNonA = "";
    String nonAPeptide = "";
    String aGenes = "";
    String qValue = "";
    for (int i = 0; i < userParams.size(); i++) {
      UserParam userParam = userParams.get(i);

      if (userParam.getName().equals("nonAPeptide")) {
        nonAPeptide = userParam.getValue();
      }
    }
    List<CvParam> cvParamList = pag.getCvParam();
    for (int i = 0; i < cvParamList.size(); i++) {
      CvParam cvParam = cvParamList.get(i);
      if (cvParam.getAccession().equals("MS:1002474")) {
        scoreNonA = cvParam.getValue();
      }

      if (cvParam.getAccession().equals("MS:1002475")) {
        countNonA = cvParam.getValue();
      }
      if (cvParam.getAccession().equals("MS:1002373")) {
        qValue = cvParam.getValue();
      }
    }

    List<ProteinDetectionHypothesis> proteinDetectionHypothesisList =
        pag.getProteinDetectionHypothesis();
    for (int i = 0; i < proteinDetectionHypothesisList.size(); i++) {
      ProteinDetectionHypothesis proteinDetectionHypothesis = proteinDetectionHypothesisList.get(i);
      if (proteinDetectionHypothesis.getDBSequenceRef().startsWith("dbseq_generic|A_"))
        aGenes = aGenes + proteinDetectionHypothesis.getDBSequenceRef() + ";";
    }

    line = countNonA + sep + scoreNonA + sep + nonAPeptide + sep + aGenes + sep + qValue;
    return line;
  }