Package bgu.bio.algorithms.alignment

Examples of bgu.bio.algorithms.alignment.DiagonalSequenceAlignment$Job


   
    if((long)(e1-b1+1)*(e2-b2+1) <= POSSIBLE_CELLS){
      //System.out.println("rectangle1");
    //  System.out.println("sending DSA. window: s1: " + b1 + "-" + e1 + " s2: " + b2 + "-" + e2);
     
      DiagonalSequenceAlignment alignment = new DiagonalSequenceAlignment(s1, b1, e1, s2, b2, e2, alphabet, matrix, workers, cells);
      score = score + alignment.getAlignmentScore();
    //  System.out.println("rectangle2");
      /*
      try {
        bw.write("Main(DSA): this window- S1: " + b1 + "-" + e1 + " S2: " +  b2 + "-" + e2 + " Score is: " + alignment.getAlignmentScore());
        bw.newLine();
        if((e1-b1+1)>0 && (e2-b2+1)>0){
            DiagonalSequenceAlignmentNoMatrix dsanm = new DiagonalSequenceAlignmentNoMatrix(s1, b1, e1, s2, b2, e2, alphabet, matrix, workers, cells);
            dsanm.buildMatrix();
            if(dsanm.getMaxScore()!=alignment.getAlignmentScore()){
              bw.write("WARNING! the difference is: " + (dsanm.getMaxScore()-alignment.getAlignmentScore()));
              bw.newLine();
            }
            bw.write("only DSANM: this window- S1: " + b1 + "-" + e1 + " S2: " +  b2 + "-" + e2 + " Score is: " + dsanm.getMaxScore());
            bw.newLine();
        }
      } catch (IOException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
      }*/
     
      return alignment.getAlignmentString();
    }
   
    //find a string range (SR) which one of its edges is bounded in the window defined by the strings' borders
    List<StringRange> list = listOfSR;
   
View Full Code Here


          throw new IllegalAccessException();
        }
      }
    }

    Job job = null;

    IJobTrigger jobTrigger = SchedulerResourceUtil.convertScheduleRequestToJobTrigger( scheduleRequest, scheduler );

    HashMap<String, Serializable> parameterMap = new HashMap<String, Serializable>();
    for ( JobScheduleParam param : scheduleRequest.getJobParameters() ) {
View Full Code Here

    return job;
  }

  public Job triggerNow( String jobId ) throws SchedulerException {
    Job job = getScheduler().getJob( jobId );
    if ( getPolicy().isAllowed( SchedulerAction.NAME ) ) {
      getScheduler().triggerNow( jobId );
    } else {
      if ( getSession().getName().equals( job.getUserName() ) ) {
        getScheduler().triggerNow( jobId );
      }
    }
    // udpate job state
    job = getScheduler().getJob( jobId );
View Full Code Here

    }
    return getScheduler().getStatus().name();
  }

  public JobState pauseJob( String jobId ) throws SchedulerException {
    Job job = getJob( jobId );
    if ( isScheduleAllowed() || PentahoSessionHolder.getSession().getName().equals( job.getUserName() ) ) {
      getScheduler().pauseJob( jobId );
    }
    job = getJob( jobId );
    return job.getState();
  }
View Full Code Here

    job = getJob( jobId );
    return job.getState();
  }

  public JobState resumeJob( String jobId ) throws SchedulerException {
    Job job = getJob( jobId );
    if ( isScheduleAllowed() || PentahoSessionHolder.getSession().getName().equals( job.getUserName() ) ) {
      getScheduler().resumeJob( jobId );
    }
    job = getJob( jobId );
    return job.getState();
  }
View Full Code Here

    job = getJob( jobId );
    return job.getState();
  }

  public boolean removeJob( String jobId ) throws SchedulerException {
    Job job = getJob( jobId );
    if ( isScheduleAllowed() || PentahoSessionHolder.getSession().getName().equals( job.getUserName() ) ) {
      getScheduler().removeJob( jobId );
      return true;
    }
    return false;
  }
View Full Code Here

    }
    return false;
  }

  public Job getJobInfo( String jobId ) throws SchedulerException {
    Job job = getJob( jobId );
    if ( getSecurityHelper().isPentahoAdministrator( getSession() )
        || getSession().getName().equals( job.getUserName() ) ) {
      for ( String key : job.getJobParams().keySet() ) {
        Serializable value = job.getJobParams().get( key );
        if ( value.getClass().isArray() ) {
          String[] sa = ( new String[0] ).getClass().cast( value );
          ArrayList<String> list = new ArrayList<String>();
          for ( int i = 0; i < sa.length; i++ ) {
            list.add( sa[i] );
          }
          job.getJobParams().put( key, list );
        }
      }
      return job;
    } else {
      throw new RuntimeException( "Job not found or improper credentials for access" );
View Full Code Here

  public Job updateBlockout( String jobId, JobScheduleRequest jobScheduleRequest )
    throws IllegalAccessException, SchedulerException, IOException {
    if ( isScheduleAllowed() ) {
      boolean isJobRemoved = removeJob( jobId );
      if ( isJobRemoved ) {
        Job job = addBlockout( jobScheduleRequest );
        return job;
      }
    }
    throw new IllegalArgumentException();
  }
View Full Code Here

    jobRequest.setJobParameters( jobParams );
    return jobRequest;
  }

  public JobState getJobState( JobRequest jobRequest ) throws SchedulerException {
    Job job = getJob( jobRequest.getJobId() );
    if ( isScheduleAllowed() || getSession().getName().equals( job.getUserName() ) ) {
      return job.getState();
    }

    throw new UnsupportedOperationException();
  }
View Full Code Here

      @ResponseCode ( code = 403, condition = "Cannot create schedules for the specified file." ),
      @ResponseCode ( code = 500, condition = "An error occurred while creating a schedule." )
  } )
  public Response createJob( JobScheduleRequest scheduleRequest ) {
    try {
      Job job = schedulerService.createJob( scheduleRequest );
      return buildPlainTextOkResponse( job.getJobId() );
    } catch ( SchedulerException e ) {
      return buildServerErrorResponse( e.getCause().getMessage() );
    } catch ( IOException e ) {
      return buildServerErrorResponse( e.getCause().getMessage() );
    } catch ( SecurityException e ) {
View Full Code Here

TOP

Related Classes of bgu.bio.algorithms.alignment.DiagonalSequenceAlignment$Job

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.