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

Java Organism类代码示例

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

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



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

示例1: usesOldEnsembl

import org.bridgedb.bio.Organism; //导入依赖的package包/类
private boolean usesOldEnsembl(Pathway pwy)
{
	Organism org = Organism.fromLatinName(pwy.getMappInfo().getOrganism());
	if (!ensSpecies.containsKey(org))
		return false; // this pwy is not one of the species to be converted

	for (PathwayElement elt : pwy.getDataObjects())
	{
		if (elt.getObjectType() == ObjectType.DATANODE &&
				elt.getDataSource() == BioDataSource.ENSEMBL)
		{
			return true;
		}
	}
	return false;
}
 
开发者ID:PathVisio,项目名称:pathvisio,代码行数:17,代码来源:Compat.java


示例2: convertEnsembl

import org.bridgedb.bio.Organism; //导入依赖的package包/类
/**
 * Ensembl considers each species database as separate,
 * and thus they should have separate system codes as well.
 * This method will convert generic Ensembl datanodes
 * to species specific datanodes if possible.
 */
private void convertEnsembl(Pathway pwy)
{
	Organism org = Organism.fromLatinName(pwy.getMappInfo().getOrganism());
	if (!ensSpecies.containsKey(org))
		return; // this pwy is not one of the species to be converted

	for (PathwayElement elt : pwy.getDataObjects())
	{
		if (elt.getObjectType() == ObjectType.DATANODE &&
				elt.getDataSource() == BioDataSource.ENSEMBL)
		{
			elt.setDataSource (ensSpecies.get (org));
		}
	}

}
 
开发者ID:PathVisio,项目名称:pathvisio,代码行数:23,代码来源:Compat.java


示例3: getContents

import org.bridgedb.bio.Organism; //导入依赖的package包/类
@Get
public String getContents() 
{
	try
	{
        StringBuilder result = new StringBuilder();
        for (Organism org : getGdbProvider().getOrganisms())
        {
        	result.append (org.shortName());
        	result.append ("\t");
        	result.append (org.latinName());
        	result.append ("\n");
        }	        
	    return result.toString();
	} 
	catch( Exception e ) 
	{
	    e.printStackTrace();
	    setStatus( Status.SERVER_ERROR_INTERNAL );
	    return e.getMessage();
	}
}
 
开发者ID:bridgedb,项目名称:BridgeDb,代码行数:23,代码来源:Contents.java


示例4: initIDMappers

import org.bridgedb.bio.Organism; //导入依赖的package包/类
private void initIDMappers() {
	Organism org = Organism.fromLatinName(orgName);
	if(org == null) { //Fallback on code
		org = Organism.fromCode(orgName);
	}
	if(org == null) { //Fallback on shortname
		org = Organism.fromShortName(orgName);
	}
	if(org == null) {
		throw new IllegalArgumentException("Unknown organism: " + orgName + "<p><font size='+1'><i>Double check the spelling. We are expecting an entry like: Human</i></font></p>");
	}
	mappers = getGdbProvider().getStack(org);
	if (mappers.getSize() == 0)
	{
		throw new IllegalArgumentException("No database found for: " + orgName +"<p><font size='+1'><i>Verify that the database is supported and properly referenced in gdb.config.</i></font></p>");
	}
}
 
开发者ID:bridgedb,项目名称:BridgeDb,代码行数:18,代码来源:IDMapperResource.java


示例5: scanPathway

import org.bridgedb.bio.Organism; //导入依赖的package包/类
protected Result scanPathway(File pathwayFile) throws BotException {
	try {
		ConnectorBotResult report = new ConnectorBotResult(
				getCache().getPathwayInfo(pathwayFile));
		Pathway pathway = new Pathway();
		pathway.readFromXml(pathwayFile, true);

		String orgName = pathway.getMappInfo().getOrganism();
		Organism org = Organism.fromLatinName(orgName);
		if(org == null) org = Organism.fromShortName(orgName);

		for(PathwayElement pwe : pathway.getDataObjects()) {
			if(pwe.getObjectType() == ObjectType.LINE) {
				boolean valid =
					pwe.getMStart().isLinked() &&
					pwe.getMEnd().isLinked();

				report.addLine(pwe, valid);
			}
		}

		return report;
	} catch(Exception e) {
		throw new BotException(e);
	}
}
 
开发者ID:wikipathways,项目名称:org.wikipathways.client,代码行数:27,代码来源:ConnectorBot.java


示例6: testListPathways

import org.bridgedb.bio.Organism; //导入依赖的package包/类
public void testListPathways() {
	try {
		WSPathwayInfo[] r = client.listPathways();
		Logger.log.trace("Get pathway list returned " + r.length + " pathways");
		r = client.listPathways(Organism.HomoSapiens);
		Logger.log.trace("Get pathway list for Homo sapiens returned " + r.length + " pathways");
		//Check if all pathways are indeed human
		for(WSPathwayInfo wpi : r) {
			if(!Organism.HomoSapiens.latinName().equals(wpi.getSpecies())) {
				fail("Get pathway list for Homo sapiens included non-human pathway: " +
						wpi.getId() + " (" + wpi.getSpecies() + ")");
			}
		}
	} catch(Exception e) {
		e.printStackTrace();
		fail(e.getMessage());
	}
}
 
开发者ID:wikipathways,项目名称:org.wikipathways.client,代码行数:19,代码来源:WikiPathwaysClientTest.java


示例7: addContent

import org.bridgedb.bio.Organism; //导入依赖的package包/类
protected void addContent(JPanel panel) {
	JPanel fieldPanel = new JPanel();
	fieldPanel.setBorder(BorderFactory.createTitledBorder(""));
	
	GridBagConstraints panelConstraints = new GridBagConstraints();
	panelConstraints.fill = GridBagConstraints.BOTH;
	panelConstraints.weightx = 1;
	panelConstraints.weighty = 1;
	panel.add(fieldPanel, panelConstraints);

	fieldPanel.setLayout(new GridBagLayout());

	JLabel titleFieldLabel = new JLabel("Title");
	JLabel orgComboLabel = new JLabel ("Organism ");
	
	titleField = new JTextField();
	organismComboBox = new PermissiveComboBox(Organism.latinNamesArray());

	GridBagConstraints c = new GridBagConstraints();
	c.anchor = GridBagConstraints.FIRST_LINE_START;
	c.weightx = 0;
	c.gridx = 0;
	c.gridy = GridBagConstraints.RELATIVE;
	fieldPanel.add(titleFieldLabel, c);
	fieldPanel.add(orgComboLabel, c);
	c.gridx = 1;
	c.fill = GridBagConstraints.HORIZONTAL;
	c.weightx = 1;
	fieldPanel.add(titleField, c);
	fieldPanel.add(organismComboBox, c);
}
 
开发者ID:PathVisio,项目名称:pathvisio,代码行数:32,代码来源:NewPathwayDialog.java


示例8: addCustomTabs

import org.bridgedb.bio.Organism; //导入依赖的package包/类
protected void addCustomTabs(JTabbedPane parent) {
	JPanel panel = new JPanel();
	panel.setLayout(new GridBagLayout());
	
	JPanel fieldPanel = new JPanel();
	fieldPanel.setBorder(BorderFactory.createTitledBorder(""));
	
	GridBagConstraints panelConstraints = new GridBagConstraints();
	panelConstraints.fill = GridBagConstraints.BOTH;
	panelConstraints.weightx = 1;
	panelConstraints.weighty = 1;
	panel.add(fieldPanel, panelConstraints);

	fieldPanel.setLayout(new GridBagLayout());

	JLabel titleFieldLabel = new JLabel("Title");
	JLabel orgComboLabel = new JLabel ("Organism ");
	
	titleField = new JTextField();
	titleField.setText(swingEngine.getEngine().getActivePathway().getMappInfo().getMapInfoName());
	organismComboBox = new PermissiveComboBox(Organism.latinNamesArray());
	organismComboBox.setSelectedItem(swingEngine.getEngine().getActivePathway().getMappInfo().getOrganism());

	GridBagConstraints c = new GridBagConstraints();
	c.anchor = GridBagConstraints.FIRST_LINE_START;
	c.weightx = 0;
	c.gridx = 0;
	c.gridy = GridBagConstraints.RELATIVE;
	fieldPanel.add(titleFieldLabel, c);
	fieldPanel.add(orgComboLabel, c);
	c.gridx = 1;
	c.fill = GridBagConstraints.HORIZONTAL;
	c.weightx = 1;
	fieldPanel.add(titleField, c);
	fieldPanel.add(organismComboBox, c);
			
	parent.add("Properties", panel);
	parent.setSelectedComponent(panel);
}
 
开发者ID:PathVisio,项目名称:pathvisio,代码行数:40,代码来源:PathwayPropertiesDialog.java


示例9: Compat

import org.bridgedb.bio.Organism; //导入依赖的package包/类
public Compat (SwingEngine swingEngine)
{
	this.swingEngine = swingEngine;

	ensSpecies.put (Organism.HomoSapiens, BioDataSource.ENSEMBL_HUMAN);
	ensSpecies.put (Organism.CaenorhabditisElegans, BioDataSource.ENSEMBL_CELEGANS);
	ensSpecies.put (Organism.DanioRerio, BioDataSource.ENSEMBL_ZEBRAFISH);
	ensSpecies.put (Organism.DrosophilaMelanogaster, BioDataSource.ENSEMBL_ZEBRAFISH);
	ensSpecies.put (Organism.MusMusculus, BioDataSource.ENSEMBL_MOUSE);
	ensSpecies.put (Organism.RattusNorvegicus, BioDataSource.ENSEMBL_RAT);
	ensSpecies.put (Organism.SaccharomycesCerevisiae, BioDataSource.ENSEMBL_SCEREVISIAE);
}
 
开发者ID:PathVisio,项目名称:pathvisio,代码行数:13,代码来源:Compat.java


示例10: findPathwaysByText

import org.bridgedb.bio.Organism; //导入依赖的package包/类
public WSSearchResult[] findPathwaysByText(String query, Organism organism) throws RemoteException {
	String species = null;
	if(organism != null) {
		species = organism.latinName();
	}
	WSSearchResult[] r =  port.findPathwaysByText(query, species);
	if(r == null) r = new WSSearchResult[0];
	return r;
}
 
开发者ID:wikipathways,项目名称:wikipathways-api-client-java,代码行数:10,代码来源:WikiPathwaysClient.java


示例11: test

import org.bridgedb.bio.Organism; //导入依赖的package包/类
@Test
public void test() throws RemoteException {
	WSPathwayInfo [] info = client.listPathways();
	assertTrue(info.length > 1900);
		
	WSPathwayInfo [] info2 = client.listPathways(Organism.HomoSapiens);
	assertTrue(info2.length < info.length);
	assertFalse(info.length == info2.length);
}
 
开发者ID:wikipathways,项目名称:wikipathways-api-client-java,代码行数:10,代码来源:TestListPathways.java


示例12: check

import org.bridgedb.bio.Organism; //导入依赖的package包/类
public void check(String oldVal, String newVal) 
{
	if (newVal != null)
	{
		Organism o = Organism.fromLatinName(newVal);
		if (o == null) System.out.println ("WARNING: species '" + newVal + "' is not a recognized latin name");
	}
}
 
开发者ID:bridgedb,项目名称:BridgeDb,代码行数:9,代码来源:BridgeQC.java


示例13: addOrganismGdb

import org.bridgedb.bio.Organism; //导入依赖的package包/类
public void addOrganismGdb(Organism organism, IDMapper gdb) {
	IDMapperStack l = organism2gdb.get(organism);
	if(l == null) {
		organism2gdb.put(organism, l = new IDMapperStack());
		l.setTransitive(transitive);
		for (IDMapper globalGdb : globalGdbs)
		{
			l.addIDMapper(globalGdb);
		}
	}
	l.addIDMapper(gdb);
}
 
开发者ID:bridgedb,项目名称:BridgeDb,代码行数:13,代码来源:GdbProvider.java


示例14: addGlobalGdb

import org.bridgedb.bio.Organism; //导入依赖的package包/类
public void addGlobalGdb(IDMapper gdb) {
	if(!globalGdbs.contains(gdb)) 
	{
		globalGdbs.add(gdb);
		for (Organism org : organism2gdb.keySet())
		{
			organism2gdb.get(org).addIDMapper(gdb);
		}
	}
}
 
开发者ID:bridgedb,项目名称:BridgeDb,代码行数:11,代码来源:GdbProvider.java


示例15: removeGlobalGdb

import org.bridgedb.bio.Organism; //导入依赖的package包/类
public void removeGlobalGdb(IDMapper gdb) {
	if (globalGdbs.contains(gdb))
	{
		globalGdbs.remove(gdb);
		for (Organism org : organism2gdb.keySet())
		{
			organism2gdb.get(org).removeIDMapper(gdb);
		}
	}
}
 
开发者ID:bridgedb,项目名称:BridgeDb,代码行数:11,代码来源:GdbProvider.java


示例16: add

import org.bridgedb.bio.Organism; //导入依赖的package包/类
public static void add(RepositoryConnection repositoryConnection, Organism organism) 
        throws IOException, RepositoryException {
    URI id = getResourceId(organism);
    repositoryConnection.add(id, RdfConstants.TYPE_URI, BridgeDBConstants.ORGANISM_URI);
    repositoryConnection.add(id, BridgeDBConstants.CODE_URI,  new LiteralImpl(organism.code()));
    repositoryConnection.add(id, BridgeDBConstants.SHORT_NAME_URI,  new LiteralImpl(organism.shortName()));
    repositoryConnection.add(id, BridgeDBConstants.LATIN_NAME_URI,  new LiteralImpl(organism.latinName()));
}
 
开发者ID:bridgedb,项目名称:BridgeDb,代码行数:9,代码来源:OrganismRdf.java


示例17: readRdf

import org.bridgedb.bio.Organism; //导入依赖的package包/类
public static Object readRdf(Resource organismId, Set<Statement> allStatements) throws BridgeDBException {
    for (Statement statement:allStatements){
        if (statement.getPredicate().equals(BridgeDBConstants.LATIN_NAME_URI)){
            String latinName = statement.getObject().stringValue();
            Organism orgamism =  Organism.fromLatinName(latinName);
            if (orgamism != null){
                return orgamism;
            }
            throw new BridgeDBException("No Orgamism with LatinName " + latinName + " for " + organismId);
        }
    }
    throw new BridgeDBException("No Orgamism found for " + organismId);
}
 
开发者ID:bridgedb,项目名称:BridgeDb,代码行数:14,代码来源:OrganismRdf.java


示例18: testConnectorTag

import org.bridgedb.bio.Organism; //导入依赖的package包/类
public void testConnectorTag() {
	Pathway pathway = new Pathway();
	pathway.getMappInfo().setOrganism(Organism.HomoSapiens.latinName());
	//Add a pathway with an unconnected line
	PathwayElement line = PathwayElement.createPathwayElement(ObjectType.LINE);
	pathway.add(line);
	WSPathwayInfo pwi = createConnectorPathway(pathway);
	addConnectorTag(pwi.getId());
	removeConnectorTag(pwi.getId());
	overrideConnectorTag(pwi.getId());
}
 
开发者ID:wikipathways,项目名称:org.wikipathways.client,代码行数:12,代码来源:BotsTest.java


示例19: copyMappInfo

import org.bridgedb.bio.Organism; //导入依赖的package包/类
public static void copyMappInfo(String[] row, Pathway data, String filename)
	{

		/* Data is lost when converting from GenMAPP to GPML:
		*
		* GenMAPP:
		*		"Title", "MAPP", "Version", "Author",
		* 		"Maint", "Email", "Copyright","Modify",
		*		"Remarks", "BoardWidth", "BoardHeight","WindowWidth",
		*		"WindowHeight", "GeneDB", "Notes"
		* GPML:
		*		"Name", NONE, Version, "Author",
		*		"MaintainedBy", "Email", "Availability", "LastModified",
		*		"Comment", "BoardWidth", "BoardHeight", NONE,
		*		NONE, NONE, "Notes"
		*
		*/

		Logger.log.trace ("CONVERTING INFO TABLE TO GPML");

		PathwayElement o = data.getMappInfo();

		o.setMapInfoName(row[ICOL_TITLE]);
		o.setMapInfoDataSource("GenMAPP 2.0");
		o.setVersion(row[ICOL_VERSION]);
		o.setAuthor(row[ICOL_AUTHOR]);
		o.setMaintainer(row[ICOL_MAINT]);
		o.setEmail(row[ICOL_EMAIL]);
		o.setCopyright(row[ICOL_COPYRIGHT]);
		o.setLastModified(row[ICOL_MODIFY]);

		o.addComment(row[ICOL_NOTES], "GenMAPP notes");
		o.addComment(row[ICOL_REMARKS], "GenMAPP remarks");

		//Board size will be calculated
//		o.setMBoardWidth(Double.parseDouble(row[icolBoardWidth]));
//		o.setMBoardHeight(Double.parseDouble(row[icolBoardHeight]));

		o.setDynamicProperty("org.pathvisio.model.WindowWidth", row[ICOL_WINDOWWIDTH]);
		o.setDynamicProperty("org.pathvisio.model.WindowHeight", row[ICOL_WINDOWHEIGHT]);

		// guess organism based on first two characters of filename
		String shortCode = new File (filename).getName().substring(0, 2);
		Organism org = Organism.fromCode(shortCode);
		if (org != null)
		{
			o.setOrganism(org.latinName());
		}
	}
 
开发者ID:PathVisio,项目名称:pathvisio,代码行数:50,代码来源:MappFormat.java


示例20: setSpeciesFilter

import org.bridgedb.bio.Organism; //导入依赖的package包/类
public void setSpeciesFilter (Organism aOrganism)
{
	organism = aOrganism;
	initItems();
}
 
开发者ID:PathVisio,项目名称:pathvisio,代码行数:6,代码来源:DataSourceModel.java



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
Java ISmartItemModel类代码示例发布时间:2022-05-23
下一篇:
Java MathConstants类代码示例发布时间: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