pm.getProject().getTargets().addSequence(t1);
ListSequenceDB<NucleotideSequence> 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$
TagLibrary tl = new DefaultTagLibrary(db,"Unique"); //$NON-NLS-1$
tl.setMode(TagLibrary.USE_UNIQUE_TAG);
pm.getProject().setTagSettings(new DefaultTagSettings(new TagLibrary[] {tl}));
//Design
ProbeDesigner pd = new DefaultProbeDesigner(new PairwiseTagAllocator());
pm.getProbeDesignTask(false, false, null, new DefaultNamingScheme(), new AllAcceptor(),new NoSelector(), pd, new DefaultTSSPairDesigner(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, null, new DefaultNamingScheme(), new AllAcceptor(), new NoSelector(), pd, new DefaultTSSPairDesigner(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, null, new DefaultNamingScheme(), new AllAcceptor(), new NoSelector(), pd, new DefaultTSSPairDesigner(new DefaultTSSConstructor()), eh).run();