本文整理汇总了Python中java.util.Properties.loadFromXML方法的典型用法代码示例。如果您正苦于以下问题:Python Properties.loadFromXML方法的具体用法?Python Properties.loadFromXML怎么用?Python Properties.loadFromXML使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类java.util.Properties
的用法示例。
在下文中一共展示了Properties.loadFromXML方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: SETH
# 需要导入模块: from java.util import Properties [as 别名]
# 或者: from java.util.Properties import loadFromXML [as 别名]
sys.path.append(jarName)
# import the java classes
from java.util import Properties
from java.io import FileInputStream, File
from de.hu.berlin.wbi.objects import DatabaseConnection, dbSNP, UniprotFeature
from seth import SETH
print "init'ing seth"
# get some mutations from text
seth = SETH(mutName)
# setup db connection
print "setup mysql connection"
property = Properties()
property.loadFromXML(FileInputStream(File(propName)))
db = DatabaseConnection(property)
db.connect()
dbSNP.init(db, "PSM", "hgvs")
UniprotFeature.init(db, "uniprot")
def test():
gene = 1312
potentialSNPs = dbSNP.getSNP(gene);
features = UniprotFeature.getFeatures(gene);
mutations = seth.findMutations("p.A123T and Val158Met")
for mut in mutations:
start, end = mut.getStart(), mut.getEnd()
wtRes, mutRes = mut.getWtResidue(), mut.getMutResidue()
pos, text = mut.getPosition(), mut.getText()
mut.normalizeSNP(potentialSNPs, features, False)