Package org.moltools.apps.probemaker.messages

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


      byte acceptFirst = analyzer.analyzeTSSPair(groupprobes[0],this,probes);
      byte acceptSecond = analyzer.analyzeTSSPair(groupprobes[1],this,probes);
     
      if (! (acceptFirst == CandidateAcceptor.ACCEPT &&
             acceptSecond == CandidateAcceptor.ACCEPT) ) {
        ProbeMakerPropertyUtils.addMessage(groupprobes[0],new Message(
            "Skipped probe because of problems with TSS pair in group", //$NON-NLS-1$
            TAG_ALLOCATION, Message.FATAL));
        designlog.printLine("Problem with TSS pair in group - Skipping probe"); //$NON-NLS-1$
        designlog.printList(ProbeMakerPropertyUtils.getAllMessages(groupprobes[0]));
        ProbeMakerPropertyUtils.addMessage(groupprobes[1],new Message(
            "Skipped probe because of problems with TSS pair in group", //$NON-NLS-1$
            TAG_ALLOCATION, Message.FATAL));
        designlog.printLine("Problem with TSS pair in group - Skipping probe"); //$NON-NLS-1$
        designlog.printList(ProbeMakerPropertyUtils.getAllMessages(groupprobes[1]));
     
View Full Code Here


  public void doAnalysis(Probe p, TagAllocator pd, DefiniteSequenceDB<? extends Probe> probes) {
    if (tests[0].perform()) {
      int ran = r.nextInt(100);
      if (ran < chance)
        ProbeMakerPropertyUtils.addMessage(p,new Message("Dummy warning", DUMMY, Message.WARNING)); //$NON-NLS-1$     
    }   
  }
View Full Code Here

            if (otherGroup != null && thisGroup == otherGroup && t instanceof MinisequencingTarget)
              if (results[i] == ((MinisequencingTarget) t).getTargetPosition())
                err = false;
             
            if (err) {
              ProbeMakerPropertyUtils.addMessage(p.getTSSPair(),new Message(
                  "May prime on " + t.getID() + " (pos. " + results[i] + ", Tm = " + Math.round((tms.get(i)).floatValue()) + ").", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
                  FALSE_PRIME_ON_TARGET,
                  Message.ERROR));
              log.debug(p.getName() + "/" + t.getID() + ": " + results[i] + ", " + Math.round((tms.get(i)).floatValue()) + " �C"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
            }
          }
        }
      }
    }
    if (tests[1].perform()) {
      for (Iterator<NucleotideSequence> pi = primerList.iterator();pi.hasNext();) {
        NucleotideSequence other = pi.next();           
        int[] results = getPrimingPositions(primer,other);
        if (results != null) {
          for (int i = 0; i < results.length; i++) {
            ProbeMakerPropertyUtils.addMessage(p.getTSSPair(),new Message(
                "May prime on " + other.getID() + " (pos. " + results[i] + ", Tm = " + Math.round((tms.get(i)).floatValue()) + ").", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
                FALSE_PRIME_ON_PRIMER,
                Message.ERROR));
            log.debug(p.getName() + "/" + other.getID() + ": " + results[i] + ", " + Math.round((tms.get(i)).floatValue()) + " �C"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
          }
View Full Code Here

    "Temperature calculation"); //$NON-NLS-1$
    ProbeMakerTarget t = null;
    try {
      t = (ProbeMakerTarget) p.getTarget();     
      if (p.getTarget() == null) {
        ProbeMakerPropertyUtils.addMessage(p,new Message(
            "No target found. Calculated hybridization temperature based on full match", //$NON-NLS-1$
            mt, Message.ALERT));
      }           
    }
    catch (ClassCastException ccx) {     
      ProbeMakerPropertyUtils.addMessage(p,new Message(
          "Not a ProbeMakerTarget. Calculated hybridization temperature based on full match", //$NON-NLS-1$
          mt, Message.ALERT));
    }

    try {
View Full Code Here

      Tm = defaultMpc.getMeltingPoint(tss, temp, st);
    }
    catch (UnsupportedHybridStructureException ex1) {
      try {
        Tm = backupMpc.getMeltingPoint(tss, temp, st);
        ProbeMakerPropertyUtils.addMessage(tss,new Message("Approximate temp. calculation used", MESSAGE_TYPE_TEMP_CALC, Message.ALERT)); //$NON-NLS-1$
      }
      catch (UnsupportedHybridStructureException ex2) {
        throw new UnsupportedOperationException(
            "Could not calculate Tm for " + //$NON-NLS-1$
            tss.getID() + "-" + temp.getID());//$NON-NLS-1$         
View Full Code Here

  public void doAnalysis(Probe p, TagAllocator pd, DefiniteSequenceDB<? extends Probe> probes) {
    prefLength = Integer.parseInt(pd.getParameters().get(
        "PREFERRED_LENGTH")); //$NON-NLS-1$
    if (tests[0].perform()) {
      if (p.length() < prefLength && prefLength > 0) {
        ProbeMakerPropertyUtils.addMessage(p,new Message(
            "Probe is too short by " + (prefLength - //$NON-NLS-1$
                                        p.length()) + " nucleotide(s)", //$NON-NLS-1$
            PROBE_LENGTH, Message.ERROR));
      }
      else if (p.length() > prefLength && prefLength > 0) {
        ProbeMakerPropertyUtils.addMessage(p,new Message(
            "Probe is too long by " + (p.length() - //$NON-NLS-1$
                                       prefLength) + " nucleotide(s)", //$NON-NLS-1$
            PROBE_LENGTH, Message.ERROR));
      }
    }
View Full Code Here

      method.releaseConnection();
    }
   
    log.debug("dG = " + dG); //$NON-NLS-1$
   
    if (dG < dGLimit) ProbeMakerPropertyUtils.addMessage(p,new Message("Too stable secondary structure",DG_SEC_STRUCT,Message.ERROR)); //$NON-NLS-1$
    else if (dG < dGLimit + dGSpan) ProbeMakerPropertyUtils.addMessage(p,new Message("Stable secondary structure",DG_SEC_STRUCT,Message.WARNING)); //$NON-NLS-1$
  }
View Full Code Here

    }

    if (tests[0].perform() && sel5 != null) {
      //Selector 5' end ligates to 5' end of self
      if (isMatch(p, sel5, false, FIVE_PRIME_END)) {
        ProbeMakerPropertyUtils.addMessage(p.getTSSPair(),new Message(SELECTOR_SELF_LIGATION_5.getDescription(),
            SELECTOR_SELF_LIGATION_5, Message.WARNING));
      }
    }
    if (tests[1].perform() && sel3 != null) {
      //Selector 3' end ligates to 3' end of self
      if (isMatch(p, sel3, false, THREE_PRIME_END)) {
        ProbeMakerPropertyUtils.addMessage(p.getTSSPair(),new Message(SELECTOR_SELF_LIGATION_3.getDescription(),
            SELECTOR_SELF_LIGATION_3, Message.WARNING));
      }
    }
    if (tests[2].perform()) {
      //Selector 5' end ligates to 5' end of target
      Target t = p.getTarget();
      if (t != null) {
        if (t instanceof SelectorTarget) {
          SelectorTarget it = (SelectorTarget) t;
          if (Integer.parseInt(it.getVariant().getName()) > 0) {
            if (isMatch(it, sel5, true, FIVE_PRIME_END)) {
              ProbeMakerPropertyUtils.addMessage(p.getTSSPair(),new Message(SELECTOR_TARGET_LIGATION_5.
                  getDescription(),
                  SELECTOR_TARGET_LIGATION_5,
                  Message.WARNING));
            }
          }
        }
        else {
          ProbeMakerPropertyUtils.addMessage(p.getTSSPair(),new Message(
              "Could not perform ligation to target test: Incompatible target", //$NON-NLS-1$
              SELECTOR_TARGET_LIGATION_5, Message.ALERT));

        }
      }
      else {
        ProbeMakerPropertyUtils.addMessage(p.getTSSPair(),new Message(
            "Could not perform ligation to target test: No target", //$NON-NLS-1$
            SELECTOR_TARGET_LIGATION_5, Message.ALERT));
      }
    }
    for (Iterator<? extends Probe> pi = probes.iterator(); pi.hasNext(); ) {
      Probe other = pi.next();
      NucleotideSequence other5;
      NucleotideSequence other3;
      try {
        other5 = other.getTSSPair().getSequence(TSSPair.KEY_FIVE_PRIME);
      }
      catch (ClusterException e) {
        other5 = null;
      }
      try {
        other3 = other.getTSSPair().getSequence(TSSPair.KEY_THREE_PRIME);
      }
      catch (ClusterException e) {
        other3 = null;
      }

      if (!other.equals(p)) {
        if (tests[3].perform() && other5 != null) {
          //Selector 5' end ligates to 5' end of other
          if (isMatch(p, other5, false, FIVE_PRIME_END)) {
            ProbeMakerPropertyUtils.addMessage(p.getTSSPair(),new Message(SELECTOR_OTHER_LIGATION_5.getDescription() +
                ": " + other.getName(), //$NON-NLS-1$
                SELECTOR_OTHER_LIGATION_5, Message.WARNING));
          }
        }
        if (tests[4].perform() && other3 != null) {
          //Selector 3' end ligates to 3' end of other
          if (isMatch(p, other3, false, THREE_PRIME_END)) {
            ProbeMakerPropertyUtils.addMessage(p.getTSSPair(),new Message(SELECTOR_OTHER_LIGATION_3.getDescription() +
                ": " + other.getName(), //$NON-NLS-1$
                SELECTOR_OTHER_LIGATION_3, Message.WARNING));
          }
        }
        if (tests[5].perform() && sel5 != null) {
          //Other selector 5' end ligates to 5' end of this
          if (isMatch(other, sel5, false, FIVE_PRIME_END)) {
            ProbeMakerPropertyUtils.addMessage(p.getTSSPair(),new Message(SELECTOR_LIGATION_OTHER_5.getDescription() +
                ": " + other.getName(), //$NON-NLS-1$
                SELECTOR_LIGATION_OTHER_5, Message.WARNING));
          }
        }
        if (tests[6].perform() && sel3 != null) {
          //Other selector 3' end ligates to 3' end of this
          if (isMatch(other,sel3, false, THREE_PRIME_END)) {
            ProbeMakerPropertyUtils.addMessage(p.getTSSPair(),new Message(SELECTOR_LIGATION_OTHER_3.getDescription() +
                ": " + other.getName(), //$NON-NLS-1$
                SELECTOR_LIGATION_OTHER_3, Message.WARNING));
          }
        }
        if (tests[7].perform() && sel5 != null) {
          ValidatingTarget t = (ValidatingTarget) other.getTarget();
          if (t != null) {
            if (t instanceof SelectorTarget) {
              SelectorTarget it = (SelectorTarget) t;
              if (isMatch(it, sel5, true, FIVE_PRIME_END)) {
                ProbeMakerPropertyUtils.addMessage(p.getTSSPair(),new Message(SELECTOR_TARGET_LIGATION_OTHER_5.
                    getDescription() + ": " + //$NON-NLS-1$
                    other.getName(),
                    SELECTOR_TARGET_LIGATION_OTHER_5,
                    Message.WARNING));
              }
            }
            else {
              ProbeMakerPropertyUtils.addMessage(p.getTSSPair(),new Message(
                  "Could not perform ligation to target test: Incompatible target", //$NON-NLS-1$
                  SELECTOR_TARGET_LIGATION_OTHER_5, Message.ALERT));
            }
          }
          else {
            ProbeMakerPropertyUtils.addMessage(p.getTSSPair(),new Message(
                "Could not perform ligation to target test: No target", //$NON-NLS-1$
                SELECTOR_TARGET_LIGATION_OTHER_5, Message.ALERT));

          }
        }
        if (tests[8].perform() && sel3 != null) {
          //Selector 3' end ligates to 3' end of other target
          ValidatingTarget t = (ValidatingTarget) other.getTarget();
          if (t != null) {
            if (t instanceof SelectorTarget) {
              SelectorTarget it = (SelectorTarget) t;
              if (isMatch(it, sel3, true, THREE_PRIME_END)) {
                ProbeMakerPropertyUtils.addMessage(p.getTSSPair(),new Message(SELECTOR_TARGET_LIGATION_OTHER_3.
                    getDescription() + ": " + //$NON-NLS-1$
                    other.getName(),
                    SELECTOR_TARGET_LIGATION_OTHER_3,
                    Message.WARNING));
              }
            }
            else {
              ProbeMakerPropertyUtils.addMessage(p.getTSSPair(),new Message(
                  "Could not perform ligation to target test: Incompatible target", //$NON-NLS-1$
                  SELECTOR_TARGET_LIGATION_OTHER_3, Message.ALERT));
            }
          }
          else {
            ProbeMakerPropertyUtils.addMessage(p.getTSSPair(),new Message(
                "Could not perform ligation to target test: No target", //$NON-NLS-1$
                SELECTOR_TARGET_LIGATION_OTHER_3, Message.ALERT));
          }
        }
      }
View Full Code Here

    //Check for errors and add appropriate warning messages
    float Tm = ProbeMakerPropertyUtils.getHybridizationTemp(pa);
    if (tests[1].perform()) {
      if (Tm < preftemp3 - 2 * tempspan3) {
        ProbeMakerPropertyUtils.addMessage(pa,new Message("3' arm hybridization temperature very low", //$NON-NLS-1$
                                  THREE_PRIME_HYBRIDIZATION_TEMPERATURE,
                                  Message.ERROR));
      }
      else if (Tm < preftemp3 - tempspan3) {
        ProbeMakerPropertyUtils.addMessage(pa,new Message("3' arm hybridization temperature low", //$NON-NLS-1$
                                  THREE_PRIME_HYBRIDIZATION_TEMPERATURE,
                                  Message.WARNING));
      }
      if (!((Boolean) getData(PROP_USE_CUTOFF_MODE)).booleanValue()) {
        if (Tm > preftemp3 + 2 * tempspan3) {
          ProbeMakerPropertyUtils.addMessage(pa,new Message("3' arm hybridization temperature very high", //$NON-NLS-1$
                                    THREE_PRIME_HYBRIDIZATION_TEMPERATURE,
                                    Message.ERROR));
        }
        else if (Tm > preftemp3 + tempspan3) {
          ProbeMakerPropertyUtils.addMessage(pa,new Message("3' arm hybridization temperature high", //$NON-NLS-1$
                                    THREE_PRIME_HYBRIDIZATION_TEMPERATURE,
                                    Message.WARNING));
        }
      }
    }
    if (tests[3].perform()) {
      if (pa.length() < minlength3) {
        ProbeMakerPropertyUtils.addMessage(pa,new Message("3' arm shorter than minimum length", //$NON-NLS-1$
                                  THREE_PRIME_HYBRIDIZATION_TEMPERATURE,
                                  Message.WARNING));
      }
      if (pa.length() > maxlength3) {
        ProbeMakerPropertyUtils.addMessage(pa,new Message("3' arm longer than maximum size", //$NON-NLS-1$
                                  THREE_PRIME_HYBRIDIZATION_TEMPERATURE,
                                  Message.WARNING));
      }
    }
  }
View Full Code Here

    //Check for errors and add appropriate warning messages
    double Tm = ProbeMakerPropertyUtils.getHybridizationTemp(pa);
    if (tests[0].perform()) {
      if (Tm < preftemp5 - 2 * tempspan5) {
        ProbeMakerPropertyUtils.addMessage(pa,new Message("5' arm hybridization temperature very low", //$NON-NLS-1$
                                  FIVE_PRIME_HYBRIDIZATION_TEMPERATURE,
                                  Message.ERROR));
      }
      else if (Tm < preftemp5 - tempspan5) {
        ProbeMakerPropertyUtils.addMessage(pa,new Message("5' arm hybridization temperature low", //$NON-NLS-1$
                                  FIVE_PRIME_HYBRIDIZATION_TEMPERATURE,
                                  Message.WARNING));
      }
      if (!((Boolean) getData(PROP_USE_CUTOFF_MODE)).booleanValue()) {
        if (Tm > preftemp5 + 2 * tempspan5) {
          ProbeMakerPropertyUtils.addMessage(pa,new Message("5' arm hybridization temperature very high", //$NON-NLS-1$
                                    FIVE_PRIME_HYBRIDIZATION_TEMPERATURE,
                                    Message.ERROR));
        }
        else if (Tm > preftemp5 + tempspan5) {
          ProbeMakerPropertyUtils.addMessage(pa,new Message("5' arm hybridization temperature high", //$NON-NLS-1$
                                    FIVE_PRIME_HYBRIDIZATION_TEMPERATURE,
                                    Message.WARNING));
        }
      }
    }
    if (tests[2].perform()) {
      if (pa.length() < minlength5) {
        ProbeMakerPropertyUtils.addMessage(pa,new Message("5' arm shorter than minimum length", //$NON-NLS-1$
                                  PROBE_ARM_LENGTH, Message.WARNING));
      }
      if (pa.length() > maxlength5) {
        ProbeMakerPropertyUtils.addMessage(pa,new Message("5' arm longer than maximum size", //$NON-NLS-1$
                                  PROBE_ARM_LENGTH, 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.