Package org.moltools.apps.probemaker.messages

Examples of org.moltools.apps.probemaker.messages.MessageType


  public void testTargetSpecificSequence() {
    PropertyAcceptorNucleotideSequence tss = ProbeMakerSequenceFactory.createTSS(seq,target.getID());

    ProbeMakerPropertyUtils.setHybridizationTemp(tss, 10f);
    ProbeMakerPropertyUtils.addMessage(tss, new Message("Test",new MessageType("test_type","Test type"),Message.ERROR)); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$

    assertTrue("Incorrect target ID", target.getID().equals(DesignUtils.getTargetID(tss))); //$NON-NLS-1$
    assertTrue("Incorrect temp", 10f == ProbeMakerPropertyUtils.getHybridizationTemp(tss)); //$NON-NLS-1$
    assertTrue("Incorrect message count", 1 == ProbeMakerPropertyUtils.getAllMessages(tss).size()); //$NON-NLS-1$
View Full Code Here


  }

  public void testTSSPair() {
    PropertyAcceptorNucleotideSequence tss5 = ProbeMakerSequenceFactory.createTSS(seq,target.getID());   
    ProbeMakerPropertyUtils.addMessage(tss5, new Message("Test",new MessageType("test_type","Test type"),Message.ERROR));     //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
    TSSPair pair = new TSSPair(tss5,null,target);
    ProbeMakerPropertyUtils.setRank(pair, ProbeMakerConstants.BAD_QUALITY);

    assertTrue("Incorrect rank", ProbeMakerConstants.BAD_QUALITY == ProbeMakerPropertyUtils.getRank(pair)); //$NON-NLS-1$
    assertTrue("Incorrect target ID", target.getID().equals(DesignUtils.getTargetID(pair))); //$NON-NLS-1$
    assertTrue("Incorrect message count", 1 == ProbeMakerPropertyUtils.getAllMessages(pair).size()); //$NON-NLS-1$

    ProbeMakerPropertyUtils.addMessage(pair, new Message("Test",new MessageType("test_type","Test type"),Message.ERROR)); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$

    assertTrue("Incorrect message count", 2 == ProbeMakerPropertyUtils.getAllMessages(pair).size()); //$NON-NLS-1$

  }
View Full Code Here

  }

  public void testProbe() {
    PropertyAcceptorNucleotideSequence tss5 = ProbeMakerSequenceFactory.createTSS(seq,target.getID());   
    ProbeMakerPropertyUtils.addMessage(tss5, new Message("Test",new MessageType("test_type","Test type"),Message.ERROR));     //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
    TSSPair pair = new TSSPair(tss5,null,target);
    ProbeMakerPropertyUtils.addMessage(pair, new Message("Test",new MessageType("test_type","Test type"),Message.ERROR)); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$

    Probe probe = new DefaultProbe(pair,0,0,NucleotideSequence.DNA);

    ProbeMakerPropertyUtils.setRank(probe, ProbeMakerConstants.BAD_QUALITY);

    assertTrue("Incorrect rank", ProbeMakerConstants.BAD_QUALITY == ProbeMakerPropertyUtils.getRank(probe)); //$NON-NLS-1$

    assertTrue("Incorrect target ID", target.getID().equals(DesignUtils.getTargetID(probe))); //$NON-NLS-1$
    assertTrue("Incorrect target", target.equals(pair.getTarget())); //$NON-NLS-1$
    assertTrue("Incorrect target", target.equals(probe.getTarget())); //$NON-NLS-1$
    assertTrue("Incorrect message count", 2 == ProbeMakerPropertyUtils.getAllMessages(probe).size()); //$NON-NLS-1$
    assertTrue("Wrong tss pair",pair == probe.getTSSPair()); //$NON-NLS-1$

    ProbeMakerPropertyUtils.addMessage(probe, new Message("Test",new MessageType("test_type","Test type"),Message.ERROR)); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$

    assertTrue("Incorrect message count", 3 == ProbeMakerPropertyUtils.getAllMessages(probe).size()); //$NON-NLS-1$

  }
View Full Code Here

      //UITexts for 5' TSS
      for (int mess = 0;mess < messageCount5;mess++) {
        String[] messageLine = tio.getInStrings(r.readLine());
        if (messageLine.length != 4)
          throw new UnsupportedOperationException("Error parsing message line: " + messageLine); //$NON-NLS-1$
        MessageType mt = new MessageType(messageLine[0],messageLine[1]);
        ProbeMakerPropertyUtils.addMessage(tss5,new Message(messageLine[2],mt,Byte.parseByte(messageLine[3])));
      }

      //UITexts for 3' TSS
      for (int mess = 0;mess < messageCount3;mess++) {
        String[] messageLine = tio.getInStrings(r.readLine());
        if (messageLine.length != 4)
          throw new UnsupportedOperationException("Error parsing message line: " + messageLine); //$NON-NLS-1$
        MessageType mt = new MessageType(messageLine[0],messageLine[1]);
        ProbeMakerPropertyUtils.addMessage(tss3,new Message(messageLine[2],mt,Byte.parseByte(messageLine[3])));
      }

      //UITexts for TSS Pair
      for (int mess = 0;mess < messageCountTSS;mess++) {
        String[] messageLine = tio.getInStrings(r.readLine());
        if (messageLine.length != 4)
          throw new UnsupportedOperationException("Error parsing message line: " + messageLine); //$NON-NLS-1$
        MessageType mt = new MessageType(messageLine[0],messageLine[1]);
        ProbeMakerPropertyUtils.addMessage(p.getTSSPair(),new Message(messageLine[2],mt,Byte.parseByte(messageLine[3])));
      }

      //UITexts for Probe
      for (int mess = 0;mess < messageCountProbe;mess++) {
        String[] messageLine = tio.getInStrings(r.readLine());
        if (messageLine.length != 4)
          throw new UnsupportedOperationException("Error parsing message line: " + messageLine); //$NON-NLS-1$
        MessageType mt = new MessageType(messageLine[0],messageLine[1]);
        ProbeMakerPropertyUtils.addMessage(p,new Message(messageLine[2],mt,Byte.parseByte(messageLine[3])));
      }

      proj.getProbes().addSequence(p);
    }
View Full Code Here



  /**(Re)calculate the Tm values of the TSSs of this pair*/
  public static void calculateArmTemperatures(TSSPair p, MeltingPointCalculator defaultMpc, MeltingPointCalculator backupMpc) {
    MessageType mt = new MessageType("TEMPERATUR_CALCULATION", //$NON-NLS-1$
    "Temperature calculation"); //$NON-NLS-1$
    ProbeMakerTarget t = null;
    try {
      t = (ProbeMakerTarget) p.getTarget();     
      if (p.getTarget() == null) {
View Full Code Here

TOP

Related Classes of org.moltools.apps.probemaker.messages.MessageType

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.