Learn R Programming

rBiopaxParser (version 2.10.0)

addPhysicalEntity: This function adds a new physical entity.

Description

This function adds a new physical entity of chosen class to the biopax model. This is a convenience function to add physical entities, internally the function addBiopaxInstance is called with properties NAME and ORGANISM set.

Usage

addPhysicalEntity(biopax, class = c("dna", "rna", "protein", "smallMolecule", "complex")[1], NAME, id = NULL, ORGANISM = NULL, COMMENT = NULL)

Arguments

biopax
A biopax model
class
string. Class of the physical entity to add, choose from c("dna","rna","protein","smallMolecule","complex").
NAME
string. Name of the new physical entity
id
string. ID for the physical entity. If NULL a new ID is generated with prefix "physicalEntity".
ORGANISM
string. Organism property of the molecule. optional.
COMMENT
string. An optional comment

Value

Returns the biopax model with the added physical entity.

Examples

Run this code
biopax = createBiopax(level=2)
biopax = addBiopaxInstance(biopax, class="protein", id="id1", properties=list(NAME="protein1",COMMENT="this is my first protein!"))
biopax$dt
biopax = addPhysicalEntity(biopax, class="protein", id="id2", NAME="protein2", COMMENT="This is a protein added using the convenience function addPhysicalEntitiy")
biopax$dt

Run the code above in your browser using DataLab