Package Galaxy.Tree.Workflow

Examples of Galaxy.Tree.Workflow.Workflow


  }
  /**
   * Convert a Pipeline to a Galaxy Workflow
   */
  public Object visit(Pipeline pipeline) {
    Workflow workflow;
    ModuleGroup mgroup = pipeline.getPipelineModuleGroup();
    Connections conns = pipeline.getConnections();
    GalaxyContext context=  new GalaxyContext();
    context.getDatabase().clear();
    NODE_COUNT = 0;
   
    //convert the module group
    Pair<List<Step>, Object> mystp = moduleVisitor.visit(mgroup, context);
   
    /* Visit connections */
    List<Pair<Pair<Integer,String>, InputConnection>> connlist;
    connlist = (List<Pair<Pair<Integer,String>, InputConnection>>) visit(conns, context).getElem1();
   
    /* Add resulting connections */
    for(Pair<Pair<Integer,String>, InputConnection> myconn : connlist){
      for(Step mystep : mystp.getElem1()){
        if(mystep.getId() == myconn.getElem1().getElem1().intValue()){
          mystep.getConnections().put(
              myconn.getElem1().getElem2(), myconn.getElem2());
        }
      }
    }
    //create workflow from modulegroup, connections
    workflow = new Workflow(mgroup.getName(),
        mgroup.getDescription(),
        pipeline.getVersion(),
        true);
    //add steps retrieved from visiting modulegroup.
    for(Step s : mystp.getElem1())
      workflow.addStep(s.getId(), s);
    return workflow;
  }
View Full Code Here


public class SaraTestGalaxyToLoni {

  public static void testGalaxyJSON(String path, String output){
    System.out.println("==="+path+"===");
   
    Workflow G;
    try {
      G = GalaxySpecification.getJSONParser().parse(new File(path));
      //GalaxySpecification.populateTools(G);
     
      try {
View Full Code Here

   
  }
 
  public static void testGalaxyConvert(String path, String output){
    System.out.println("==="+path+"===");
    Workflow G;
    try {
      G = GalaxySpecification.getJSONParser().parse(new File(path));
      GalaxyToLoniWorkflowConverter glc = new GalaxyToLoniWorkflowConverter();
      Pipeline pipeline = (Pipeline) glc.visit(G);
     
View Full Code Here

    }
   
  }
  public static void testGalaxyWebServiceConvert(String path, String output){
    System.out.println("==="+path+"===");
    Workflow G;
    try {
      G = GalaxySpecification.getJSONParser().parse(new File(path));
      Galaxy.Visitor.Webservice.GalaxyToLoniWorkflowConverter glc;
      glc = new Galaxy.Visitor.Webservice.GalaxyToLoniWorkflowConverter();
      Pipeline pipeline = (Pipeline) glc.visit(G);
View Full Code Here

    System.out.println("==="+path+"===");
    Pipeline p;
    try {
      p = LoniSpecification.getXMLParser().parse(new File(path));
      LoniToGalaxyConverter lgc = new LoniToGalaxyConverter();
      Workflow workflow = (Workflow) lgc.visit(p);
     
      try {
        GalaxySpecification.getJSONGenerator().generate(workflow, output);
        GalaxySpecification.getDatabase().dumpDatabase();
        GalaxySpecification.getDatabase().clear();
View Full Code Here

 
  public static void GalaxyToGalaxy(String path, String output){
    System.out.println(path);
    System.out.println("> "+output);
   
    Workflow G;
    try {
      G = GalaxySpecification.getJSONParser().parse(new File(path));
      //GalaxySpecification.populateTools(G);
     
      try {
View Full Code Here

 
 
  public static void LocalGalaxyToLoni(String path, String output){
    System.out.println(path);
    System.out.println("> "+output);
    Workflow G;
    try {
      Galaxy.Visitor.Local.GalaxyToLoniWorkflowConverter glc;
      glc = new Galaxy.Visitor.Local.GalaxyToLoniWorkflowConverter();
     
      G = GalaxySpecification.getJSONParser().parse(new File(path));
View Full Code Here

 
  public static void WebGalaxyToLoni(String path, String output){
    System.out.println(path);
    System.out.println("> "+output);
    Workflow G;
    try {
      Galaxy.Visitor.Webservice.GalaxyToLoniWorkflowConverter glc;
      glc = new Galaxy.Visitor.Webservice.GalaxyToLoniWorkflowConverter();
     
      G = GalaxySpecification.getJSONParser().parse(new File(path));
View Full Code Here

    try {
      LoniToGalaxyConverter glc;
      glc = new LoniToGalaxyConverter();
     
      P = LoniSpecification.getXMLParser().parse(new File(path));
      Workflow W = (Workflow) glc.visit(P);
     
      try {
        GalaxySpecification.getJSONGenerator().generate(W, output);
      } catch (IOException e) {
        // TODO Auto-generated catch block
View Full Code Here

TOP

Related Classes of Galaxy.Tree.Workflow.Workflow

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.