Package org.cipres.treebase.domain.study

Examples of org.cipres.treebase.domain.study.Algorithm


      theAnalysisStep.setAnalysis(theAnalysis);
      theAnalysis.addAnalysisStep(theAnalysisStep);
      ContextManager.getAnalysisService().save(theAnalysis);
      ContextManager.getAnalysisStepService().save(theAnalysisStep);
     
      Algorithm theAlgorithm;
      String tb1Algorithm = an.getString("algorithm");
      if (tb1Algorithm.equalsIgnoreCase("parsimony")) {
        theAlgorithm = new ParsimonyAlgorithm();
      } else if (tb1Algorithm.equalsIgnoreCase("bayesian")) {
        theAlgorithm = new BayesianAlgorithm();
      } else if (tb1Algorithm.equalsIgnoreCase("evolution")) {
        theAlgorithm = new EvolutionAlgorithm();
      } else if (tb1Algorithm.equalsIgnoreCase("joining")) {
        theAlgorithm = new JoiningAlgorithm();
      } else if (tb1Algorithm.equalsIgnoreCase("UPGMA")) {
        theAlgorithm = new UPGMAAlgorithm();
      } else if (tb1Algorithm.equalsIgnoreCase("likelihood")) {
        theAlgorithm = new LikelihoodAlgorithm();
      } else {
        theAlgorithm = new OtherAlgorithm()
      }
      theAlgorithm.setDescription(tb1Algorithm);
      ContextManager.getAlgorithmHome().save(theAlgorithm);
      theAnalysisStep.setAlgorithmInfo(theAlgorithm);
     
      { // handle INPUT_MATRIX and OUTPUT_TREE in each ANALYSIS section
        TreeBlock theTreeBlock = null;
View Full Code Here


    // process software metadata
    Software tbSoftware = tbAnalysisStep.getSoftwareInfo();
    attachSoftwareMetadata(nexAnalysisStep, tbSoftware);
   
    // process algorithm metadata
    Algorithm tbAlgorithm = tbAnalysisStep.getAlgorithmInfo();
    attachAlgorithmMetadata(nexAnalysisStep, tbAlgorithm);
  }
View Full Code Here

   * (non-Javadoc)
   *
   * @see org.cipres.treebase.domain.study.AlgorithmHome#findByDescription(java.lang.String)
   */
  public Algorithm findByDescription(String pDesc) {
    Algorithm returnVal = null;

    if (!TreebaseUtil.isEmpty(pDesc)) {
      Criteria c = getSession().createCriteria(Algorithm.class);
      c.add(Expression.eq("description", pDesc).ignoreCase());

View Full Code Here

      s = getAnalysisService().update(s);
   
    analysisStep.setSoftwareInfo(s);
    analysisStepCommand.setSoftwareInfo(s);
    String algorithmType = analysisStepCommand.getAlgorithmType();
    Algorithm algorithm = analysisStepCommand.getAlgorithmMap(algorithmType);
    if ( algorithm != null ) {
      if (algorithmType.startsWith("other") && algorithm.getDescription().trim().length() == 0) {       
        request.setAttribute("errors", "New Algorithm cannot be empty");
        return showForm(request, response, myerrors);
      }   
      if (algorithm != null && !algorithmType.startsWith("other") ) {
        algorithm.setDescription(algorithmType);
     
      if (request.getParameter(ACTION_SUBMIT) != null || algorithm.getId() == null ) {
        algorithm = getAnalysisService().update(algorithm);
      }
      analysisStep.setAlgorithmInfo(algorithm);
    }
    if ( algorithmType.startsWith("other") && algorithm == null ) {       
View Full Code Here

        || perm2 == TBPermission.SUBMITTED_WRITE) {

        BeanUtils.copyProperties(analysisStep, analysisStepCommand);
        Software software = analysisStep.getSoftwareInfo();
        analysisStepCommand.setSoftwareInfo(software);
        Algorithm algorithm = analysisStep.getAlgorithmInfo();
        if ( algorithm != null ) {
          analysisStepCommand.setAlgorithmType(algorithm.getAlgorithmType());
          analysisStepCommand.setAlgorithmMap(algorithm.getAlgorithmType(), algorithm);
        }
        List<AnalyzedDataCommand> analyzedDataCommandList = createAnalyzedDataCommandList(analysisStep);
       
        analysisStepCommand.setAnalyzedDataCommandList(analyzedDataCommandList);
       
View Full Code Here

      for (AnalysisStep analysisStep : analysisStepList) {
        AnalysisStepCommand analysisStepCommand = new AnalysisStepCommand();
        BeanUtils.copyProperties(analysisStepCommand, analysisStep);
        // analysisStepCommand.setId(analysisStep.getId());
        // analysisStepCommand.setSoftwareInfo(analysisStep.getSoftwareInfo());
        Algorithm algorithm = analysisStep.getAlgorithmInfo();
        String algorithmType = new String();
        if (algorithm instanceof LikelihoodAlgorithm) {
          algorithmType = Constants.ALGORITHM_LIKELIHOOD;
        } else if (algorithm instanceof ParsimonyAlgorithm) {
          algorithmType = Constants.ALGORITHM_PARSIMONY;
View Full Code Here

      for (AnalysisStep analysisStep : analysisStepList) {
        AnalysisStepCommand analysisStepCommand = new AnalysisStepCommand();
        BeanUtils.copyProperties(analysisStepCommand, analysisStep);
        // analysisStepCommand.setId(analysisStep.getId());
        // analysisStepCommand.setSoftwareInfo(analysisStep.getSoftwareInfo());
        Algorithm algorithm = analysisStep.getAlgorithmInfo();
        String algorithmType = new String();
        if (algorithm instanceof LikelihoodAlgorithm) {
          algorithmType = Constants.ALGORITHM_LIKELIHOOD;
        } else if (algorithm instanceof ParsimonyAlgorithm) {
          algorithmType = Constants.ALGORITHM_PARSIMONY;
View Full Code Here

      for (AnalysisStep analysisStep : analysisStepList) {
        AnalysisStepCommand analysisStepCommand = new AnalysisStepCommand();
        BeanUtils.copyProperties(analysisStepCommand, analysisStep);
        // analysisStepCommand.setId(analysisStep.getId());
        // analysisStepCommand.setSoftwareInfo(analysisStep.getSoftwareInfo());
        Algorithm algorithm = analysisStep.getAlgorithmInfo();
        String algorithmType = new String();
        if (algorithm instanceof LikelihoodAlgorithm) {
          algorithmType = Constants.ALGORITHM_LIKELIHOOD;
        } else if (algorithm instanceof ParsimonyAlgorithm) {
          algorithmType = Constants.ALGORITHM_PARSIMONY;
View Full Code Here

      for (AnalysisStep analysisStep : analysisStepList) {
        AnalysisStepCommand analysisStepCommand = new AnalysisStepCommand();
        BeanUtils.copyProperties(analysisStepCommand, analysisStep);
        // analysisStepCommand.setId(analysisStep.getId());
        // analysisStepCommand.setSoftwareInfo(analysisStep.getSoftwareInfo());
        Algorithm algorithm = analysisStep.getAlgorithmInfo();
        String algorithmType = new String();
        if (algorithm instanceof LikelihoodAlgorithm) {
          algorithmType = Constants.ALGORITHM_LIKELIHOOD;
        } else if (algorithm instanceof ParsimonyAlgorithm) {
          algorithmType = Constants.ALGORITHM_PARSIMONY;
View Full Code Here

TOP

Related Classes of org.cipres.treebase.domain.study.Algorithm

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.