Changeset 20766
- Timestamp:
- 02/03/10 14:54:41 (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bio/tools/main/src/org/intermine/bio/logic/OrthologueLinkManager.java
r20764 r20766 37 37 import org.intermine.objectstore.query.QueryClass; 38 38 import org.intermine.objectstore.query.QueryCollectionReference; 39 import org.intermine.objectstore.query.QueryExpression; 39 40 import org.intermine.objectstore.query.QueryField; 40 41 import org.intermine.objectstore.query.QueryObjectReference; 42 import org.intermine.objectstore.query.QueryValue; 41 43 import org.intermine.objectstore.query.Results; 42 44 import org.intermine.objectstore.query.ResultsRow; 45 import org.intermine.objectstore.query.SimpleConstraint; 43 46 import org.intermine.util.PropertiesUtil; 44 47 … … 235 238 236 239 if (mineName.equals(localMineName)) { 237 localMine.setUrl(url); 238 localMine.setLogo(logo); 239 setLocalOrthologues(); 240 if (localMine.getUrl() == null) { 241 localMine.setUrl(url); 242 localMine.setLogo(logo); 243 setLocalOrthologues(); 244 } 240 245 // skip, this is the local intermine. 241 246 continue; … … 302 307 QueryField qfDataset = new QueryField(qcDataset, "title"); 303 308 QueryField qfHomologueOrganismName = new QueryField(qcHomologueOrganism, "shortName"); 304 309 QueryField qfType = new QueryField(qcHomologue, "type"); 310 305 311 q.setDistinct(true); 306 312 … … 340 346 q.setConstraint(cs); 341 347 348 // gene.homologues.type = 'orthologue' 349 QueryExpression c6 = new QueryExpression(QueryExpression.LOWER, qfType); 350 cs.addConstraint(new SimpleConstraint(c6, ConstraintOp.EQUALS, 351 new QueryValue("orthologue"))); 352 353 q.addToOrderBy(qfGeneOrganismName); 354 342 355 Results results = im.getObjectStore().execute(q); 343 356 Iterator it = results.iterator(); … … 348 361 String geneOrganismName = (String) row.get(0); 349 362 String dataset = (String) row.get(1); 350 String homologueOrganismName = (String) row.get( 1);363 String homologueOrganismName = (String) row.get(2); 351 364 352 365 /**
Note: See TracChangeset
for help on using the changeset viewer.
