Changeset 4426


Ignore:
Timestamp:
Feb 27, 2013, 1:51:04 PM (10 years ago)
Author:
Fredrik Levander
Message:

Refs #777. Added fix for rare cases when external id previously could not be found.

File:
1 edited

Legend:

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

    r4349 r4426  
    9090  {
    9191    return new AboutImpl("Feature Comparison Report",
    92       "Generate table with feature comparison", "0.1",
    93       "2012, Immunotechnology, Lund University", null, null,
     92      "Generate table with feature comparison", "0.2",
     93      "2012-2103, Immunotechnology, Lund University", null, null,
    9494      "http://www.proteios.org  ");
    9595  }
     
    186186    featureQuery
    187187      .restrict(Restrictions.neq(Hql.property("clusterId"), null));
    188     featureQuery.restrict(Restrictions.eq(Hql.property("project"), Hql
    189       .entity(project)));
     188    featureQuery.restrict(Restrictions.eq(Hql.property("project"),
     189      Hql.entity(project)));
    190190    featureQuery.order(Orders.asc(Hql.property("clusterId")));
    191191    int entries = msFiles.size();
     
    236236        }
    237237      }
    238       else if (feature.getPeptideSequence() != null && (!feature
    239         .getPeptideSequence().equals(currentSequence)))
    240       {
    241         conflict = true;
     238      else if (feature.getPeptideSequence() != null)
     239      {
     240        if (!feature.getPeptideSequence().equals(currentSequence))
     241        {
     242          conflict = true;
     243        }
     244        /*
     245         * To rescue accession numbers in cases where no accession
     246         * number could be obtained previously
     247         */
     248        else if (currentAcc.equals(""))
     249        {
     250          for (Hit hit : feature.getHits())
     251          {
     252            if (hit.getDescription().startsWith(currentSequence))
     253            {
     254              currentAcc = hit.getExternalId();
     255            }
     256          }
     257        }
    242258      }
    243259      if (values[msFiles.indexOf(feature.getMsFile())] == null)
Note: See TracChangeset for help on using the changeset viewer.