Package org.moltools.design.data

Examples of org.moltools.design.data.Target


     
      log.printLineAndHeader("Validating targets"); //$NON-NLS-1$
      setStatus(CoreMessages.getString("ProbeDesignTask.MESSAGE_VALIDATING")); //$NON-NLS-1$
      //Check the validity of validatable targets
      for (Iterator<ProbeMakerTarget> ti = targets.iterator(); ti.hasNext(); ) {
        Target target = ti.next();
        if (target instanceof ValidatingTarget) {
          ValidatingTarget vt = (ValidatingTarget) target;
          switch (vt.isValidTarget()) {
            case ValidatingTarget.OK:
              break;
            case ValidatingTarget.INVALID:
              throw new UnsupportedOperationException(target.getID() +
                  CoreMessages.getString("ProbeDesignTask.MESSAGE_INVALID")); //$NON-NLS-1$
            case VariantTarget.NOT_SET:
              throw new UnsupportedOperationException(target.getID() +
                  CoreMessages.getString("ProbeDesignTask.MESSAGE_NO_VARIANT")); //$NON-NLS-1$
            default:
              throw new IllegalArgumentException("Unexpected result from Target.isValidTarget()"); //$NON-NLS-1$
         
        }       
View Full Code Here


      log.printSectionHeader("Validating targets"); //$NON-NLS-1$
      setStatus(CoreMessages.getString("ProbeDesignTask.MESSAGE_VALIDATING")); //$NON-NLS-1$
      //Check the validity of validatable targets
      for (Iterator<ProbeMakerTarget> ti = targets.iterator(); ti.hasNext(); ) {
        Target target = ti.next();
        if (target instanceof ValidatingTarget) {
          ValidatingTarget vt = (ValidatingTarget) target;
          switch (vt.isValidTarget()) {
          case ValidatingTarget.OK:
            break;
          case ValidatingTarget.INVALID:
            throw new UnsupportedOperationException(target.getID() +
                CoreMessages.getString("ProbeDesignTask.MESSAGE_INVALID")); //$NON-NLS-1$
          case VariantTarget.NOT_SET:
            throw new UnsupportedOperationException(target.getID() +
                CoreMessages.getString("ProbeDesignTask.MESSAGE_NO_VARIANT")); //$NON-NLS-1$
          default:
            throw new IllegalArgumentException("Unexpected result from Target.isValidTarget()"); //$NON-NLS-1$
         
        }       
View Full Code Here

  public TableCellEditor getCellEditor(int row, int col) {
    if (col == 1) {
      return new DefaultCellEditor(new TargetTextField());
    }
    else if (col == 2) {
      Target t = (Target) dataModel.getSequenceAt(row);
      if (t instanceof VariantTarget) {
        Object[] variants = new Object[0];
        try {
          variants = ((VariantTarget) t).getVariants();
          if (variants != null) {
View Full Code Here

  }

  @Override
  public Object getValueAt(int parm1, int parm2) {
    try {
      Target s = (Target) getSequenceAt(parm1);
      if (parm2 == 2) {
        if (s instanceof VariantTarget) {
          Variant v = ((VariantTarget) s).getVariant();
          if (v == null) {
            return NOT_SET_STRING;
View Full Code Here

  }

  @Override
  public void setValueAt(Object value, int row, int col) {
    try {
      Target t = (Target) getSequenceAt(row);
      if (!(t instanceof ChangeableNucleotideSequence)) {
        throw new UnsupportedOperationException("Sequence not editable"); //$NON-NLS-1$
      }
      ChangeableNucleotideSequence s = (ChangeableNucleotideSequence) t;
      switch (col) {
View Full Code Here

      //Validate targets before starting design
      log.printSectionHeader("Validating targets"); //$NON-NLS-1$
      setStatus(CoreMessages.getString("ProbeDesignTask.MESSAGE_VALIDATING")); //$NON-NLS-1$
      //Check the validity of validatable targets
      for (Iterator<ProbeMakerTarget> ti = targets.iterator(); ti.hasNext(); ) {
        Target target = ti.next();
        if (target instanceof ValidatingTarget) {
          ValidatingTarget vt = (ValidatingTarget) target;
          switch (vt.isValidTarget()) {
          case ValidatingTarget.OK:
            break;
          case ValidatingTarget.INVALID:
            throw new UnsupportedOperationException(target.getID() +
                CoreMessages.getString("ProbeDesignTask.MESSAGE_INVALID")); //$NON-NLS-1$
          case VariantTarget.NOT_SET:
            throw new UnsupportedOperationException(target.getID() +
                CoreMessages.getString("ProbeDesignTask.MESSAGE_NO_VARIANT")); //$NON-NLS-1$
          default:
            throw new IllegalArgumentException("Unexpected result from Target.isValidTarget()"); //$NON-NLS-1$
         
        }       
View Full Code Here

    ListSequenceDB<S> targets = (ListSequenceDB<S>) ListSequenceDB.getDefaultBuilder().buildDB(sequenceDataMaps,sequenceBuilder);
    for (int i = 0;i< targets.size();i++) {
      try {
        //If target supports Polymorphism objects,
        //go through each polymorphism in the target
        Target t = (Target) targets.getSequenceAt(i);       
        if (t instanceof AbstractComplexTarget) {
          AbstractComplexTarget at = (AbstractComplexTarget) t;
          Variant[] vars = at.getVariants();
          Polymorphism[] polys = at.getPolys();
          for (int p = 0, var = 0;p<polys.length;p++) {
View Full Code Here

  public <S extends Sequence> DefiniteSequenceDB<S> buildDB(Collection<Map<String, String>> sequenceDataMaps,
      ObjectBuilder<S> sequenceBuilder) throws DuplicateIDException {
    ListSequenceDB<S> targets = (ListSequenceDB<S>) ListSequenceDB.getDefaultBuilder().buildDB(sequenceDataMaps,sequenceBuilder);
    for (Iterator<S> i = targets.iterator();i.hasNext();) {
      try {
        Target t = (Target) i.next();
        if (t instanceof VariantTarget) {
          VariantTarget vt = (VariantTarget) t;
          Variant[] variants = vt.getVariants();
          if (variants != null)
            if (variants.length > 0)
View Full Code Here

            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)) {
View Full Code Here

    super(
        new SequenceWriter<T>() {
          public void writeSequence(PrintWriter ps, T p) {

            List<String> record = new ArrayList<String>();
            Target t = p.getTarget();
            record.add(p.getID());
            record.add(p.getName());
            record.add(p.seqString());
            for (Sequence s : p.getSequences()) {             
              record.add(s.getID());
View Full Code Here

TOP

Related Classes of org.moltools.design.data.Target

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.