Examples of ProbeGroup


Examples of org.moltools.apps.probemaker.design.ProbeGroup

        //Nothing
      }
      else {
        //We also have to set the selected probe's group to be the correct one.
        //Find the group
        ProbeGroup pg = (ProbeGroup) DesignUtils.getGroupWithType(p, ProbeGroup.GROUP_TYPE);       
        //Remove the current probe from the group
        if (pg != null) {
          pg.removeMember(p);                     
        }       
        //Copy the selected probe
        p.copy(selected);

        //Add the copied probe to the group
        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) {
View Full Code Here

Examples of org.moltools.apps.probemaker.design.ProbeGroup

    TargetGroup tg = (TargetGroup) DesignUtils.getGroupWithType((PropertyHolder) p.getTarget(),TargetGroup.GROUP_TYPE);
    if (tg != null) {
      boolean groupfound = false;
      for (Iterator<Probe> i = probeset.iterator(); i.hasNext() && !groupfound; ) {
        Probe other = i.next();    
        ProbeGroup og = (ProbeGroup) DesignUtils.getGroupWithType(other,ProbeGroup.GROUP_TYPE);       
        if (og != null) {
          if (og.getTargetGroup() == tg) {
            og.addMember(p);
            groupfound = true;
          }
        }
      }
      //If no group found, create a new group
      if (!groupfound) {       
        ProbeGroup pg = new ProbeGroup(tg,tg.getID());
        pg.addMember(p);
      }
    }
    return p;
  }
View Full Code Here

Examples of org.moltools.apps.probemaker.design.ProbeGroup

    TargetGroup tg = (TargetGroup) DesignUtils.getGroupWithType((PropertyHolder) p.getTarget(),TargetGroup.GROUP_TYPE);
    if (tg != null) {
      boolean groupfound = false;
      for (Iterator<Probe> i = probeset.iterator(); i.hasNext() && !groupfound; ) {
        Probe other = i.next();    
        ProbeGroup og = (ProbeGroup) DesignUtils.getGroupWithType(other,ProbeGroup.GROUP_TYPE);       
        if (og != null) {
          if (og.getTargetGroup() == tg) {
            og.addMember(p);
            groupfound = true;
          }
        }
      }
      //If no group found, create a new group
      if (!groupfound) {       
        ProbeGroup pg = new ProbeGroup(tg,tg.getID());
        pg.addMember(p);
      }
    }
    return p;
  }
View Full Code Here

Examples of org.moltools.apps.probemaker.design.ProbeGroup

    probeE.setAttribute(ID,pr.getID(),ns);

    probeE.addContent(new Element(NAME,ns).addContent(pr.getName()));
    probeE.addContent(new Element(TYPE,ns).addContent(String.valueOf(pr.getType())));

    ProbeGroup group = (ProbeGroup) DesignUtils.getGroupWithType(pr,ProbeGroup.GROUP_TYPE);
    if (group != null) {
      String groupStr = group.getID();
      Element groupE = new Element(PROBE_GROUP,ns).setAttribute(ID,groupStr,ns);
      Group<?> tGroup = group.getTargetGroup();
      if (tGroup!=null) {
        String tGroupStr = tGroup.getID();
        groupE.setAttribute(TARGET_GROUP,tGroupStr,ns);     
      }
      probeE.addContent(groupE);
View Full Code Here

Examples of org.moltools.apps.probemaker.design.ProbeGroup

      byte type = Byte.parseByte(typeStr);
      byte rank = Byte.parseByte(rankStr);

      //Set the probe group, if any
      ProbeGroup pg = null;     
      Element groupE = probeE.getChild(PROBE_GROUP,ns);
      if (groupE != null) {
        String groupID = groupE.getAttributeValue(ID,ns);
        Attribute att = groupE.getAttribute(TARGET_GROUP,ns);
        TargetGroup tg = null;
        if (att!=null) {
          String tGroupID = att.getValue();
          tg = targetGroups.get(tGroupID);
        }
        pg = probeGroups.get(groupID);
        if (pg != null) {
          pg = new ProbeGroup(tg,groupID);
          probeGroups.put(groupID, pg);
        }
      }     

      //TSSPair
View Full Code Here

Examples of org.moltools.apps.probemaker.design.ProbeGroup

    c2 = new DefaultProbe(null,0,0,NucleotideSequence.DNA);
    c2.setID("PROBE_2"); //$NON-NLS-1$
    c3 = new DefaultProbe(null,0,0,NucleotideSequence.DNA);
    c3.setID("PROBE_3"); //$NON-NLS-1$

    g1 = new ProbeGroup(null,"G1"); //$NON-NLS-1$
    g2 = new ProbeGroup(null,"G2"); //$NON-NLS-1$
    g1.addMember(c1);
    g2.addMember(c2);
    g2.addMember(c3);

    tat = new TagAllocationTable();
View Full Code Here

Examples of org.moltools.apps.probemaker.design.ProbeGroup

    //Make a list of probe groups
    List<ProbeGroup> p_groups = new ArrayList<ProbeGroup>();
    for (Iterator<Probe> i = proj.getProbes().iterator(); i.hasNext(); ) {
      Probe pr = i.next();
      ProbeGroup pg = (ProbeGroup) DesignUtils.getGroupWithType(pr,ProbeGroup.GROUP_TYPE);
      if (pg != null) {
        if (!p_groups.contains(pg)) {
          p_groups.add(pg);
        }
      }
    }

    //Print the probe groups - targetGroup;groupTagLibrary;groupTagNumber;
    p.println(TITLE_DESCRIPTOR + PROBE_GROUPS);
    for (Iterator<ProbeGroup> i = p_groups.iterator(); i.hasNext(); ) {
      ProbeGroup pg = i.next();
      TargetGroup tg = pg.getTargetGroup();
      int tg_no = tg == null ? -1 : groups.indexOf(tg);
      int lib_no = -1;
      int tag_no = -1;
      String tagID = proj.getTagAllocationTable().getGroupTagID(pg);
      if (tagID != null) {
View Full Code Here

Examples of org.moltools.apps.probemaker.design.ProbeGroup

      tgIndex++;
      int pgindex = Integer.parseInt(substrings[0]);
      int libindex = Integer.parseInt(substrings[1]);
      int tagindex = Integer.parseInt(substrings[2]);
      if (pgindex >= 0) {
        ProbeGroup pg = new ProbeGroup(groups.get(pgindex),String.valueOf(pgindex+1));
        if (libindex >= 0)
          proj.getTagAllocationTable().setGroupTagID(pg, libraries[libindex].getSequenceAt(tagindex));
        p_groups.add(pg);
      }
      else {
        ProbeGroup pg = new ProbeGroup(null,"DUMMY"); //$NON-NLS-1$
        p_groups.add(pg);
      }
    }

    //Read and create all probes
View Full Code Here

Examples of org.moltools.apps.probemaker.design.ProbeGroup

   
    Probe p1 = new DefaultProbe(NucleotideSequence.DNA);
    p1.setID("P1");
   
    TargetGroup tg = new TargetGroup("tg");
    ProbeGroup pg = new ProbeGroup(tg, "PG");
    assertEquals(0, pg.getMembers().size());
    pg.addMember(p1);
    assertEquals(1, pg.getMembers().size());
    p1.setName("Probe 1");   
    pg.removeMember(p1);
    assertEquals(0, pg.getMembers().size());
 
View Full Code Here

Examples of org.moltools.apps.probemaker.design.ProbeGroup

        //Nothing
      }
      else {
        //We also have to set the selected probe's group to be the correct one.
        //Find the group
        ProbeGroup pg = (ProbeGroup) DesignUtils.getGroupWithType(p, ProbeGroup.GROUP_TYPE);       
        //Remove the current probe from the group
        if (pg != null) {
          pg.removeMember(p);                     
        }       
        //Copy the selected probe
        p.copy(selected);

        //Add the copied probe to the group
        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) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.