Changeset 20779
- Timestamp:
- 03/03/10 13:54:23 (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bio/tools/main/src/org/intermine/bio/logic/OrthologueLinkManager.java
r20766 r20779 59 59 public class OrthologueLinkManager 60 60 { 61 private static final boolean DEBUG = true;61 private static final boolean DEBUG = false; 62 62 private static OrthologueLinkManager orthologueLinkManager = null; 63 63 private static long lastCacheRefresh = 0; … … 109 109 public static synchronized void primeCache() { 110 110 long timeSinceLastRefresh = System.currentTimeMillis() - lastCacheRefresh; 111 // FIXME hardcoded for testing.112 111 // if release version is different, update homologue mappings in cache 113 112 if (timeSinceLastRefresh > ONE_HOUR || DEBUG) { 114 113 lastCacheRefresh = System.currentTimeMillis(); 115 116 114 updateMaps(); 117 115 } … … 133 131 } else { 134 132 String msg = "Unable to retrieve release version for " + mine.getName(); 135 LOG. error(msg);133 LOG.info(msg); 136 134 continue; 137 135 } … … 176 174 return reader; 177 175 } catch (MalformedURLException e) { 178 LOG.error("Unable to access " + urlString); 179 e.printStackTrace(); 176 LOG.info("Unable to access " + urlString); 180 177 return null; 181 178 } catch (IOException e) { 182 LOG.error("Unable to access " + urlString); 183 e.printStackTrace(); 179 LOG.info("Unable to access " + urlString); 184 180 return null; 185 181 } … … 261 257 262 258 private static boolean setOrganisms(Mine mine) { 263 264 String mineName = mine.getName();265 LOG.error("querying " + mineName + " for genes");266 267 259 Set<String> names = new HashSet(); 268 260 String webserviceURL = null; … … 278 270 } 279 271 } catch (MalformedURLException e) { 280 LOG.error("Unable to access " + mine.getName() + " at " + webserviceURL); 281 e.printStackTrace(); 272 LOG.info("Unable to access " + mine.getName() + " at " + webserviceURL); 282 273 return false; 283 274 } catch (IOException e) { 284 LOG.error("Unable to access " + mine.getName() + " at " + webserviceURL); 285 e.printStackTrace(); 275 LOG.info("Unable to access " + mine.getName() + " at " + webserviceURL); 286 276 return false; 287 277 } … … 308 298 QueryField qfHomologueOrganismName = new QueryField(qcHomologueOrganism, "shortName"); 309 299 QueryField qfType = new QueryField(qcHomologue, "type"); 310 300 311 301 q.setDistinct(true); 312 302 … … 348 338 // gene.homologues.type = 'orthologue' 349 339 QueryExpression c6 = new QueryExpression(QueryExpression.LOWER, qfType); 350 cs.addConstraint(new SimpleConstraint(c6, ConstraintOp.EQUALS, 340 cs.addConstraint(new SimpleConstraint(c6, ConstraintOp.EQUALS, 351 341 new QueryValue("orthologue"))); 352 342 353 343 q.addToOrderBy(qfGeneOrganismName); 354 344 355 345 Results results = im.getObjectStore().execute(q); 356 346 Iterator it = results.iterator(); … … 391 381 392 382 private static void setOrthologues(Mine mine) { 393 394 String mineName = mine.getName();395 LOG.error("querying " + mineName + " for orthologues");396 397 383 Map<String, Map<String, Set[]>> orthologues = new HashMap(); 398 384 URL url; … … 410 396 + ". Expected three columns, found " + bits.length + " columns instead." 411 397 + webserviceURL; 412 LOG. error(msg);398 LOG.info(msg); 413 399 return; 414 400 } … … 442 428 } 443 429 } catch (MalformedURLException e) { 444 LOG.error("Unable to access " + mine.getName() + " at " + webserviceURL); 445 e.printStackTrace(); 430 LOG.info("Unable to access " + mine.getName() + " at " + webserviceURL); 446 431 return; 447 432 } catch (IOException e) { 448 LOG.error("Unable to access " + mine.getName() + " at " + webserviceURL); 449 e.printStackTrace(); 433 LOG.info("Unable to access " + mine.getName() + " at " + webserviceURL); 450 434 return; 451 435 } … … 474 458 // remote mines 475 459 for (Mine mine : mines.values()) { 476 477 String mineName = mine.getName();478 LOG.error("testing " + mineName + " for orthologues");479 480 460 /* unique list of organisms available for conversion 481 461 * orthologue --> mine (local/remote) --> datasets … … 487 467 488 468 if (geneToOrthologues.isEmpty()) { 489 LOG. error(mineName+ " has no orthologues");469 LOG.info(mine.getName() + " has no orthologues"); 490 470 continue; 491 471 }
Note: See TracChangeset
for help on using the changeset viewer.
