Package org.moltools.apps.probemaker.seq

Examples of org.moltools.apps.probemaker.seq.Probe


  /**Check if the arms of this probe may template other probes*/
  public boolean checkArmsTemplatingOthers(Probe p, DefiniteSequenceDB<? extends Probe> probes) {
    boolean found = false;
    //Iterate through all probes
    for (Iterator<? extends Probe> pi = probes.iterator(); pi.hasNext(); ) {
      Probe other = pi.next();
      //Check for templating and add messages accordingly
      if (other != p) {
        //Does the arms of this probe template other probe?
        NucleotideSequence fp;
        try {
          fp = p.getTSSPair().getSequence(TSSPair.KEY_FIVE_PRIME);
        }
        catch (ClusterException e) {
          fp = null;
        }
        NucleotideSequence tp;
        try {
          tp = p.getTSSPair().getSequence(TSSPair.KEY_THREE_PRIME);
        }
        catch (ClusterException e) {
          tp = null;
        }
       
        if (tp == null || fp == null) throw new UnsupportedOperationException("Can't perform ligation calculations with missing TSSs"); //$NON-NLS-1$
       
        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


  /**Check if this probe will template ligation of any other probe*/
  public boolean checkTemplatingOthers(Probe p, DefiniteSequenceDB<? extends Probe> probes) {
    boolean found = false;
    //Iterate through all probes
    for (Iterator<? extends Probe> pi = probes.iterator(); pi.hasNext(); ) {
      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

    //This is only necessary to check if there are templating messages on this probe

    if (! (CollectionUtils.select(ProbeMakerPropertyUtils.getAllMessages(p),new IncludeTypesFilter(new MessageType[] {  
        PadlockLigationCalculator.TEMPLATE_FOR_OTHER_PROBE})).isEmpty())) {
      for (Iterator<? extends Probe> i = probes.iterator(); i.hasNext(); ) {
        Probe other = i.next();
        //If other is not yet allocated, this will be found when checking other's arms
        if (other != p && other.tagsAllocated()) {
          if (ltc.isLigationTemplate(p, other, true, false) != null) {
            ProbeMakerPropertyUtils.addMessage(other,new Message("May be templated by " + //$NON-NLS-1$
                p.getName(),
                PadlockLigationCalculator.
                OTHER_PROBE_IS_TEMPLATE,
View Full Code Here

  }

  @Override
  public boolean acceptTag(NucleotideSequence t, DefiniteSequenceDB<? extends Probe> probes) {
    for (Iterator<? extends Probe> i = probes.iterator();i.hasNext();) {
      Probe p = i.next();
      if (ltc.isLigationTemplate(t, p, false, false) != null) {
        return false;
      }
    }
    return true;
View Full Code Here

  }

  public void doAnalysis(Probe p, TagAllocator pd, DefiniteSequenceDB<? extends Probe> probes) {
    if (tests[0].perform()) {
      for (Iterator<? extends Probe> probeit = probes.iterator(); probeit.hasNext(); ) {
        Probe other = probeit.next();
        //Don't do anything if other is same as probe being analysed
        if (!other.equals(p) && other.tagsAllocated()) {
          byte dimer = compare(p,other);
          if (dimer == HI_RISK)
            ProbeMakerPropertyUtils.addMessage(p,new Message("High risk of hetero-dimer formation with " + other.getName(), //$NON-NLS-1$
                PROBE_DIMER_FORMATION, Message.ERROR));
          else if (dimer == RISK)
            ProbeMakerPropertyUtils.addMessage(p,new Message("Risk of hetero-dimer formation with " + other.getName(), //$NON-NLS-1$
                 PROBE_DIMER_FORMATION, Message.WARNING));

        }
      }     
    }
View Full Code Here

    //If another probe is templated by this probe, add message to it.
    //This is only necessary to check if there are templating messages on this probe
    if (tests[0].perform())
    if (!CollectionUtils.select(ProbeMakerPropertyUtils.getAllMessages(p),new IncludeTypesFilter(new MessageType[] {PROBE_DIMER_FORMATION})).isEmpty()) {
      for (Iterator<? extends Probe> i = otherProbes.iterator(); i.hasNext(); ) {
        Probe other = i.next();
        //If other is not yet allocated, this will be found when checking other's arms
        if (!other.equals(p) && other.tagsAllocated()) {
          byte dimer = compare(p,other);
          if (dimer == HI_RISK)
            ProbeMakerPropertyUtils.addMessage(other,new Message("High risk of hetero-dimer formation with " + other.getName(), //$NON-NLS-1$
                PROBE_DIMER_FORMATION, Message.ERROR));
          else if (dimer == RISK)
            ProbeMakerPropertyUtils.addMessage(other,new Message("Risk of hetero-dimer formation with " + other.getName(), //$NON-NLS-1$
                 PROBE_DIMER_FORMATION, Message.WARNING));
          Analyzer.calculateAndSetQuality(other);         
        }
      }
    } 
View Full Code Here

        return false;
      }
     
      setStatus("Selecting probe"); //$NON-NLS-1$
      htmllog.printLine("Selecting probe"); //$NON-NLS-1$
      Probe selected = analyzer.selectProbe(tempCandidates);
      if (selected == null) {
        //Nothing
      }
      else {
        //We also have to set the selected probe's group to be the correct one.
        ProbeGroup pg = (ProbeGroup) DesignUtils.getGroupWithType(p, ProbeGroup.GROUP_TYPE);
        if (pg != null) {
          pg.removeMember(p);
        }
       
        //Copy the selected probe
        p.copy(selected);

        if (pg != null) {
          pg.addMember(p);
        }
        //Print the selected probe to the log       
        String s = "Selected: "; //$NON-NLS-1$
        for (int i = 1; i <= p.getSequenceCount(); i++) {
          if (i > 1) {
            s += " - "; //$NON-NLS-1$
          }
          s += p.getSequence(i).getID();
        }
        htmllog.printLine(s);
        System.out.println(s);
        System.out.println("S " + selected.getPropertySet().getMultiPropertyValues("message"));
        System.out.println("SPair " + selected.getTSSPair().getPropertySet().getMultiPropertyValues("message"));
        System.out.println("P " + p.getPropertySet().getMultiPropertyValues("message"));
        System.out.println("PPair " + p.getTSSPair().getPropertySet().getMultiPropertyValues("message"));
       
       
      }
View Full Code Here

  /**Check if this probe is templated by other probes or targets*/
  public boolean checkTemplatingByOtherProbes(Probe p, DefiniteSequenceDB<? extends Probe> probes) {
    boolean found = false;
    //Iterate through all probes
    for (Iterator<? extends Probe> pi = probes.iterator(); pi.hasNext(); ) {
      Probe other = pi.next();
      //Check for templating and add messages accordingly
      if (other != p) {
        //Does other probe template this probe
        if (other.tagsAllocated()) {
          //Tags allocated, test as circle
          if (isLigationTemplate(other, p, true, false) != null) {
            ProbeMakerPropertyUtils.addMessage(p.getTSSPair(),new Message("May be templated by " + //$NON-NLS-1$
                other.getName(),
                OTHER_PROBE_IS_TEMPLATE,
                Message.ERROR));
            found = true;
          }
        }
        else {
          //Tags not allocated, test arms only (connected in ligation point)
          try {
            if (isLigationTemplate(new SimpleNucleotideSequence(other.getTSSPair().
                getSequence(TSSPair.KEY_THREE_PRIME).seqString() +
                other.getTSSPair().getSequence(TSSPair.KEY_FIVE_PRIME).seqString(),
                "Arms of " + other.getName(), //$NON-NLS-1$
                other.getType()), p, false, false) != null) {
              ProbeMakerPropertyUtils.addMessage(p.getTSSPair(),new Message("May be templated by " + //$NON-NLS-1$
                  other.getName(),
                  OTHER_PROBE_IS_TEMPLATE,
                  Message.ERROR));
              found = true;
            }
          }
View Full Code Here

TOP

Related Classes of org.moltools.apps.probemaker.seq.Probe

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.