Package org.moltools.design.data.impl

Examples of org.moltools.design.data.impl.SimpleSubSequenceTemplate


  /**Returns the upstream part of the template (this is independent of target poly type)*/
  @Override
  protected void setTemplateForThreePrimeArm() {
    int pos = getTargetPosition();
    pat3 = new SimpleSubSequenceTemplate(this, "TEMPLATE|3|"+getID(), //$NON-NLS-1$
                           getType(), 1, pos - 1,
                           getID());

  }
View Full Code Here


  protected void setTemplateForFivePrimeArm() {
    //There are three different modes to consider, target is position (no poly), SNP or InDel
    TargettedSequence template;
    String tempID = "TEMPLATE|5|" + getID(); //$NON-NLS-1$
    if (targetPoly == 0) { //No poly
      template = new SimpleSubSequenceTemplate(this, tempID, getType(),
                             getTargetPosition(), length(), getID());
    }
    else { //Target is Poly
      Polymorphism poly = getPolys()[targetPoly - 1];
      if (poly instanceof SNP) {
       
        Nucleotide n = (Nucleotide) poly.getVariants()[variantIndex];
        if (n == null) {
          throw new UnsupportedOperationException("No target nucleotide found"); //$NON-NLS-1$
        }
       
        String full = n.getChar() + subsequence(getTargetPosition(),length());
       
        template = new SimpleSubSequenceTemplate(tempID,full, getType(),
                               getTargetPosition(), length(), getID());
       
      }
      else if (poly instanceof InDel) {
        switch (variantIndex) {
          case InDel.INS:
            template = new SimpleSubSequenceTemplate(this,tempID, getType(),
                                    getTargetPosition(), length(), getID());
            break;
          case InDel.DEL:
            template = new SimpleSubSequenceTemplate(this,tempID, getType(),
                                    getTargetPosition() + poly.length(), length(), getID());
            break;
          default:
            throw new UnsupportedOperationException(
                "Invalid InDel mode specified"); //$NON-NLS-1$
View Full Code Here

  /**Returns the part of the template upstream of the position*/
  @Override
  protected TargettedSequence getTemplateForFivePrime() {
    //return the sequence, and keep the probe arms 3' end fixed
    return new SimpleSubSequenceTemplate(this, "Template for 5' arm", //$NON-NLS-1$
                           getType(), 1,
                           targetPos, getID());
  }
View Full Code Here

  /**Returns the part of the template downstream of the position*/
  @Override
  protected TargettedSequence getTemplateForThreePrime() {
    //return the sequence, and keep the probe arms 5' end fixed
    return new SimpleSubSequenceTemplate(this, "Template for 3' arm", //$NON-NLS-1$
                           getType(), targetPos + 1,
                           length(), getID());
  }
View Full Code Here

  }

  /** Returns the whole sequence, fixed at 3' end of the primer*/
  @Override
  protected TargettedSequence getTemplateForThreePrime() {
    return new SimpleSubSequenceTemplate(this,"Template for 3'",DNA,1,length(),getID()); //$NON-NLS-1$
  }
View Full Code Here

    super(id,sequence,name);
  }
 
  @Override
  protected TargettedSequence getTemplateForFivePrime() {
    return new SimpleSubSequenceTemplate(this,"Template",getType(),1,length(),getID())//$NON-NLS-1$
  }
View Full Code Here

 
  /**Returns the downstream part of the template. This is different depending on the type of Poly
   * currently selected, if any. If a SNP is the current Poly, the target nucleotide is included.*/
  @Override
  protected void setTemplateForThreePrimeArm() {
    SimpleSubSequenceTemplate temp = null;
    Polymorphism[] polys = getPolys();
    if (targetPoly >= 0 && targetPoly < polys.length) { //target is Poly
      Polymorphism poly = polys[targetPoly];
      if (poly instanceof SNP) {
        if (variantIndex == 1) {
          temp = new SimpleSubSequenceTemplate(this, "Template for primer +", getType(), //$NON-NLS-1$
              getTargetPosition() + 1,
              length(), getID())
        }
        else {
          temp = new SimpleSubSequenceTemplate(this, "Template for primer -", getType(), //$NON-NLS-1$
              getTargetPosition() + 1,
              length(), getID());
        }
      }
      else {
View Full Code Here

TOP

Related Classes of org.moltools.design.data.impl.SimpleSubSequenceTemplate

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.