Changeset 4352


Ignore:
Timestamp:
Sep 27, 2012, 10:23:17 AM (11 years ago)
Author:
Fredrik Levander
Message:

Refs #755. Corrected bug in k-score import introduced in 4198

File:
1 edited

Legend:

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

    r4277 r4352  
    238238    {
    239239      ItemQuery<SpectrumSearch> ssQuery = SpectrumSearch.getQuery();
    240       ssQuery.restrict(Restrictions.eq(Hql.property("resultFile"), Hql
    241         .entity(resultsFile)));
     240      ssQuery.restrict(Restrictions.eq(Hql.property("resultFile"),
     241        Hql.entity(resultsFile)));
    242242      DbControl dc = sc.newDbControl();
    243243      ItemResultIterator<SpectrumSearch> iri = ssQuery.iterate(dc);
     
    577577          if ((line = inreader.readLine()) != null)
    578578          {
    579             log
    580               .info("TandemImport isImportable() File line3=" + line);
     579            log.info("TandemImport isImportable() File line3=" + line);
    581580            ok = line.startsWith("<bioml");
    582581          }
     
    814813        {
    815814          // Add other annotations to the SpectrumSearch.
    816           log
    817             .info("Add annotation:" + param_name + " value:" + buffer
    818               .toString());
     815          log.info("Add annotation:" + param_name + " value:" + buffer
     816            .toString());
    819817          anna.addAnnotation(spectrumSearch, param_name, Type.STRING,
    820818            buffer.toString());
     
    848846    private List<String> protein_uids = new ArrayList<String>();
    849847    private String param_name;
    850     private boolean inside_parameters = false;
    851848    String inputSpectrumFileName = null;
    852849
     
    964961          .getIndex("modified")) + "@" + attrs.getValue(
    965962          attrs.getIndex("type")).charAt(0) + "" + pos;
    966         log
    967           .debug("Sequence:" + current_peptide.getDescription() + " current_start:" + current_start + " pos:" + pos + " mod:" + modifiedAminoAcid);
     963        log.debug("Sequence:" + current_peptide.getDescription() + " current_start:" + current_start + " pos:" + pos + " mod:" + modifiedAminoAcid);
    968964        current_peptide
    969965          .setDescription(current_peptide.getDescription() + " " + modifiedAminoAcid);
     
    10151011        }
    10161012      }
    1017       else if (qName.equals("note") && !inside_parameters)
     1013      else if (qName.equals("note"))
    10181014      {
    10191015        if (param_name.equals("description") && !protein_exists)
     
    10231019          current_protein.setDescription(tempname);
    10241020        }
    1025         if (param_name.equals("Description"))
     1021        else if (param_name.equals("Description"))
    10261022        {
    10271023          // Will equal MGF title if file is MGF
     
    10381034          }
    10391035        }
    1040       }
    1041 
    1042       else if (param_name.equals("scoring, algorithm") && !buffer
    1043         .toString().equals("native"))
    1044       {
    1045         // Change name of score algorithm for all search results.
    1046         for (AHit sr : protein_results)
    1047         {
    1048           sr.setScoreType(buffer.toString() + " protein score");
    1049         }
    1050         for (AHit sr : peptide_results)
    1051         {
    1052           sr.setScoreType(buffer.toString() + " peptide score");
    1053         }
    1054       }
    1055 
     1036        else if (param_name.equals("scoring, algorithm") && !buffer
     1037          .toString().equals("native"))
     1038        {
     1039          // Change name of score algorithm for all search results.
     1040          for (AHit sr : protein_results)
     1041          {
     1042            sr.setScoreType(buffer.toString() + " protein score");
     1043          }
     1044          for (AHit sr : peptide_results)
     1045          {
     1046            sr.setScoreType(buffer.toString() + " peptide score");
     1047          }
     1048        }
     1049      }
    10561050      // End of file.
    10571051      else if (qName.equals("bioml"))
Note: See TracChangeset for help on using the changeset viewer.