Package org.moltools.apps.probemaker.messages

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


        if (isLigationTemplate(new SimpleNucleotideSequence(tp.
            seqString() + fp.seqString(),
            "Arms of " + p.getName(), //$NON-NLS-1$
            p.getType()), other, false, false) != null) {
          ProbeMakerPropertyUtils.addMessage(p.getTSSPair(),new Message("May act as template for " + //$NON-NLS-1$
              other.getName(),
              TSS_IS_TEMPLATE_FOR_OTHER_PROBE,
              Message.ERROR));
          found = true;
        }
View Full Code Here


      Probe other = pi.next();
      //Check for templating and add messages accordingly
      if (other != p) {
        //Does this probe (circle) template other probes?
        if (isLigationTemplate(p, other, true, false) != null) {
          ProbeMakerPropertyUtils.addMessage(p,new Message("May act as template for " + //$NON-NLS-1$
              other.getName(),
              TEMPLATE_FOR_OTHER_PROBE,
              Message.ERROR));
          found = true;
        }
View Full Code Here

    }
    //If the two lengths added is greater than the length of the probe,
    //the longest of the two (or 3' if equal) is reduced to the maximum possible
    //value (or 0) and an alert is added.
    if (min5Length + min3Length > p.length()) {
      ProbeMakerPropertyUtils.addMessage(p,new Message(
          "Templating not properly calculated because minimum lengths are too great", //$NON-NLS-1$
          PROBE_IS_SELF_TEMPLATE, Message.ALERT));
      while (min5Length + min3Length > p.length()) {
        if (min5Length > min3Length) {
          min5Length = p.length() - min3Length > 0 ?
View Full Code Here

      root.addContent(CoreMessages.getString("ProbeMakerHTMLRenderer.TEXT_NO_MESSAGES"))//$NON-NLS-1$
    }
    else {                     
      Element list = new Element(HTMLWriter.UL.getTag());   
      for (Iterator<Message> i = messages.iterator(); i.hasNext(); ) {
        Message m = i.next();
        Element li = new Element(HTMLWriter.LI.getTag());
        Element font = new Element(HTMLWriter.FONT.getTag());
        font.setAttribute(HTMLWriter.COLOR.getTag(),fontColorStrings[m.getSeverity()]);
        font.addContent(Message.messageSeverityDescriptions[m.getSeverity()]);
        li.addContent(font);
        li.addContent(": " + m.getMessage()); //$NON-NLS-1$
        list.addContent(li);
      }
     
      root.addContent(list);
    }
View Full Code Here

 
  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

        //Noop   
      }
   
      public void doAnalysis(Probe p, TagAllocator pd,
          DefiniteSequenceDB<? extends Probe> otherProbes) {
        ProbeMakerPropertyUtils.addMessage(p.getTSSPair(),new Message(
            "Dummy", //$NON-NLS-1$
            new MessageType("DUMMY", "Dummy"),
            Message.WARNING));
   
      }   
View Full Code Here

    List<MessageSummaryEntry> l = new ArrayList<MessageSummaryEntry>();
   
    for (Iterator<? extends Probe> i = probes.iterator();i.hasNext();) {
      Probe p = i.next();
      for (Iterator<Message> mi = ProbeMakerPropertyUtils.getAllMessages(p).iterator();mi.hasNext();) {
        Message m = mi.next();
        MessageType t = m.getType();
        int s = m.getSeverity();
        boolean found = false;
        for (Iterator<MessageSummaryEntry> ei = l.iterator();ei.hasNext();) {
          MessageSummaryEntry mse = ei.next();
          if (mse.isMatch(t,s)) {
            mse.count++;
View Full Code Here

        //Noop   
      }
   
      public void doAnalysis(Probe p, TagAllocator pd,
          DefiniteSequenceDB<? extends Probe> otherProbes) {
        ProbeMakerPropertyUtils.addMessage(p.getTSSPair(),new Message(
            "Dummy", //$NON-NLS-1$
            new MessageType("DUMMY", "Dummy"),
            Message.WARNING));
   
      }   
View Full Code Here

TOP

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

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.