Package org.moltools.lib.seq

Examples of org.moltools.lib.seq.Sequence


     
    }
    //Go through each tag of this combination
    for (int pos = 0; pos < combination.length; pos++) {
      //Check if the tag is used in any other tag position
      Sequence tag1 = taglibraries[pos].getSequenceAt(combination[pos]);
      for (int pos2 = 0; pos2 < combination.length; pos2++) {
        //Check with each other position
        Sequence tag2 = taglibraries[pos2].getSequenceAt(combination[pos2]);
        //if the tags are equal
        if (tag1.equals(tag2)) {
          //OK if same position or both positions in allowed mode
          if (pos != pos2) {
            if (! (allowed[pos] && allowed[pos2])) {
View Full Code Here


    this.probemaker = pm;
   
    popupMenu.add(new AbstractAction("Remove probe") {     //$NON-NLS-1$
      public void actionPerformed(ActionEvent e) {
        int row = getTable().getSelectedRow();
        Sequence s = getTableModel().getSequenceAt(row);       
        //Check if to remove target
        int result = JOptionPane.showOptionDialog(getTable(),"Remove target of probe as well?","Remove probe",JOptionPane.YES_NO_CANCEL_OPTION,JOptionPane.QUESTION_MESSAGE,null,null,null); //$NON-NLS-1$ //$NON-NLS-2$
        switch (result) {
          case JOptionPane.CANCEL_OPTION:           
            break;
View Full Code Here

    p.println(groups.size());

    //Print the target type
    p.println(TITLE_DESCRIPTOR + TARGET_TYPE);
    if (proj.getTargets().size() > 0) {
      Sequence target = proj.getTargets().getSequenceAt(0);
      p.println(target.getClass().getName());
    }
    else {
      p.println(""); //$NON-NLS-1$
    }
View Full Code Here

  }
 
  @Override
  protected String renderHTMLInternal(Object s) {
    Element root = new Element("sequence");     //$NON-NLS-1$
    Sequence seq = (Sequence) s;
   
    if (isShowID()) addIDHeader(root,seq);
   
    if (isShowName() && seq instanceof Named)
      addName(root,(Named) seq);
View Full Code Here

        if (dbBuilder == null)
          dbBuilder = ListSequenceDB.getDefaultBuilder();
        List<Map<String,String>> maps = new ArrayList<Map<String,String>>();

        for (Iterator<? extends NucleotideSequence> i = transferdb.iterator();i.hasNext();) {
          Sequence s = i.next();
          Map<String,String> m = new HashMap<String, String>();
          m.put(SequenceBuilder.PROPERTY_NAME,s.getID());
          m.put(SequenceBuilder.PROPERTY_SEQUENCE_DATA,s.seqString());
          m.put(SequenceBuilder.PROPERTY_ID,s.getID());
          maps.add(m);
        }
        database.addSequences(dbBuilder.buildDB(maps,seqBuilder));
      }
      catch (UnsupportedFlavorException e) {
View Full Code Here

    tssPairE.addContent(getMessageListElement(ProbeMakerPropertyUtils.getOwnMessages(tssPair)));
    probeE.addContent(tssPairE);
    //Create an ordered list of all subsequences
    Element seqList = new Element(SUB_SEQUENCES,ns);
    for (int s = 1;s<=pr.getSequenceCount();s++) {
      Sequence seq = pr.getSequence(s);
      Element seqE = null;
      String seqID = seq.getID();
      //Check the type of sequence based on its ID
      //ID in tssIDs - TSS
      if (tssIDs.contains(seqID)) {
        seqE = new Element(TSS,ns);
        seqE.setAttribute(ID,seqID,ns);       
      }
      //ID starts with "Spacer" - spacer tag
      else if (seqID.startsWith("Spacer")) { //$NON-NLS-1$
        seqE = new Element(SPACER,ns);
        seqE.setAttribute(ID,seqID,ns);
        seqE.addContent(new Element(TYPE,ns).addContent(String.valueOf(((NucleotideSequence) seq).getType())));
        seqE.addContent(new Element(SEQUENCE,ns).addContent(seq.seqString()));           
      }
      //Otherwise - normal tag
      else if (seq instanceof NucleotideSequence){
        KeyValue kv = getLibraryTag(libraries,seqID);
        if (kv == null) {
          //Tag not in any library
          seqE = getTagElement(TAG,(NucleotideSequence) seq);           
        }
        else {
          //Tag in lib, just print ID
          seqE = new Element(TAG_ID,ns);         
          seqE.setAttribute(ID,seqID,ns);
        }        
      }

      else throw new UnsupportedOperationException("Unsupported subsequence " + seq.getID() + " of " + pr.getID() + ": " + seq.getClass()); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
      seqList.addContent(seqE);
    }
    probeE.addContent(seqList);
    probeE.addContent(getMessageListElement(ProbeMakerPropertyUtils.getOwnMessages(pr)));
    return probeE;
View Full Code Here

     
    }
    //Go through each tag of this combination
    for (int pos = 0; pos < combination.length; pos++) {
      //Check if the tag is used in any other tag position
      Sequence tag1 = taglibraries[pos].getSequenceAt(combination[pos]);
      for (int pos2 = 0; pos2 < combination.length; pos2++) {
        //Check with each other position
        Sequence tag2 = taglibraries[pos2].getSequenceAt(combination[pos2]);
        //if the tags are equal
        if (tag1.equals(tag2)) {
          //OK if same position or both positions in allowed mode
          if (pos != pos2) {
            if (! (allowed[pos] && allowed[pos2])) {
View Full Code Here

   * @see org.moltools.apps.probemaker.module.InterAnalysisModule#doInterAnalysis(org.moltools.apps.probemaker.seq.Probe, org.moltools.lib.seq.db.DefiniteSequenceDB, org.moltools.apps.probemaker.ProbeDesigner)
   */
  public void doAnalysis(Probe p, TagAllocator pd, DefiniteSequenceDB<? extends Probe> probes) {
    if (tests[0].perform()) {
     
      Sequence target = (Sequence) p.getTarget();
           
      //Check GC
      Property prop = gcanalysis.analyze(target).get(0);
     
      float percentGC = ((Float) prop.getValue()).floatValue();
View Full Code Here

  }
 
  @Override
  protected String renderHTMLInternal(Object s) {
    Element root = new Element("sequence");     //$NON-NLS-1$
    Sequence seq = (Sequence) s;
   
    if (isShowID()) addIDHeader(root,seq);
   
    if (isShowName() && seq instanceof Named)
      addName(root,(Named) seq);
View Full Code Here

    this.probemaker = pm;
   
    popupMenu.add(new AbstractAction("Remove probe") {     //$NON-NLS-1$
      public void actionPerformed(ActionEvent e) {
        int row = getTable().getSelectedRow();
        Sequence s = getTableModel().getSequenceAt(row);       
        //Check if to remove target
        int result = JOptionPane.showOptionDialog(getTable(),"Remove target of probe as well?","Remove probe",JOptionPane.YES_NO_CANCEL_OPTION,JOptionPane.QUESTION_MESSAGE,null,null,null); //$NON-NLS-1$ //$NON-NLS-2$
        switch (result) {
          case JOptionPane.CANCEL_OPTION:           
            break;
View Full Code Here

TOP

Related Classes of org.moltools.lib.seq.Sequence

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.