private EnrichmentEngineResponseDto computeEnrichment(EnrichmentEngineRequestDto request)
     throws ApplicationException, NoRelatedGenesInfoException {
   if (request == null) {
     return null;
   }
   if (request.getNodes().size() == 0) {
     throw new NoRelatedGenesInfoException();
   }
   return mania.computeEnrichment(request);
 }
  private EnrichmentEngineRequestDto createEnrichmentRequest(
      RelatedGenesEngineResponseDto response) {
    if (human.getOntology() == null) {
      return null;
    }
    EnrichmentEngineRequestDto request = new EnrichmentEngineRequestDto();
    request.setProgressReporter(NullProgressReporter.instance());
    request.setMinCategories(MIN_CATEGORIES);
    request.setqValueThreshold(Q_VALUE_THRESHOLD);

    request.setOrganismId(human.getId());
    request.setOntologyId(human.getOntology().getId());

    Set<Long> nodes = new HashSet<Long>();
    for (NetworkDto network : response.getNetworks()) {
      for (InteractionDto interaction : network.getInteractions()) {
        nodes.add(interaction.getNodeVO1().getId());
        nodes.add(interaction.getNodeVO2().getId());
      }
    }
    request.setNodes(nodes);
    return request;
  }