Changeset 20785


Ignore:
Timestamp:
03/03/10 16:14:43 (2 years ago)
Author:
julie
Message:

make sure only non-null identifiers are returned. not all genes have a primaryIdentifier.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bio/webapp/src/org/intermine/bio/web/logic/OrthologueConverter.java

    r20775 r20785  
    7878            String organismName) { 
    7979        StringBuffer orthologues = new StringBuffer(); 
     80        String geneIdentifier = "Gene.homologues.homologue.primaryIdentifier"; 
    8081        PathQuery pathQuery = constructPathQuery(organismName); 
    8182        pathQuery.addConstraint(bagType, Constraints.in(bagName)); 
    82         pathQuery.setView("Gene.homologues.homologue.primaryIdentifier"); 
     83        pathQuery.addConstraint(geneIdentifier, Constraints.isNotNull()); 
     84        pathQuery.setView(geneIdentifier); 
    8385        pathQuery.syncLogicExpression("and"); 
    8486        PathQueryExecutor executor = im.getPathQueryExecutor(profile); 
     
    9294            } 
    9395            orthologues.append(orthologue); 
     96        } 
     97        if (orthologues.length() == 0) { 
     98            return null; 
    9499        } 
    95100        return orthologues.toString(); 
     
    202207        return executor.execute(q); 
    203208    } 
    204      
     209 
    205210    /** 
    206211     *If view contains joined organism, this will make sure, that 
Note: See TracChangeset for help on using the changeset viewer.