Package com.affymetrix.genometryImpl.symmetry

Examples of com.affymetrix.genometryImpl.symmetry.SymWithProps


            int count2 = child.getChildCount();

            // reach "back" and get actual symmetry (rather than transformed symmetry)
            //   really need some sort of tracking in transform mechanism to associate calculated
            //   symmetries with original symmetries that they map back to...
            SymWithProps original_child = (SymWithProps) annot2protein.getChild(i);

            for (int j = 0; j < count2; j++) {
                SeqSymmetry grandchild = child.getChild(j);
                SeqSpan gSpan = grandchild.getSpan(vseq);
                LabelledRectGlyph cglyph = new LabelledRectGlyph();
        if(i%2 == 0) {
          cglyph.setColor(color);
        }
        else {
          cglyph.setColor(color.darker());
        }

        String spanno = "Span " + String.valueOf(i+1) + " of ";
        String interpro = (String) ((SymWithProps)annot2protein).getProperty("InterPro Name");
        if(interpro != null){
          spanno += interpro;
        }
        cglyph.setText(spanno);
                cglyph.setCoords(gSpan.getMin(), 0, gSpan.getLength(), 20);
                aGlyph.addChild(cglyph);
                seqmap.setDataModel(cglyph, original_child);
                original_child.setProperty("type", "protspan");
            }
        }
        tier.addChild(aGlyph);
    }
View Full Code Here


     */
    private void showProperties() {
        Set<Properties> propvec = new HashSet<Properties>();
        Properties props = null;
        for (GlyphI gl : selected) {
            SymWithProps info = null;
            Object candidate = gl.getInfo();
            if (candidate instanceof SymWithProps) {
                info = (SymWithProps) candidate;
                candidate = gl.getParent().getInfo();
        addParentInfo(candidate, info);
            } else {
                if (candidate instanceof SimpleMutableSeqSymmetry && exonList.contains((SeqSymmetry) candidate)) {
                    props = new Properties();
                    props.setProperty("start", String.valueOf((int) gl.getCoordBox().x));
                    props.setProperty("end", String.valueOf((int) (gl.getCoordBox().x + gl.getCoordBox().width)));
                    props.setProperty("length", String.valueOf((int) gl.getCoordBox().width));
                    props.setProperty("type", "exon");
                    candidate = gl.getParent().getInfo();
                    if (candidate instanceof SymWithProps) {
                        info = (SymWithProps) candidate;
                        for(Entry<Object,Object> E: props.entrySet()) {
              info.setProperty( (String) E.getKey(),E.getValue());
            }
                    }
                }
            }
            if (info != null) {
                if (info.getProperties() != null) {
                    propvec.add(convertPropsToProperties(info.getProperties()));
                }
            }
        }
    Properties[] prop_array = propvec.toArray(new Properties[propvec.size()]);
        table_view.showProperties(prop_array);
View Full Code Here

        table_view.showProperties(prop_array);
    }

  private void addParentInfo(Object candidate, SymWithProps info) {
    if (candidate instanceof SymWithProps) {
      SymWithProps parent = (SymWithProps) candidate;
      for (Entry<String, Object> E : parent.getProperties().entrySet()) {
        if (!Xml2GenometryParser.TYPESTR.equals(E.getKey()) &&
            !Xml2GenometryParser.AA_START.equals(E.getKey()) &&
            !Xml2GenometryParser.AA_END.equals(E.getKey()) &&
            !Xml2GenometryParser.AA_LENGTH.equals(E.getKey()) ) {
          info.setProperty(E.getKey(), E.getValue());
View Full Code Here

        for (int i = 0; i < children.getLength(); i++) {
            Node child = children.item(i);
            String nodename = child.getNodeName();
            if (nodename != null) {
                if (nodename.equalsIgnoreCase(EXONSTR)) {
                    SymWithProps exSym = processExon(genomic, (Element) child);
                    exSym.setProperty(TYPESTR, EXONSTR);
                    exon_list.add(exSym);
                } else if (nodename.equalsIgnoreCase("exon_insert")) {
                    exon_insert_list.add(child);
                }
            }
View Full Code Here

TOP

Related Classes of com.affymetrix.genometryImpl.symmetry.SymWithProps

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.