当前位置: 首页>>代码示例>>Java>>正文


Java Species.setSBOTerm方法代码示例

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


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

示例1: 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

示例2: 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

示例3: createPromoterFromGCM

import org.sbml.jsbml.Species; //导入方法依赖的package包/类
public void createPromoterFromGCM(String s,Properties property) {
	Species promoter = sbml.getModel().getSpecies(s);
	if (promoter==null) {
		promoter = sbml.getModel().createSpecies();
		promoter.setId(s);
	}
	if (property != null && property.containsKey(GlobalConstants.PROMOTER_COUNT_STRING)) {
		promoter.setInitialAmount(Double.parseDouble(property.getProperty(GlobalConstants.PROMOTER_COUNT_STRING)));
	} else {
		promoter.setInitialAmount(sbml.getModel().getParameter(GlobalConstants.PROMOTER_COUNT_STRING).getValue());
	} 
	promoter.setCompartment(getDefaultCompartment());
	promoter.setBoundaryCondition(false);
	promoter.setConstant(false);
	promoter.setHasOnlySubstanceUnits(true);
	promoter.setSBOTerm(GlobalConstants.SBO_PROMOTER_BINDING_REGION);
	if (property==null) {
		createProductionReaction(s,GlobalConstants.ACTIVATED_STRING,
				GlobalConstants.STOICHIOMETRY_STRING,
				GlobalConstants.OCR_STRING,
				GlobalConstants.KBASAL_STRING,
				GlobalConstants.RNAP_BINDING_STRING,
				GlobalConstants.ACTIVATED_RNAP_BINDING_STRING,false,null);
	} else {
		createProductionReaction(s,property.getProperty(GlobalConstants.ACTIVATED_STRING),
				property.getProperty(GlobalConstants.STOICHIOMETRY_STRING),
				property.getProperty(GlobalConstants.OCR_STRING),
				property.getProperty(GlobalConstants.KBASAL_STRING),
				property.getProperty(GlobalConstants.RNAP_BINDING_STRING),
				property.getProperty(GlobalConstants.ACTIVATED_RNAP_BINDING_STRING),false,null);
	}
}
 
开发者ID:MyersResearchGroup,项目名称:iBioSim,代码行数:33,代码来源:BioModel.java

示例4: isMRNASpecies

import org.sbml.jsbml.Species; //导入方法依赖的package包/类
public static boolean isMRNASpecies(SBMLDocument doc, Species species) {
	for (int i = 0; i < doc.getModel().getReactionCount(); i++) {
		Reaction r = doc.getModel().getReaction(i);
		if (isProductionReaction(r)) continue;
		for (int j = 0; j < r.getReactantCount(); j++) {
			if (r.getReactant(j).getSpecies().equals(species.getId())) return false;
		}
		for (int j = 0; j < r.getModifierCount(); j++) {
			if (r.getModifier(j).getSpecies().equals(species.getId())) return false;
		}
		for (int j = 0; j < r.getProductCount(); j++) {
			if (r.getProduct(j).getSpecies().equals(species.getId())) return false;
		}
	}
	if (species.isSetSBOTerm()) {
		if (species.getSBOTerm()==GlobalConstants.SBO_MRNA || species.getSBOTerm()==GlobalConstants.SBO_MRNA_OLD) {
			species.setSBOTerm(GlobalConstants.SBO_MRNA);
			return species.getId().endsWith("_mRNA");
		}
	}
	if (AnnotationUtility.checkObsoleteAnnotation(species,GlobalConstants.TYPE+"="+GlobalConstants.MRNA)) {
		species.setSBOTerm(GlobalConstants.SBO_MRNA);
		AnnotationUtility.removeObsoleteAnnotation(species);
		return species.getId().endsWith("_mRNA");
	}
	return false;
}
 
开发者ID:MyersResearchGroup,项目名称:iBioSim,代码行数:28,代码来源:BioModel.java

示例5: createPromoter

import org.sbml.jsbml.Species; //导入方法依赖的package包/类
public String createPromoter(String promoterId, float x, float y, boolean isExplicit, 
		boolean createProduction, String reactionId) {
	createProductionDefaultParameters();
	String compartment;
	compartment = getCompartmentByLocation(x,y,GlobalConstants.DEFAULT_SPECIES_WIDTH,GlobalConstants.DEFAULT_SPECIES_HEIGHT);
	if (compartment.equals("")) {
		if (sbml.getModel().getCompartmentCount()==0) {
		  message.setErrorDialog("Compartment Required", "Species must be placed within a compartment.");
       this.notifyObservers(message);
			return "";
		}
		compartment = sbml.getModel().getCompartment(0).getId();
	} 
	Species promoter = sbml.getModel().createSpecies();
	// Set default species ID
	if (promoterId == null) {
		do {
			creatingPromoterID++;
			promoterId = "P" + String.valueOf(creatingPromoterID);
		}
		while (SBMLutilities.getElementBySId(sbml, promoterId)!=null);
	}
	promoter.setId(promoterId);
	// Set default promoter metaID
	metaIDIndex = SBMLutilities.setDefaultMetaID(sbml, promoter, metaIDIndex); 
	
	promoter.setSBOTerm(GlobalConstants.SBO_PROMOTER_BINDING_REGION);
	promoter.setInitialAmount(sbml.getModel().getParameter(GlobalConstants.PROMOTER_COUNT_STRING).getValue());

	promoter.setCompartment(compartment);
	SBMLutilities.cloneDimensionAddIndex(sbml.getModel().getCompartment(compartment),promoter,"compartment");
	promoter.setBoundaryCondition(false);
	promoter.setConstant(false);
	promoter.setHasOnlySubstanceUnits(true);
	if (createProduction)
		createProductionReaction(promoterId, reactionId, null, null, null, null, null, null, false, null);
	if (isExplicit) {
		Layout layout = getLayout();
		SpeciesGlyph speciesGlyph = null;
		if (layout.getSpeciesGlyph(GlobalConstants.GLYPH+"__"+promoterId)!=null) {
			speciesGlyph = layout.getSpeciesGlyph(GlobalConstants.GLYPH+"__"+promoterId);
		} else {
			speciesGlyph = layout.createSpeciesGlyph(GlobalConstants.GLYPH+"__"+promoterId);
			speciesGlyph.createBoundingBox();
			speciesGlyph.getBoundingBox().createDimensions();
			speciesGlyph.getBoundingBox().createPosition();
			speciesGlyph.setSpecies(promoterId);
		}
		speciesGlyph.getBoundingBox().getPosition().setX(x);
		speciesGlyph.getBoundingBox().getPosition().setY(y);
		speciesGlyph.getBoundingBox().getDimensions().setWidth(GlobalConstants.DEFAULT_SPECIES_WIDTH);
		speciesGlyph.getBoundingBox().getDimensions().setHeight(GlobalConstants.DEFAULT_SPECIES_HEIGHT);
		TextGlyph textGlyph = layout.createTextGlyph(GlobalConstants.TEXT_GLYPH+"__"+promoterId);
		textGlyph.createBoundingBox();
		textGlyph.getBoundingBox().createDimensions();
		textGlyph.getBoundingBox().createPosition();
		textGlyph.setGraphicalObject(GlobalConstants.GLYPH+"__"+promoterId);
		textGlyph.setText(SBMLutilities.getArrayId(sbml,promoterId));
		textGlyph.setBoundingBox(speciesGlyph.getBoundingBox().clone());
	}

	return promoterId;
}
 
开发者ID:MyersResearchGroup,项目名称:iBioSim,代码行数:64,代码来源:BioModel.java


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