Search in sources :

Example 1 with RnaRegion

use of org.vcell.pathway.RnaRegion in project vcell by virtualcell.

the class PathwayReaderBiopax3 method addContentControl.

private boolean addContentControl(Control control, Element element, Element childElement) {
    if (addContentInteraction(control, element, childElement)) {
        return true;
    }
    /**
     * InteractionImpl controlledInteraction
     * Pathway controlledPathway
     * String controlType
     * ArrayList<Pathway> pathwayControllers
     * ArrayList<PhysicalEntity> physicalControllers
     */
    if (childElement.getName().equals("controller")) {
        // if (resourceAttribute != null){
        if (childElement.getChildren().size() == 0) {
            // if there are no children it must be a resource inside another object
            // we don't know yet whether it's Interaction or Pathway, we make a proxy for each
            // at the time when we solve the references we'll find out which is fake
            PhysicalEntityProxy proxyE = new PhysicalEntityProxy();
            addAttributes(proxyE, childElement);
            pathwayModel.add(proxyE);
            control.addPhysicalController(proxyE);
            PathwayProxy proxyP = new PathwayProxy();
            addAttributes(proxyP, childElement);
            pathwayModel.add(proxyP);
            control.getPathwayControllers().add(proxyP);
            return true;
        } else {
            for (Object child : element.getChildren()) {
                if (child instanceof Element) {
                    if (((Element) child).getName().equals("Pathway")) {
                        Pathway thingie = addObjectPathway((Element) child);
                        control.getPathwayControllers().add(thingie);
                        return true;
                    } else if (((Element) child).getName().equals("Complex")) {
                        Complex thingie = addObjectComplex((Element) child);
                        control.getPhysicalControllers().add(thingie);
                        return true;
                    } else if (((Element) child).getName().equals("Dna")) {
                        Dna thingie = addObjectDna((Element) child);
                        control.getPhysicalControllers().add(thingie);
                        return true;
                    } else if (((Element) child).getName().equals("DnaRegion")) {
                        DnaRegion thingie = addObjectDnaRegion((Element) child);
                        control.getPhysicalControllers().add(thingie);
                        return true;
                    } else if (((Element) child).getName().equals("Rna")) {
                        Rna thingie = addObjectRna((Element) child);
                        control.getPhysicalControllers().add(thingie);
                        return true;
                    } else if (((Element) child).getName().equals("RnaRegion")) {
                        RnaRegion thingie = addObjectRnaRegion((Element) child);
                        control.getPhysicalControllers().add(thingie);
                        return true;
                    } else if (((Element) child).getName().equals("Protein")) {
                        Protein thingie = addObjectProtein((Element) child);
                        control.getPhysicalControllers().add(thingie);
                        return true;
                    } else if (((Element) child).getName().equals("SmallMolecule")) {
                        SmallMolecule thingie = addObjectSmallMolecule((Element) child);
                        control.getPhysicalControllers().add(thingie);
                        return true;
                    } else {
                        return false;
                    }
                }
            }
        }
        return false;
    } else if (childElement.getName().equals("controlled")) {
        if (childElement.getChildren().size() == 0) {
            InteractionProxy proxyI = new InteractionProxy();
            addAttributes(proxyI, childElement);
            pathwayModel.add(proxyI);
            control.setControlledInteraction(proxyI);
            PathwayProxy proxyP = new PathwayProxy();
            addAttributes(proxyP, childElement);
            pathwayModel.add(proxyP);
            control.setControlledPathway(proxyP);
            return true;
        } else {
            for (Object child : childElement.getChildren()) {
                if (child instanceof Element) {
                    if (((Element) child).getName().equals("Pathway")) {
                        Pathway thingie = addObjectPathway((Element) child);
                        control.setControlledPathway(thingie);
                        return true;
                    } else {
                        Interaction thingie = (Interaction) addObjectBioPaxObjectSubclass((Element) child);
                        if (thingie == null) {
                            return false;
                        } else {
                            control.setControlledInteraction(thingie);
                            return true;
                        }
                    }
                // if(((Element)child).getName().equals("Pathway")) {
                // Pathway thingie = addObjectPathway((Element)child);
                // control.setControlledPathway(thingie);
                // return true;
                // } else if(((Element)child).getName().equals("Interaction")) {
                // Interaction thingie = addObjectInteraction((Element)child);
                // control.setControlledInteraction(thingie);
                // return true;
                // } else if(((Element)child).getName().equals("Control")) {
                // Control thingie = addObjectControl((Element)child);
                // control.setControlledInteraction(thingie);
                // return true;
                // } else if(((Element)child).getName().equals("Modulation")) {
                // Modulation thingie = addObjectModulation((Element)child);
                // control.setControlledInteraction(thingie);
                // return true;
                // } else if(((Element)child).getName().equals("Catalysis")) {
                // Catalysis thingie = addObjectCatalysis((Element)child);
                // control.setControlledInteraction(thingie);
                // return true;
                // } else if(((Element)child).getName().equals("TemplateReactionRegulation")) {
                // TemplateReactionRegulation thingie = addObjectTemplateReactionRegulation((Element)child);
                // control.setControlledInteraction(thingie);
                // return true;
                // } else if(((Element)child).getName().equals("Conversion")) {
                // Conversion thingie = addObjectConversion((Element)child);
                // control.setControlledInteraction(thingie);
                // return true;
                // } else if(((Element)child).getName().equals("BiochemicalReaction")) {
                // BiochemicalReaction thingie = addObjectBiochemicalReaction((Element)child);
                // control.setControlledInteraction(thingie);
                // return true;
                // } else if(((Element)child).getName().equals("TransportWithBiochemicalReaction")) {
                // TransportWithBiochemicalReaction thingie = addObjectTransportWithBiochemicalReaction((Element)child);
                // control.setControlledInteraction(thingie);
                // return true;
                // } else if(((Element)child).getName().equals("ComplexAssembly")) {
                // ComplexAssembly thingie = addObjectComplexAssembly((Element)child);
                // control.setControlledInteraction(thingie);
                // return true;
                // } else if(((Element)child).getName().equals("Degradation")) {
                // Degradation thingie = addObjectDegradation((Element)child);
                // control.setControlledInteraction(thingie);
                // return true;
                // } else if(((Element)child).getName().equals("Transport")) {
                // Transport thingie = addObjectTransport((Element)child);
                // control.setControlledInteraction(thingie);
                // return true;
                // } else if(((Element)child).getName().equals("GeneticInteraction")) {
                // GeneticInteraction thingie = addObjectGeneticInteraction((Element)child);
                // control.setControlledInteraction(thingie);
                // return true;
                // } else if(((Element)child).getName().equals("MolecularInteraction")) {
                // MolecularInteraction thingie = addObjectMolecularInteraction((Element)child);
                // control.setControlledInteraction(thingie);
                // return true;
                // } else if(((Element)child).getName().equals("TemplateReaction")) {
                // TemplateReaction thingie = addObjectTemplateReaction((Element)child);
                // control.setControlledInteraction(thingie);
                // return true;
                // } else {
                // return false;
                // }
                }
            }
        }
        return false;
    } else if (childElement.getName().equals("controlType")) {
        control.setControlType(childElement.getTextTrim());
        return true;
    } else {
        return false;
    }
}
Also used : InteractionProxy(org.vcell.pathway.persistence.BiopaxProxy.InteractionProxy) Rna(org.vcell.pathway.Rna) Pathway(org.vcell.pathway.Pathway) Interaction(org.vcell.pathway.Interaction) MolecularInteraction(org.vcell.pathway.MolecularInteraction) GeneticInteraction(org.vcell.pathway.GeneticInteraction) Element(org.jdom.Element) Protein(org.vcell.pathway.Protein) Complex(org.vcell.pathway.Complex) RnaRegion(org.vcell.pathway.RnaRegion) DnaRegion(org.vcell.pathway.DnaRegion) SmallMolecule(org.vcell.pathway.SmallMolecule) Dna(org.vcell.pathway.Dna) GroupObject(org.vcell.pathway.GroupObject) BioPaxObject(org.vcell.pathway.BioPaxObject) PathwayProxy(org.vcell.pathway.persistence.BiopaxProxy.PathwayProxy) PhysicalEntityProxy(org.vcell.pathway.persistence.BiopaxProxy.PhysicalEntityProxy)

Example 2 with RnaRegion

use of org.vcell.pathway.RnaRegion in project vcell by virtualcell.

the class PathwayReaderBiopax3 method addObjectPhysicalEntity.

private PhysicalEntity addObjectPhysicalEntity(Element element) {
    if (element.getChildren().size() == 0) {
        // we got lucky: no children, it means a reference -> create a proxy
        PhysicalEntityProxy proxy = new PhysicalEntityProxy();
        addAttributes(proxy, element);
        pathwayModel.add(proxy);
        return proxy;
    }
    for (Object child : element.getChildren()) {
        if (child instanceof Element) {
            Element childElement = (Element) child;
            // </bp:component>
            if (childElement.getName().equals("Complex")) {
                Complex thingie = addObjectComplex(childElement);
                pathwayModel.add(thingie);
                return thingie;
            } else if (childElement.getName().equals("Dna")) {
                Dna thingie = addObjectDna(childElement);
                pathwayModel.add(thingie);
                return thingie;
            } else if (childElement.getName().equals("DnaRegion")) {
                DnaRegion thingie = addObjectDnaRegion(childElement);
                pathwayModel.add(thingie);
                return thingie;
            } else if (childElement.getName().equals("Rna")) {
                Rna thingie = addObjectRna(childElement);
                pathwayModel.add(thingie);
                return thingie;
            } else if (childElement.getName().equals("RnaRegion")) {
                RnaRegion thingie = addObjectRnaRegion(childElement);
                pathwayModel.add(thingie);
                return thingie;
            } else if (childElement.getName().equals("Protein")) {
                Protein thingie = addObjectProtein(childElement);
                pathwayModel.add(thingie);
                return thingie;
            } else if (childElement.getName().equals("SmallMolecule")) {
                SmallMolecule thingie = addObjectSmallMolecule(childElement);
                pathwayModel.add(thingie);
                return thingie;
            }
        }
    }
    PhysicalEntity physicalEntity = new PhysicalEntity();
    if (element.getAttributes().size() > 0) {
        // real PhysicalEntity, with ID and everything
        addAttributes(physicalEntity, element);
    }
    for (Object child : element.getChildren()) {
        if (child instanceof Element) {
            Element childElement = (Element) child;
            if (!addContentPhysicalEntity(physicalEntity, element, childElement)) {
                showUnexpected(childElement);
            }
        }
    }
    pathwayModel.add(physicalEntity);
    return physicalEntity;
}
Also used : DnaRegion(org.vcell.pathway.DnaRegion) PhysicalEntity(org.vcell.pathway.PhysicalEntity) Rna(org.vcell.pathway.Rna) SmallMolecule(org.vcell.pathway.SmallMolecule) Dna(org.vcell.pathway.Dna) Element(org.jdom.Element) GroupObject(org.vcell.pathway.GroupObject) BioPaxObject(org.vcell.pathway.BioPaxObject) PhysicalEntityProxy(org.vcell.pathway.persistence.BiopaxProxy.PhysicalEntityProxy) Protein(org.vcell.pathway.Protein) Complex(org.vcell.pathway.Complex) RnaRegion(org.vcell.pathway.RnaRegion)

Example 3 with RnaRegion

use of org.vcell.pathway.RnaRegion in project vcell by virtualcell.

the class BioPaxObjectPropertiesPanel method refreshInterface.

protected void refreshInterface() {
    if (bioPaxObject == null) {
        // sanity check
        return;
    }
    ArrayList<BioPaxObjectProperty> propertyList = new ArrayList<BioPaxObjectProperty>();
    if (!(bioPaxObject instanceof SBEntity)) {
        tableModel.setData(propertyList);
        return;
    }
    SBEntity sbEntity = (SBEntity) bioPaxObject;
    if (!(sbEntity instanceof Entity)) {
        tableModel.setData(propertyList);
        return;
    }
    Entity entity = (Entity) sbEntity;
    // entity::type
    propertyList.add(new BioPaxObjectProperty("Type", bioPaxObject.getTypeLabel()));
    if (lookupContains(entity)) {
        propertyList.add(new BioPaxObjectProperty("Name", entity.getName().get(0) + " (looking...)"));
    } else if (entity.getFormalNames() != null && entity.getFormalNames().size() != 0) {
        propertyList.add(new BioPaxObjectProperty("Name", entity.getName().get(0) + " (" + entity.getFormalNames().get(0) + ")"));
    } else if (entity.getName() != null && entity.getName().size() > 0) {
        String displayName = entity.getName().get(0);
        if (entity.getxRef() != null && entity.getxRef().size() > 0) {
            displayName = displayName + " (double-click lookup)";
        }
        // entity::name
        propertyList.add(new BioPaxObjectProperty("Name", displayName));
    }
    // entity::Link
    for (RelationshipObject rObject : bioModel.getRelationshipModel().getRelationshipObjects(bioPaxObject)) {
        BioModelEntityObject beObject = rObject.getBioModelEntityObject();
        propertyList.add(new BioPaxObjectProperty("Linked physiology object", beObject.getName(), beObject));
    }
    if (entity instanceof PhysicalEntity) {
        // ------------------------ PHYSICAL ENTITY -----------------------
        PhysicalEntity physicalEntity = (PhysicalEntity) entity;
        // physicalEntity::feature (***ignored***)
        // physicalEntity::memberPhysicalEntity (***ignored***)
        // physicalEntity::notFeature (***ignored***)
        // TODO:  extract the kinetic law, then the SBEntities, then the measurables, units, aso
        boolean isReactionParticipant = BioPAXUtil.isReactionParticipant(physicalEntity, bioModel.getPathwayModel());
        String role = "";
        if (BioPAXUtil.isController(physicalEntity, bioModel.getPathwayModel())) {
            role += "Controller";
            if (isReactionParticipant) {
                role += ", Participant";
            }
        } else if (isReactionParticipant) {
            role += "Participant";
        }
        if (!role.isEmpty()) {
            propertyList.add(new BioPaxObjectProperty("Role(s)", role));
        }
        if (!(physicalEntity instanceof SmallMolecule)) {
            // physicalEntity::cellular location
            CellularLocationVocabulary cellularLocation = physicalEntity.getCellularLocation();
            if (cellularLocation != null && cellularLocation.getTerm() != null && cellularLocation.getTerm().size() > 0) {
                propertyList.add(new BioPaxObjectProperty("Cellular Location", cellularLocation.getTerm().get(0), cellularLocation));
            } else if (entity.getName() != null && entity.getName().size() > 1) {
                String location = entity.getName().get(1);
                if (location.contains("[") && location.contains("]")) {
                    location = location.substring(location.indexOf("[") + 1, location.indexOf("]"));
                    propertyList.add(new BioPaxObjectProperty("Cellular Location", location));
                }
            }
        }
        if (physicalEntity instanceof Complex) {
            Complex complex = (Complex) physicalEntity;
            // complex::components
            for (PhysicalEntity pe : complex.getComponents()) {
                propertyList.add(new BioPaxObjectProperty("Component", getEntityName(pe), pe));
            }
        } else if (physicalEntity instanceof Protein) {
        // Protein protein = (Protein)entity;
        // protein::entity reference (***ignored***)
        } else if (physicalEntity instanceof SmallMolecule) {
            SmallMolecule sm = (SmallMolecule) physicalEntity;
            EntityReference er = sm.getEntityReference();
            if (er != null && !er.getName().isEmpty() && er.getName().get(0) != null && !er.getName().get(0).isEmpty()) {
                propertyList.add(new BioPaxObjectProperty("Entity Reference", er.getName().get(0)));
                ArrayList<Xref> xrefList = er.getxRef();
                for (Xref xref : xrefList) {
                    propertyList.add(new BioPaxObjectProperty("   Xref", xref.getDb() + ":" + xref.getId(), xref));
                }
            }
        } else if (physicalEntity instanceof Dna) {
        // dna::entityReference (***ignored***)
        } else if (physicalEntity instanceof DnaRegion) {
        // dnaRegion::entityReference (***ignored***)
        } else if (physicalEntity instanceof Rna) {
        // rna::entityReference (***ignored***)
        } else if (physicalEntity instanceof RnaRegion) {
        // rnaRegion::entityReference (***ignored***)
        }
    } else if (entity instanceof Interaction) {
        // --------------------------- INTERACTION -------------------
        Interaction interaction = (Interaction) entity;
        // interaction::interactionType
        for (InteractionVocabulary interactionVocabulary : interaction.getInteractionTypes()) {
            if (interactionVocabulary.getTerm().size() > 0) {
                propertyList.add(new BioPaxObjectProperty("Interaction Type", interactionVocabulary.getTerm().get(0), interactionVocabulary));
            }
        }
        // interaction::participants
        for (InteractionParticipant interactionParticipant : interaction.getParticipants()) {
            PhysicalEntity physicalEntity = interactionParticipant.getPhysicalEntity();
            String physicalEntityName = physicalEntity.getName().size() > 0 ? physicalEntity.getName().get(0) : physicalEntity.getIDShort();
            String cellularLocation = "";
            if (physicalEntity.getCellularLocation() != null) {
                cellularLocation = physicalEntity.getCellularLocation().getTerm().size() > 0 ? " [" + physicalEntity.getCellularLocation().getTerm().get(0) + "]" : "";
            }
            propertyList.add(new BioPaxObjectProperty(interactionParticipant.getLevel3PropertyName(), physicalEntityName + cellularLocation, physicalEntity));
        }
        // get the controllers for interactions
        // we always need this because there's no guarantee we'll have kinetic laws
        // for instance pathway commons doesn't have quantitative information
        Set<String> controllersNames = getControllersNames(interaction);
        if (controllersNames.size() > 0) {
            for (String str : controllersNames) {
                // String tooltip = "<html>how many of these 12 M <br>average size  1.12345*E12 nm <br>temperature 37 degrees Celsius</html>";
                String tooltip = "";
                propertyList.add(new BioPaxObjectProperty("Controlled by", str, interaction, tooltip));
            }
        }
        // get the kinetic laws (if any)
        Set<Control> controls = BioPAXUtil.getControlsOfInteraction(interaction, bioModel.getPathwayModel());
        for (Control control : controls) {
            ArrayList<SBEntity> sbEntities = control.getSBSubEntity();
            for (SBEntity sbE : sbEntities) {
                // the only SBSubEntities allowed in a control are kinetic laws
                if (sbE.getID().contains("kineticLaw")) {
                    String str = new String();
                    if (control.getPhysicalControllers() != null) {
                        str += " for Controller(s): ";
                        for (PhysicalEntity ep : control.getPhysicalControllers()) {
                            if (ep.getName().size() > 0) {
                                str += ep.getName().get(0);
                            } else {
                                str += ep.getIDShort();
                            }
                            str += " ";
                        }
                    }
                    String sDetails = "";
                    ArrayList<SBVocabulary> sbTerms = sbE.getSBTerm();
                    for (SBVocabulary sbv : sbTerms) {
                        // type of kinetic law
                        String str1 = sbv.getID();
                        str1 = str1.substring(str1.lastIndexOf('#') + 1);
                        System.out.println(str1);
                        SBOTerm sboT = SBOListEx.sboMap.get(str1);
                        sDetails += "<font color=\"#660000\"><b>" + sboT.getName() + "</b></font>" + "  " + "<font color=\"#006600\">" + sboT.getDescription() + "</font>";
                        sDetails += "<br>";
                    }
                    ArrayList<SBEntity> klProperties = sbE.getSBSubEntity();
                    for (SBEntity klProperty : klProperties) {
                        if (klProperty instanceof SBMeasurable) {
                            SBMeasurable m = (SBMeasurable) klProperty;
                            String str1 = "";
                            String str2 = "";
                            String str3 = "";
                            if (m.hasTerm()) {
                                str1 += m.extractSBOTermAsString();
                            }
                            if (m.hasNumber()) {
                                str2 += m.getNumber().get(0);
                            }
                            if (m.hasUnit()) {
                                str3 += m.extractSBOUnitAsString();
                            }
                            // str1 is an SBO id, for example "SBO:0000064"
                            SBOTerm sboT = SBOListEx.sboMap.get(str1);
                            sDetails += sboT.getSymbol() + "   (" + sboT.getName() + ")" + "<font color=\"#660000\"><b>" + str2 + str3 + "</b></font>" + "  " + "<font color=\"#006600\">" + sboT.getDescription() + "</font>";
                        } else {
                            sDetails = klProperty.getIDShort() + "  " + klProperty.getTypeLabel();
                        }
                        sDetails += "<br>";
                    }
                    // String tooltip = "<html>how many of these 12 M <br>average size  1.12345*E12 nm <br>temperature 37 degrees Celsius</html>";
                    String tooltip = "";
                    BioPaxObjectProperty bpop = new BioPaxObjectProperty("Kinetic Law" + str, sbE.getID(), sbE, tooltip);
                    bpop.setDetails(sDetails);
                    propertyList.add(bpop);
                }
            }
        }
        if (interaction instanceof Control) {
            // TODO: is this ever being called?
            Control c = (Control) interaction;
            // catalysis::controlled
            Interaction controlledInteraction = c.getControlledInteraction();
            if (controlledInteraction != null) {
                String controlledName = controlledInteraction.getIDShort();
                if (controlledInteraction.getName().size() > 0) {
                    controlledName = controlledInteraction.getName().get(0);
                }
                propertyList.add(new BioPaxObjectProperty("Controlled Interaction", controlledName, controlledInteraction));
            }
        }
    } else if (entity instanceof GroupObject) {
        // ---------------------- GROUP OBJECT ------------------
        GroupObject groupObject = (GroupObject) entity;
        for (BioPaxObject bpo : groupObject.getGroupedObjects()) {
            propertyList.add(new BioPaxObjectProperty("Element::" + bpo.getTypeLabel(), getEntityName((Entity) bpo), bpo));
        }
    }
    // entity::comments
    for (String comment : entity.getComments()) {
        propertyList.add(new BioPaxObjectProperty("Comment", comment));
    }
    // entity::xRef
    ArrayList<Xref> xrefList = ((Entity) bioPaxObject).getxRef();
    for (Xref xref : xrefList) {
        if (xref instanceof UnificationXref) {
            propertyList.add(new BioPaxObjectProperty("Xref", xref.getDb() + ":" + xref.getId(), xref));
        }
    }
    for (Xref xref : xrefList) {
        if (xref instanceof RelationshipXref) {
            propertyList.add(new BioPaxObjectProperty("Xref (related)", xref.getDb() + ":" + xref.getId(), xref));
        }
    }
    for (Xref xref : xrefList) {
        if (xref instanceof PublicationXref) {
            propertyList.add(new BioPaxObjectProperty("Publication", xref.getDb() + ":" + xref.getId(), xref));
        }
    }
    // for(SBVocabulary sbVocab : sbEntity.getSBTerm()) {
    // propertyList.add(new BioPaxObjectProperty("SBO Term", SBPAXLabelUtil.makeLabel(sbVocab)));
    // }
    // if(sbEntity instanceof Interaction) {
    // // TODO: this goes away
    // Interaction interaction = (Interaction) sbEntity;
    // Set<SBEntity> subEntities = new HashSet<SBEntity>();
    // subEntities.add(interaction);
    // Set<Control> controls = BioPAXUtil.findAllControls(interaction, bioModel.getPathwayModel());
    // subEntities.addAll(controls);
    // subEntities = SBPAX3Util.extractAllEntities(subEntities);
    // for(SBEntity subEntity : subEntities) {
    // if(subEntity instanceof SBMeasurable) {
    // propertyList.add(new BioPaxObjectProperty("Measured quantity", SBPAXLabelUtil.makeLabel(subEntity)));
    // }
    // }
    // }
    tableModel.setData(propertyList);
}
Also used : SBVocabulary(org.vcell.pathway.sbpax.SBVocabulary) SBEntity(org.vcell.pathway.sbpax.SBEntity) PhysicalEntity(org.vcell.pathway.PhysicalEntity) Entity(org.vcell.pathway.Entity) Set(java.util.Set) TreeSet(java.util.TreeSet) HashSet(java.util.HashSet) Rna(org.vcell.pathway.Rna) PublicationXref(org.vcell.pathway.PublicationXref) InteractionVocabulary(org.vcell.pathway.InteractionVocabulary) BioPaxObject(org.vcell.pathway.BioPaxObject) ArrayList(java.util.ArrayList) CellularLocationVocabulary(org.vcell.pathway.CellularLocationVocabulary) SBEntity(org.vcell.pathway.sbpax.SBEntity) RelationshipObject(org.vcell.relationship.RelationshipObject) Complex(org.vcell.pathway.Complex) RnaRegion(org.vcell.pathway.RnaRegion) SBMeasurable(org.vcell.pathway.sbpax.SBMeasurable) Xref(org.vcell.pathway.Xref) UnificationXref(org.vcell.pathway.UnificationXref) RelationshipXref(org.vcell.pathway.RelationshipXref) PublicationXref(org.vcell.pathway.PublicationXref) Control(org.vcell.pathway.Control) DnaRegion(org.vcell.pathway.DnaRegion) EntityReference(org.vcell.pathway.EntityReference) Interaction(org.vcell.pathway.Interaction) UnificationXref(org.vcell.pathway.UnificationXref) GroupObject(org.vcell.pathway.GroupObject) SBOTerm(org.vcell.pathway.sbo.SBOTerm) BioModelEntityObject(cbit.vcell.model.BioModelEntityObject) Protein(org.vcell.pathway.Protein) RelationshipXref(org.vcell.pathway.RelationshipXref) PhysicalEntity(org.vcell.pathway.PhysicalEntity) SmallMolecule(org.vcell.pathway.SmallMolecule) Dna(org.vcell.pathway.Dna) InteractionParticipant(org.vcell.pathway.InteractionParticipant)

Example 4 with RnaRegion

use of org.vcell.pathway.RnaRegion in project vcell by virtualcell.

the class PathwayReaderBiopax3 method addObjectRnaRegion.

private RnaRegion addObjectRnaRegion(Element element) {
    RnaRegion rnaRegion = new RnaRegion();
    addAttributes(rnaRegion, element);
    for (Object child : element.getChildren()) {
        if (child instanceof Element) {
            Element childElement = (Element) child;
            if (!addContentRnaRegion(rnaRegion, element, childElement)) {
                showUnexpected(childElement);
            }
        }
    }
    pathwayModel.add(rnaRegion);
    return rnaRegion;
}
Also used : Element(org.jdom.Element) GroupObject(org.vcell.pathway.GroupObject) BioPaxObject(org.vcell.pathway.BioPaxObject) RnaRegion(org.vcell.pathway.RnaRegion)

Example 5 with RnaRegion

use of org.vcell.pathway.RnaRegion in project vcell by virtualcell.

the class PathwayProducerBiopax3 method addContentRnaRegion.

// entityReference 	EntityReference 	single
private Element addContentRnaRegion(BioPaxObject bpObject, Element element) {
    element = addContentPhysicalEntity(bpObject, element);
    RnaRegion ob = (RnaRegion) bpObject;
    Element tmpElement = null;
    if (ob.getEntityReference() != null) {
        tmpElement = new Element("entityReference", bp);
        addIDToProperty(tmpElement, ob.getEntityReference());
        mustPrintObject(ob.getEntityReference());
        element.addContent(tmpElement);
    }
    return element;
}
Also used : Element(org.jdom.Element) RnaRegion(org.vcell.pathway.RnaRegion)

Aggregations

RnaRegion (org.vcell.pathway.RnaRegion)6 Element (org.jdom.Element)5 BioPaxObject (org.vcell.pathway.BioPaxObject)5 GroupObject (org.vcell.pathway.GroupObject)4 Complex (org.vcell.pathway.Complex)3 Dna (org.vcell.pathway.Dna)3 DnaRegion (org.vcell.pathway.DnaRegion)3 Protein (org.vcell.pathway.Protein)3 Rna (org.vcell.pathway.Rna)3 SmallMolecule (org.vcell.pathway.SmallMolecule)3 Interaction (org.vcell.pathway.Interaction)2 PhysicalEntity (org.vcell.pathway.PhysicalEntity)2 PhysicalEntityProxy (org.vcell.pathway.persistence.BiopaxProxy.PhysicalEntityProxy)2 BioModelEntityObject (cbit.vcell.model.BioModelEntityObject)1 ArrayList (java.util.ArrayList)1 HashSet (java.util.HashSet)1 Set (java.util.Set)1 TreeSet (java.util.TreeSet)1 CellularLocationVocabulary (org.vcell.pathway.CellularLocationVocabulary)1 Control (org.vcell.pathway.Control)1