use of org.sbolstandard.core2.SBOLDocument in project libSBOLj by SynBioDex.
the class Provenance_SpecifyBuildOperations method specifyCutOperation.
/**
* specifies to perform a cut operation in order to linearize a vector using a restriction enzyme
*
* @throws Exception
*/
public static void specifyCutOperation() throws Exception {
// instantiate a document
SBOLDocument document = new SBOLDocument();
document.setDefaultURIprefix(BUILD_PREFIX);
ComponentDefinition vector = document.createComponentDefinition("vector", VECTOR_PLASMID);
vector.setName("vector");
ComponentDefinition enzyme = document.createComponentDefinition("restriction_enzyme", RESTRICTION_ENZYME);
enzyme.setName("restriction_enzyme");
// Create the generic top level entity for the cut operation
Activity activity = document.createActivity("cut_" + vector.getName() + "_with_" + enzyme.getName());
activity.setName("cut(" + vector.getName() + ", " + enzyme.getName() + ")");
// Create the qualifiedUsage annotation to describe the inputs of the cut operation
activity.createUsage("vector", vector.getIdentity()).addRole(VECTOR_PLASMID);
activity.createUsage("enzyme", enzyme.getIdentity()).addRole(RESTRICTION_ENZYME);
// the result of the cut operation
ComponentDefinition linearized_vector = document.createComponentDefinition("linearized_vector", LINEAR_DOUBLE_STRANDED_DNA);
linearized_vector.setName("linearized_vector");
linearized_vector.addWasGeneratedBy(activity.getIdentity());
// serialize the document to a file
SBOLWriter.write(document, System.out);
}
use of org.sbolstandard.core2.SBOLDocument in project libSBOLj by SynBioDex.
the class SequenceOutput method main.
public static void main(String[] args) throws Exception {
String prURI = "http://partsregistry.org/";
SBOLDocument document = new SBOLDocument();
document.setDefaultURIprefix(prURI);
document.setTypesInURIs(true);
Sequence seq = document.createSequence("BBa_J23119", "", "ttgacagctagctcagtcctaggtataatgctagc", URI.create("http://www.chem.qmul.ac.uk/iubmb/misc/naseq.html"));
seq.addWasDerivedFrom(URI.create("http://parts.igem.org/Part:BBa_J23119:Design"));
SBOLWriter.write(document, (System.out));
}
use of org.sbolstandard.core2.SBOLDocument in project libSBOLj by SynBioDex.
the class SimpleModuleDefinition method main.
public static void main(String[] args) throws Exception {
SBOLDocument document = new SBOLDocument();
setDefaultNameSpace(document, example.getNamespaceURI());
document.setTypesInURIs(true);
ModuleDefinition module = document.createModuleDefinition("GFP_expression");
FunctionalComponent cds = module.createFunctionalComponent("Constitutive_GFP", AccessType.PUBLIC, URI.create("http://sbolstandard.org/example/GFP_generator"), DirectionType.IN);
FunctionalComponent protein = module.createFunctionalComponent("GFP_protein", AccessType.PUBLIC, URI.create("http://sbolstandard.org/example/GFP"), DirectionType.OUT);
Interaction interaction = module.createInteraction("express_GFP", new HashSet<URI>(Arrays.asList(URI.create("Transcription"))));
interaction.createParticipation("CDS", cds.getIdentity(), SystemsBiologyOntology.PROMOTER);
interaction.createParticipation("Protein", protein.getIdentity(), SystemsBiologyOntology.PRODUCT);
SBOLWriter.write(document, (System.out));
}
use of org.sbolstandard.core2.SBOLDocument in project libSBOLj by SynBioDex.
the class SequenceConstraintOutput method main.
public static void main(String[] args) throws Exception {
String prURI = "http://partsregistry.org/";
SBOLDocument document = new SBOLDocument();
document.setDefaultURIprefix(prURI);
document.setTypesInURIs(true);
ComponentDefinition promoter = document.createComponentDefinition("BBa_K174004", "", new HashSet<URI>(Arrays.asList(ComponentDefinition.DNA)));
promoter.addRole(SequenceOntology.PROMOTER);
promoter.setName("pspac promoter");
promoter.setDescription("LacI repressible promoter");
ComponentDefinition constPromoter = document.createComponentDefinition("pspac", "", new HashSet<URI>(Arrays.asList(ComponentDefinition.DNA)));
constPromoter.addRole(SequenceOntology.PROMOTER);
constPromoter.setName("constitutive promoter");
constPromoter.setDescription("pspac core promoter region");
ComponentDefinition operator = document.createComponentDefinition("LacI_operator", "", new HashSet<URI>(Arrays.asList(ComponentDefinition.DNA)));
operator.addRole(SequenceOntology.OPERATOR);
operator.setName("LacI operator");
operator.setDescription("LacI binding site");
Component promoterComponent = promoter.createComponent("promoter", AccessType.PUBLIC, constPromoter.getIdentity());
Component operatorComponent = promoter.createComponent("operator", AccessType.PUBLIC, operator.getIdentity());
promoter.createSequenceConstraint("r1", RestrictionType.PRECEDES, promoterComponent.getIdentity(), operatorComponent.getIdentity());
SBOLWriter.write(document, (System.out));
}
use of org.sbolstandard.core2.SBOLDocument in project libSBOLj by SynBioDex.
the class AnnotationOutput method main.
public static void main(String[] args) throws Exception {
String prURI = "http://partsregistry.org/";
String prPrefix = "pr";
SBOLDocument document = new SBOLDocument();
document.setDefaultURIprefix(prURI);
document.setTypesInURIs(true);
document.addNamespace(URI.create(prURI), prPrefix);
ComponentDefinition promoter = document.createComponentDefinition("BBa_J23119", "", new HashSet<URI>(Arrays.asList(URI.create("http://www.biopax.org/release/biopax-level3.owl#DnaRegion"))));
promoter.addRole(SequenceOntology.PROMOTER);
promoter.setName("J23119");
promoter.setDescription("Constitutive promoter");
promoter.createAnnotation(new QName(prURI, "group", prPrefix), "iGEM2006_Berkeley");
promoter.createAnnotation(new QName(prURI, "experience", prPrefix), URI.create("http://parts.igem.org/cgi/partsdb/part_info.cgi?part_name=BBa_J23119"));
Annotation sigmaFactor = new Annotation(QName(prURI, "sigmafactor", prPrefix), "//rnap/prokaryote/ecoli/sigma70");
Annotation regulation = new Annotation(QName(prURI, "regulation", prPrefix), "//regulation/constitutive");
promoter.createAnnotation(new QName(prURI, "information", prPrefix), new QName(prURI, "Information", prPrefix), URI.create("http://partsregistry.org/cd/BBa_J23119/information"), new ArrayList<Annotation>(Arrays.asList(sigmaFactor, regulation)));
SBOLWriter.write(document, (System.out));
}
Aggregations