• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java Species类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.sbml.jsbml.Species的典型用法代码示例。如果您正苦于以下问题:Java Species类的具体用法?Java Species怎么用?Java Species使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



Species类属于org.sbml.jsbml包,在下文中一共展示了Species类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: generateReplacedBy

import org.sbml.jsbml.Species; //导入依赖的package包/类
/**
 * Convert the given SBOL MapsTo object into SBML replacedBy for the given remote and local SBOL ModuleDefinition.
 * Annotation will be performed on SBML replacedBy for any SBOL MapsTo information that can't be mapped directly.
 * 
 * @param mapping - The SBOL MapsTo to be converted to SBML replacedBy.  
 * @param subModule - The SBOL Module that is considered to be the remote model in the replacedBy object.
 * @param moduleDef - The SBOL ModuleDefinition that is considered to be the local model in the replacedBy object.
 * @param sbolDoc - The SBOL Document that contains the SBOL objects to convert to SBML replacedBy.
 * @param subTargetModel - The SBML remote model that contain the SBML replacedBy.
 * @param targetModel - The SBML local model that contain the SBML replacedBy.
 */
private static void generateReplacedBy(MapsTo mapping, Module subModule, ModuleDefinition moduleDef, 
		SBOLDocument sbolDoc, BioModel subTargetModel, BioModel targetModel) {
	ModuleDefinition subModuleDef = sbolDoc.getModuleDefinition(subModule.getDefinitionURI());
	FunctionalComponent remoteSpecies = subModuleDef.getFunctionalComponent(mapping.getRemoteURI());
	FunctionalComponent localSpecies = moduleDef.getFunctionalComponent(mapping.getLocalURI());

	Species localSBMLSpecies = targetModel.getSBMLDocument().getModel().getSpecies(getDisplayID(localSpecies));
	Port port = subTargetModel.getPortByIdRef(getDisplayID(remoteSpecies));
	SBMLutilities.addReplacedBy(localSBMLSpecies, getDisplayID(subModule), port.getId(), new String[]{""}, 
			new String[]{""}, new String[]{""}, new String[]{""});

	// Annotate SBML replaced-by with SBOL maps-to
	CompSBasePlugin compSBML = SBMLutilities.getCompSBasePlugin(localSBMLSpecies);
	SBMLutilities.setDefaultMetaID(targetModel.getSBMLDocument(), compSBML.getReplacedBy(), 1);
	annotateReplacedBy(compSBML.getReplacedBy(), mapping);
}
 
开发者ID:MyersResearchGroup,项目名称:iBioSim,代码行数:28,代码来源:SBOL2SBML.java


示例2: speciesToVector

import org.sbml.jsbml.Species; //导入依赖的package包/类
/**
 * Species to vector.
 *
 * @param s the s
 * @return the vector
 */
private Vector<Object> speciesToVector(Species s){
	Vector<Object> v = new Vector<Object>();
	v.add(s.getId());
	if(s.isSetInitialAmount()){
		v.add("amount");
		v.add(s.getInitialAmount());
	} else if(s.isSetInitialConcentration()){
		v.add("concentration");
		v.add(s.getInitialConcentration());
	}
	v.add(s.getCompartment());
	v.add(s.getSubstanceUnits());
	v.add(s.getHasOnlySubstanceUnits());
	v.add(s.getBoundaryCondition());
	v.add(s.getConstant());
	
	return v;
}
 
开发者ID:spatialsimulator,项目名称:XitoSBML,代码行数:25,代码来源:SpeciesTable.java


示例3: edit

import org.sbml.jsbml.Species; //导入依赖的package包/类
@Override
void edit(int index) throws IllegalArgumentException{
	if(index == -1 ) return ;
	if(sd == null)
		sd = new SpeciesDialog(model);
	Species s = sd.showDialog((Species) memberList.get(index));
	
	if(s == null) return;
	
	memberList.set(index, s);

	// copy contents of Species(JTable) to Species(Model)
	Species sp = (Species) list.getElementBySId(s.getId());
	SBMLProcessUtil.copySpeciesContents(s, sp);

	((MyTableModel)table.getModel()).updateRow(index, speciesToVector(s));
	
}
 
开发者ID:spatialsimulator,项目名称:XitoSBML,代码行数:19,代码来源:SpeciesTable.java


示例4: showDialog

import org.sbml.jsbml.Species; //导入依赖的package包/类
/**
 * Show dialog.
 *
 * @return the species
 * @throws IllegalArgumentException the illegal argument exception
 * @throws IdentifierException the identifier exception
 */
public Species showDialog()throws IllegalArgumentException, IdentifierException{
	gd = new GenericDialog("Add Species");
	gd.setResizable(true);
	gd.pack();

	gd.addStringField("id:", "");
	gd.addRadioButtonGroup("initial:", initial, 1, 2, "amount");
	gd.addNumericField("quantity:", 0, 1);
	gd.addChoice("compartment:", SBMLProcessUtil.listIdToStringArray(model.getListOfCompartments()), null);
	gd.addChoice("substanceUnit:", units, null);
	gd.addRadioButtonGroup("boundaryCondition:",bool,1,2,"false");
	gd.addRadioButtonGroup("constant:",bool,1,2,"false");
	
	gd.showDialog();
	if(gd.wasCanceled())
		return null;

	species  = model.createSpecies();
	setSpeciesData();
	
	return species;
}
 
开发者ID:spatialsimulator,项目名称:XitoSBML,代码行数:30,代码来源:SpeciesDialog.java


示例5: completeSpecies

import org.sbml.jsbml.Species; //导入依赖的package包/类
/**
 * Complete species.
 *
 * @param species
 *        the species
 * @return ListOf<Species>
 *         TODO
 */
public static ListOf<Species> completeSpecies(ListOf<Species> species) {
  int i = 0;
  for (Species s : species) {
    if (!s.isSetId()) {
      s.setId(s.getClass().getSimpleName() + i++);
    }
    if (!s.isSetCompartment()) {
      s.setCompartment(model.getCompartment(0));
    }
    if (!s.isSetHasOnlySubstanceUnits()) {
      s.setHasOnlySubstanceUnits(true);
    }
    if (!s.isSetBoundaryCondition()) {
      s.setBoundaryCondition(true);
    }
    if (!s.isSetConstant()) {
      s.setConstant(true);
    }
  }
  return species;
}
 
开发者ID:funasoul,项目名称:celldesigner-parser,代码行数:30,代码来源:SBMLModelCompleter.java


示例6: completeSpeciesReference

import org.sbml.jsbml.Species; //导入依赖的package包/类
/**
 * Complete species reference.
 *
 * @param speciesReference
 *        the species reference
 * @return ListOf<SpeciesReference>
 *         TODO
 */
public static ListOf<SpeciesReference> completeSpeciesReference(
  ListOf<SpeciesReference> speciesReference) {
  for (SpeciesReference sr : speciesReference) {
    if (!sr.isSetSpecies()){
      Species s = model.getSpecies(sr.getId());
      if(s == null) {
        sr.setSpecies(model.getSpecies(0));
      } else {
        sr.setSpecies(s);
      }
    }
    if (!sr.isSetStoichiometry()) {
      sr.setStoichiometry(1d);
    }
    if (!sr.isSetConstant()) {
      sr.setConstant(true);
    }
  }
  return speciesReference;
}
 
开发者ID:funasoul,项目名称:celldesigner-parser,代码行数:29,代码来源:SBMLModelCompleter.java


示例7: createInterSpecies

import org.sbml.jsbml.Species; //导入依赖的package包/类
private static Species createInterSpecies(String inputSubSpeciesID, String outputSubSpeciesID, 
		String inputSubDNA, String outputSubDNA, BioModel biomodel) {
	String speciesID;
	int speciesIndex = 0;
	if (outputSubDNA.length() == 0 && inputSubDNA.length() > 0) {
		speciesID = inputSubSpeciesID;
		while (biomodel.isSIdInUse(speciesID)) {
			speciesID = inputSubSpeciesID + "_" + speciesIndex;
			speciesIndex++;
		}
	} else {
		speciesID = outputSubSpeciesID;
		while (biomodel.isSIdInUse(speciesID)) {
			speciesID = outputSubSpeciesID + "_" + speciesIndex;
			speciesIndex++;
		}
	}
	biomodel.createSpecies(speciesID, 0, 0);
	return biomodel.getSBMLDocument().getModel().getSpecies(speciesID);
}
 
开发者ID:MyersResearchGroup,项目名称:iBioSim,代码行数:21,代码来源:Synthesizer.java


示例8: isPromoterSpecies

import org.sbml.jsbml.Species; //导入依赖的package包/类
public static boolean isPromoterSpecies(Species species) {
	if (species.isSetSBOTerm()) {
		if (species.getSBOTerm()==GlobalConstants.SBO_OLD_PROMOTER_SPECIES) {
			species.setSBOTerm(GlobalConstants.SBO_PROMOTER_BINDING_REGION);
			return true;
		}
		if (species.getSBOTerm()==GlobalConstants.SBO_PROMOTER_SPECIES) {
			species.setSBOTerm(GlobalConstants.SBO_PROMOTER_BINDING_REGION);
			return true;
		} else if (species.getSBOTerm()==GlobalConstants.SBO_PROMOTER_BINDING_REGION) {
			return true;
		} else if (species.getSBOTermID().equals(GlobalConstants.SBO_DNA_SEGMENT)) {
			//species.setSBOTerm(GlobalConstants.SBO_PROMOTER_BINDING_REGION);
			return true;
			// TODO: assuming DNA_SEGMENT is promoter
		}
	}
	if (AnnotationUtility.checkObsoleteAnnotation(species,GlobalConstants.TYPE+"="+GlobalConstants.PROMOTER)) {
		species.setSBOTerm(GlobalConstants.SBO_PROMOTER_BINDING_REGION);
		AnnotationUtility.removeObsoleteAnnotation(species);
		return true;
	}
	return false;
}
 
开发者ID:MyersResearchGroup,项目名称:iBioSim,代码行数:25,代码来源:BioModel.java


示例9: getDegradationReaction

import org.sbml.jsbml.Species; //导入依赖的package包/类
public static Reaction getDegradationReaction(String speciesId, Model sbmlModel) {
	String componentId = "";
	String shortSpeciesId = speciesId;
	if (speciesId.contains("__")) {
		componentId = speciesId.substring(0,speciesId.lastIndexOf("__")+2);
		shortSpeciesId = speciesId.substring(speciesId.lastIndexOf("__")+2);
	}
	Reaction degradation = sbmlModel.getReaction(componentId + GlobalConstants.DEGRADATION + "_" + shortSpeciesId);
	if (degradation == null) {
		for (int i = 0; i < sbmlModel.getReactionCount(); i++) {
			Reaction r = sbmlModel.getReaction(i);
			if (BioModel.isDegradationReaction(r) && r.hasReactant(new Species(speciesId)))
				return r;
		}
	} else if (BioModel.isDegradationReaction(degradation))
		return degradation;
	return null;
}
 
开发者ID:MyersResearchGroup,项目名称:iBioSim,代码行数:19,代码来源:BioModel.java


示例10: getProductionReaction

import org.sbml.jsbml.Species; //导入依赖的package包/类
public static Reaction getProductionReaction(String promoterId, Model sbmlModel) {
	String componentId = "";
	String shortPromoterId = promoterId;
	if (promoterId.contains("__")) {
		componentId = promoterId.substring(0, promoterId.lastIndexOf("__") + 2);
		shortPromoterId = promoterId.substring(promoterId.lastIndexOf("__") + 2);
	}
	Reaction production = sbmlModel.getReaction(componentId + GlobalConstants.PRODUCTION + "_" + shortPromoterId);
	if (production == null)
		for (int i = 0; i < sbmlModel.getReactionCount(); i++) {
			Reaction r = sbmlModel.getReaction(i);
			if (BioModel.isProductionReaction(r) && r.hasModifier(new Species(promoterId)))
				return r;
		}
	else if (BioModel.isProductionReaction(production))
		return production;
	return null;
}
 
开发者ID:MyersResearchGroup,项目名称:iBioSim,代码行数:19,代码来源:BioModel.java


示例11: getComplexReaction

import org.sbml.jsbml.Species; //导入依赖的package包/类
public static Reaction getComplexReaction(String speciesId, Model sbmlModel) {
	String componentId = "";
	String shortSpeciesId = speciesId;
	if (speciesId.contains("__")) {
		componentId = speciesId.substring(0,speciesId.lastIndexOf("__")+2);
		shortSpeciesId = speciesId.substring(speciesId.lastIndexOf("__")+2);
	}
	Reaction complexation = sbmlModel.getReaction(componentId + GlobalConstants.COMPLEXATION 
			+ "_" + shortSpeciesId);
	if (complexation == null) {
		for (int i = 0; i < sbmlModel.getReactionCount(); i++) {
			Reaction r = sbmlModel.getReaction(i);
			if (BioModel.isComplexReaction(r) && r.hasProduct(new Species(speciesId)))
				return r;
		}
	} else if (BioModel.isComplexReaction(complexation))
		return complexation;
	return null;
}
 
开发者ID:MyersResearchGroup,项目名称:iBioSim,代码行数:20,代码来源:BioModel.java


示例12: parseSpeciesArrayAnnotation

import org.sbml.jsbml.Species; //导入依赖的package包/类
public static int[] parseSpeciesArrayAnnotation(Species species) {
	String annotation;
	try {
		annotation = species.getAnnotationString().replace("<annotation>", "").replace("</annotation>", "").trim();
		Pattern arrayPattern = Pattern.compile(SPECIES_ARRAY_ANNOTATION);
		Matcher arrayMatcher = arrayPattern.matcher(annotation);
		if (arrayMatcher.find()) {
			if (arrayMatcher.group(1)!=null && arrayMatcher.group(2)!=null &&
					arrayMatcher.group(3)!=null && arrayMatcher.group(4)!=null) {
				int[] result = new int[4];
				result[0] = Integer.parseInt(arrayMatcher.group(1));
				result[1] = Integer.parseInt(arrayMatcher.group(2));
				result[2] = Integer.parseInt(arrayMatcher.group(3));
				result[3] = Integer.parseInt(arrayMatcher.group(4));
				return result;
			}
		}
	}
	catch (XMLStreamException e) {
		// TODO Auto-generated catch block
		e.printStackTrace();
	}
	return null;
}
 
开发者ID:MyersResearchGroup,项目名称:iBioSim,代码行数:25,代码来源:AnnotationUtility.java


示例13: printRNAP

import org.sbml.jsbml.Species; //导入依赖的package包/类
/**
 * Prints the RNAP molecule to the document
 * 
 * @param document
 *            the SBML document
 */
private void printRNAP(SBMLDocument document) {
	double rnap = 30;
	if (properties != null) {
		rnap = Double.parseDouble(properties.getParameter(GlobalConstants.RNAP_STRING));
	}
	Species s = Utility.makeSpecies("RNAP", document.getModel().getCompartment(0).getId(), rnap, -1);		
	s.setHasOnlySubstanceUnits(true);
	Utility.addSpecies(document, s);
	//Adds RNA polymerase for compartments other than default
	this.compartments = new HashMap<String,Properties>(); 
	for (int i=0; i < document.getModel().getCompartmentCount(); i++) {
		compartments.put(document.getModel().getCompartment(i).getId(), null);
	}
	for (String compartment : compartments.keySet()) {
		Properties prop = compartments.get(compartment);
		if (prop != null && prop.containsKey(GlobalConstants.RNAP_STRING)) {
			rnap = Double.parseDouble((String)prop.get(GlobalConstants.RNAP_STRING));
		}
		Species sc = Utility.makeSpecies(compartment + "__RNAP", compartment, rnap, -1);
		sc.setHasOnlySubstanceUnits(true);
		Utility.addSpecies(document, sc);
	}
}
 
开发者ID:MyersResearchGroup,项目名称:iBioSim,代码行数:30,代码来源:GeneticNetwork.java


示例14: visitSpasticSpecies

import org.sbml.jsbml.Species; //导入依赖的package包/类
@Override
public void visitSpasticSpecies(SpasticSpecies specie) {
	loadValues(specie);
	String compartment = checkCompartments(specie.getId());
	Species s = Utility.makeSpecies(specie.getId(), compartment, amount, concentration);
	s.setName(specie.getName());
	s.setHasOnlySubstanceUnits(true);
	Utility.addSpecies(document, s);
	
	r = new org.sbml.jsbml.Reaction(GlobalConstants.SBML_LEVEL, GlobalConstants.SBML_VERSION);
	r.setId("Constitutive_production_" + s.getId());
	r.setCompartment(compartment);
	r.addProduct(Utility.SpeciesReference(s.getId(), specie.getnp()));
	
	r.setReversible(false);
	//r.setFast(false);
	kl = r.createKineticLaw();
	Utility.Parameter(kl, "kp", specie.getKo());
	kl.setMath(SBMLutilities.myParseFormula("kp"));
	Utility.addReaction(document, r);		
}
 
开发者ID:MyersResearchGroup,项目名称:iBioSim,代码行数:22,代码来源:PrintSpeciesVisitor.java


示例15: visitDiffusibleConstitutiveSpecies

import org.sbml.jsbml.Species; //导入依赖的package包/类
@Override
public void visitDiffusibleConstitutiveSpecies(DiffusibleConstitutiveSpecies specie) {
	
	loadValues(specie);
	String compartment = checkCompartments(specie.getId());
	Species s = Utility.makeSpecies(specie.getId(), compartment, amount, concentration);
	s.setName(specie.getName());
	s.setHasOnlySubstanceUnits(true);
	Utility.addSpecies(document, s);
	
	r = new org.sbml.jsbml.Reaction(GlobalConstants.SBML_LEVEL, GlobalConstants.SBML_VERSION);
	r.setId("Constitutive_production_" + s.getId());
	r.setCompartment(compartment);
	r.addProduct(Utility.SpeciesReference(s.getId(), Double.parseDouble(parameters.getParameter(GlobalConstants.STOICHIOMETRY_STRING))));
	
	r.setReversible(false);
	//r.setFast(false);
	kl = r.createKineticLaw();
	Utility.Parameter(kl, "kp", Double.parseDouble(parameters
				.getParameter((GlobalConstants.OCR_STRING))));	
	kl.setMath(SBMLutilities.myParseFormula("kp"));
	Utility.addReaction(document, r);	
}
 
开发者ID:MyersResearchGroup,项目名称:iBioSim,代码行数:24,代码来源:PrintSpeciesVisitor.java


示例16: checkUnitsInAssignmentRule

import org.sbml.jsbml.Species; //导入依赖的package包/类
public static boolean checkUnitsInAssignmentRule(SBMLDocument document, Rule rule)
{
	UnitDefinition unitDef = rule.getDerivedUnitDefinition();
	UnitDefinition unitDefVar;
	Species species = document.getModel().getSpecies(getVariable(rule));
	Compartment compartment = document.getModel().getCompartment(getVariable(rule));
	Parameter parameter = document.getModel().getParameter(getVariable(rule));
	if (species != null)
	{
		unitDefVar = species.getDerivedUnitDefinition();
	}
	else if (compartment != null)
	{
		unitDefVar = compartment.getDerivedUnitDefinition();
	}
	else
	{
		unitDefVar = parameter.getDerivedUnitDefinition();
	}
	if (!UnitDefinition.areEquivalent(unitDef, unitDefVar))
	{
		return true;
	}
	return false;
}
 
开发者ID:MyersResearchGroup,项目名称:iBioSim,代码行数:26,代码来源:SBMLutilities.java


示例17: checkUnitsInInitialAssignment

import org.sbml.jsbml.Species; //导入依赖的package包/类
public static boolean checkUnitsInInitialAssignment(SBMLDocument document, InitialAssignment init)
{
	UnitDefinition unitDef = init.getDerivedUnitDefinition();
	UnitDefinition unitDefVar;
	Species species = document.getModel().getSpecies(init.getVariable());
	Compartment compartment = document.getModel().getCompartment(init.getVariable());
	Parameter parameter = document.getModel().getParameter(init.getVariable());
	if (species != null)
	{
		unitDefVar = species.getDerivedUnitDefinition();
	}
	else if (compartment != null)
	{
		unitDefVar = compartment.getDerivedUnitDefinition();
	}
	else
	{
		unitDefVar = parameter.getDerivedUnitDefinition();
	}
	if (!UnitDefinition.areEquivalent(unitDef, unitDefVar))
	{
		return true;
	}
	return false;
}
 
开发者ID:MyersResearchGroup,项目名称:iBioSim,代码行数:26,代码来源:SBMLutilities.java


示例18: checkUnitsInEventAssignment

import org.sbml.jsbml.Species; //导入依赖的package包/类
public static boolean checkUnitsInEventAssignment(SBMLDocument document, EventAssignment assign)
{
	UnitDefinition unitDef = assign.getDerivedUnitDefinition();
	UnitDefinition unitDefVar;
	Species species = document.getModel().getSpecies(assign.getVariable());
	Compartment compartment = document.getModel().getCompartment(assign.getVariable());
	Parameter parameter = document.getModel().getParameter(assign.getVariable());
	if (species != null)
	{
		unitDefVar = species.getDerivedUnitDefinition();
	}
	else if (compartment != null)
	{
		unitDefVar = compartment.getDerivedUnitDefinition();
	}
	else
	{
		unitDefVar = parameter.getDerivedUnitDefinition();
	}
	if (unitDef != null && unitDefVar != null && !UnitDefinition.areEquivalent(unitDef, unitDefVar))
	{
		return true;
	}
	return false;
}
 
开发者ID:MyersResearchGroup,项目名称:iBioSim,代码行数:26,代码来源:SBMLutilities.java


示例19: generateReplacement

import org.sbml.jsbml.Species; //导入依赖的package包/类
/**
 * Convert the given SBOL MapsTo object into SBML replacement for the given remote and local SBOL ModuleDefinition.
 * Annotation will be performed on SBML replacement for any SBOL MapsTo information that can't be mapped directly.
 * 
 * @param mapping - The SBOL MapsTo to be converted to SBML replacement.  
 * @param subModule - The SBOL Module that is considered to be the remote model in the replacement object.
 * @param moduleDef - The SBOL ModuleDefinition that is considered to be the local model in the replacement object.
 * @param sbolDoc - The SBOL Document that contains the SBOL objects to convert to SBML replacement.
 * @param subTargetModel - The SBML remote model that contain the SBML replacement.
 * @param targetModel - The SBML local model that contain the SBML replacement.
 */
private static void generateReplacement(MapsTo mapping, Module subModule, ModuleDefinition moduleDef, 
		SBOLDocument sbolDoc, BioModel subTargetModel, BioModel targetModel) {
	ModuleDefinition subModuleDef = sbolDoc.getModuleDefinition(subModule.getDefinitionURI()); 
	FunctionalComponent remoteSpecies = subModuleDef.getFunctionalComponent(mapping.getRemoteURI());
	FunctionalComponent localSpecies = moduleDef.getFunctionalComponent(mapping.getLocalURI());

	Species localSBMLSpecies = targetModel.getSBMLDocument().getModel().getSpecies(getDisplayID(localSpecies));
	Port port = subTargetModel.getPortByIdRef(getDisplayID(remoteSpecies));
	if (port==null) {
		System.out.println("Cannot find "+getDisplayID(remoteSpecies));
		//return;
	}

	Submodel subModel = targetModel.getSBMLCompModel().getSubmodel(getDisplayID(subModule));
	SBMLutilities.addReplacement(localSBMLSpecies, subModel, getDisplayID(subModule), port.getId(), "(none)", 
			new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, false);

	// Annotate SBML replacment with SBOL maps-to
	CompSBasePlugin compSBML = SBMLutilities.getCompSBasePlugin(localSBMLSpecies);
	SBMLutilities.setDefaultMetaID(targetModel.getSBMLDocument(), compSBML.getReplacedElement(compSBML.getNumReplacedElements() - 1), 1);
	annotateReplacement(compSBML.getReplacedElement(compSBML.getNumReplacedElements() - 1), mapping);
}
 
开发者ID:MyersResearchGroup,项目名称:iBioSim,代码行数:34,代码来源:SBOL2SBML.java


示例20: generateSpecies

import org.sbml.jsbml.Species; //导入依赖的package包/类
/**
 * Convert the given SBOL FunctionalComponent to  its equivalent SBML species. 
 * SBO terms will be assigned to the generated SBML species to retain the type of SBOL FunctionalComponent.
 * Annotation will be performed on the species for any FunctionalComponent information that can't be mapped directly to the SBML species. 
 * 
 * @param species - The SBOL FunctionalComponent to convert to SBML species.
 * @param sbolDoc - The SBOL Document that contains the SBOL objects to convert to SBML promoter species.
 * @param targetModel - The SBML model to store the SBML promoter species created from the conversion.
 */
private static void generateSpecies(FunctionalComponent species, SBOLDocument sbolDoc, BioModel targetModel) {
	targetModel.createSpecies(getDisplayID(species), -1, -1);
	Species sbmlSpecies = targetModel.getSBMLDocument().getModel().getSpecies(getDisplayID(species));
	sbmlSpecies.setBoundaryCondition(species.getDirection().equals(DirectionType.IN));
	if (isDNAComponent(species,sbolDoc)) {
		sbmlSpecies.setSBOTerm(GlobalConstants.SBO_DNA_SEGMENT);
	} else if (isRNAComponent(species,sbolDoc)) {
		sbmlSpecies.setSBOTerm(GlobalConstants.SBO_RNA_SEGMENT);
	} else if (isProteinComponent(species,sbolDoc)) {
		sbmlSpecies.setSBOTerm(GlobalConstants.SBO_PROTEIN);
	} else if (isComplexComponent(species,sbolDoc)) {
		sbmlSpecies.setSBOTerm(GlobalConstants.SBO_NONCOVALENT_COMPLEX);
	} else if (isSmallMoleculeComponent(species,sbolDoc)) {
		sbmlSpecies.setSBOTerm(GlobalConstants.SBO_SIMPLE_CHEMICAL);
	}
	// Annotate SBML species with SBOL component and component definition
	annotateSpecies(sbmlSpecies, species, sbolDoc);	
}
 
开发者ID:MyersResearchGroup,项目名称:iBioSim,代码行数:28,代码来源:SBOL2SBML.java



注:本文中的org.sbml.jsbml.Species类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java RestartRandomRs类代码示例发布时间:2022-05-23
下一篇:
Java VirtualEthernetCardDistributedVirtualPortBackingInfo类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap