Package org.moltools.apps.probemaker.project

Examples of org.moltools.apps.probemaker.project.ProjectXMLIOTask


    Task t = pm.getProbeDesignTask(false,true, false,new GoodFairAcceptor(),new BestQualitySelector(),new DefaultProbeDesigner(new GreedyTagAllocator()),new DefaultTSSConstructor(),new StreamErrorHandler(System.err,true));
    t.run();   
   
    TagAllocationTable tat1 = pm.getProject().getTagAllocationTable();
   
    new ProjectXMLIOTask(pm,null,new FileWriter(f1)).run();
    new ProjectXMLIOTask(pm,null,new FileReader(f1)).run();   
    new ProjectXMLIOTask(pm,null,new FileWriter(f2)).run();
    new ProjectXMLIOTask(pm,null,new FileReader(f2)).run();   
    assertEquals(f1.length(),f2.length());
    TagAllocationTable tat2 = pm.getProject().getTagAllocationTable();
   
    assertTrue(tat1.equals(tat2));
   
    t = pm.getProbeDesignTask(false,true, false,new GoodFairAcceptor(),new BestQualitySelector(),new DefaultProbeDesigner(new GreedyTagAllocator()),new DefaultTSSConstructor(),null);
    t.run();   

    new ProjectXMLIOTask(pm,null,new FileWriter(f2)).run();
    new ProjectXMLIOTask(pm,null,new FileReader(f2)).run();   
   
    StringReader sr = new StringReader(">PROBE_1 Probe 1\nATCGACGAGCGAC|ACTAGCGAGCGAC|ATCGACGACGGAC|ACTACGAGCGAC\n" + //$NON-NLS-1$
        ">PROBE_2 Probe 2\nATCGACGAGCGAC|ACTAGCGAGCGAC|ATCGACGACGGAC|ACTACGAGCGAC"); //$NON-NLS-1$
   
    pm.importProbes(true,sr,new IDAndNameFastaDBFormat<Probe>());  
   
    new ProjectXMLIOTask(pm,null,new FileWriter(f2)).run();
    new ProjectXMLIOTask(pm,null,new FileReader(f2)).run();   
   
    f1.deleteOnExit();
    f2.deleteOnExit();
   
  }
View Full Code Here


    pm.getProbeDesignTask(false, false, true, new AllAcceptor(),new NoSelector(), pd, new DefaultTSSConstructor(), new StreamErrorHandler(System.out,true)).run();
       
//  Store to project file
    File f = new File("temp.pmp"); //$NON-NLS-1$
    f.deleteOnExit();
    new ProjectXMLIOTask(pm,null,new FileWriter(f)).run();
   
    //Read project
    new ProjectXMLIOTask(pm,null,new FileReader(f)).run();
   
    //Add new target
    pm.getProject().getTargets().clear();
    pm.getProject().getTargets().addSequence(t2);
   
//  Design with append       
    pm.getProbeDesignTask(true, false, true, new AllAcceptor(), new NoSelector(), pd, new DefaultTSSConstructor(), new StreamErrorHandler(System.out,true)).run();
   
        
//  Store to project file
    f = new File("temp2.pmp"); //$NON-NLS-1$
    f.deleteOnExit();
    new ProjectXMLIOTask(pm,eh,new FileWriter(f)).run();
   
    //Read project
    new ProjectXMLIOTask(pm,eh,new FileReader(f)).run();
      
    pm.getProject().getTargets().clear();
    pm.getProject().getTargets().addSequence(t1);
    pm.getProject().getTargets().addSequence(t2);
   
    db = new ListSequenceDB<NucleotideSequence>();
    db.addSequence(new SimpleNucleotideSequence("Tag 1","AAAAAAAAAA")); //$NON-NLS-1$ //$NON-NLS-2$
    db.addSequence(new SimpleNucleotideSequence("Tag 2","TTTTTTTTTT")); //$NON-NLS-1$ //$NON-NLS-2$
    db.addSequence(new SimpleNucleotideSequence("Tag 3","AAAAAAAAAA")); //$NON-NLS-1$ //$NON-NLS-2$
    db.addSequence(new SimpleNucleotideSequence("Tag 4","TTTTTTTTTT")); //$NON-NLS-1$ //$NON-NLS-2$
    tl = new DefaultTagLibrary(db,"Unique"); //$NON-NLS-1$
    tl.setMode(TagLibrary.USE_PER_GROUP);
   
    pm.getProject().setTagSettings(new DefaultTagSettings(new TagLibrary[] {tl, tl}));
   
//  Design
    pm.getProbeDesignTask(false, true, true, new AllAcceptor(), new NoSelector(), pd, new DefaultTSSConstructor(), eh).run();   

    TagAllocationTable tat1 = pm.getProject().getTagAllocationTable();
   
//  Store to project file
    f = new File("temp3.pmp"); //$NON-NLS-1$
    f.deleteOnExit();
    new ProjectXMLIOTask(pm,eh,new FileWriter(f)).run();
   
    //Read project
    new ProjectXMLIOTask(pm,eh,new FileReader(f)).run();
   
    TagAllocationTable tat2 = pm.getProject().getTagAllocationTable();
   
    assertEquals(tat1, tat2);
   
View Full Code Here

    return null;
  }

  /**Get a project export task to use*/
  protected Task getExportProjectTask(final Writer out, final ErrorHandler ecb) {
    return new ProjectXMLIOTask(this, ecb, out);
  }
View Full Code Here

    return new ProjectIOTask(this, ecb, in);
  }

  /**Get a project import task to use*/
  protected Task getLoadProjectTask(final Reader in, final ErrorHandler ecb) {
    return new ProjectXMLIOTask(this, ecb, in);
  }
View Full Code Here

TOP

Related Classes of org.moltools.apps.probemaker.project.ProjectXMLIOTask

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.