Package com.google.api.services.genomics.model

Examples of com.google.api.services.genomics.model.Job


    command.setDataStoreFactory(factory);
  }

  @Test
  public void testIsJobFinished() throws Exception {
    Job job = new Job();
    assertFalse(command.isJobFinished(job));

    job.setStatus("running");
    assertFalse(command.isJobFinished(job));

    job.setStatus("success");
    assertTrue(command.isJobFinished(job));

    job.setStatus("failure");
    assertTrue(command.isJobFinished(job));
  }
View Full Code Here


    String jobId = req.execute().getJobId();

    // Get the resulting job
    addJobToHistory(jobId, "Import read group sets to " + dataset.getName() + " from "
        + Joiner.on(',').join(bamFiles));
    Job job = getJob(genomics, jobId, pollForStatus);
    System.out.println("Import job: ");
    printJob(job);

    // If the job is finished, get the imported ids
    if (job.getImportedIds() != null) {
      for (String id : job.getImportedIds()) {
        ReadGroupSet readGroupSet = genomics.readgroupsets().get(id)
            .setFields("id,name,filename").execute();
        System.out.println("Imported read group set: " + readGroupSet.toPrettyString());
      }
    }
View Full Code Here

  }

  protected Job getJob(Genomics genomics, String jobId, boolean pollForStatus)
      throws IOException {
    Genomics.Jobs.Get jobRequest = genomics.jobs().get(jobId);
    Job job = jobRequest.execute();
    Job oldJob = job.clone();

    if (pollForStatus && !isJobFinished(job)) {
      System.out.println("Waiting for job: " + job.getId());
      System.out.println(job.toPrettyString());
      while (!isJobFinished(job)) {
View Full Code Here

    String jobId = req.execute().getJobId();

    // Get the resulting job
    addJobToHistory(jobId, "Saving called variants into " + dataset.getName() + " from "
        + Joiner.on(',').join(bamFiles == null ? readGroupSetIds : bamFiles));
    Job job = getJob(genomics, jobId, pollForStatus);
    System.out.println("Variant calling job: ");
    printJob(job);
  }
View Full Code Here

    String jobId = req.execute().getJobId();

    // Get the resulting job
    addJobToHistory(jobId, "Aligning read group sets to " + dataset.getName() + " from "
        + Joiner.on(',').join(getSources()));
    Job job = getJob(genomics, jobId, pollForStatus);
    System.out.println("Aligning job: ");
    printJob(job);
  }
View Full Code Here

TOP

Related Classes of com.google.api.services.genomics.model.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.