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


Python Lims.get_project方法代码示例

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


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

示例1: Lims

# 需要导入模块: from genologics.lims import Lims [as 别名]
# 或者: from genologics.lims.Lims import get_project [as 别名]
# Create the LIMS interface instance, and check the connection and version.
lims = Lims(BASEURI, USERNAME, PASSWORD)
lims.check_version()

# Get the list of all projects.
projects = lims.get_projects()
print len(projects), 'projects in total'

# Get the list of all projects opened since May 30th 2012.
day = '2012-05-30'
projects = lims.get_projects(open_date=day)
print len(projects), 'projects opened since', day

# Get the project with the specified LIMS id, and print some info.
project = lims.get_project('KRA61')
print project, project.name, project.open_date

print 'UDFs:'
for key, value in project.udf.items():
    if isinstance(value, unicode):
        value = codecs.encode(value, 'UTF-8')
    print ' ', key, '=', value

udt = project.udt
if udt:
    print 'UDT:', udt.udt
    for key, value in udt.items():
        if isinstance(value, unicode):
            value = codecs.encode(value, 'UTF-8')
        print ' ', key, '=', value
开发者ID:b97pla,项目名称:GenoLogics-LIMS-Python,代码行数:32,代码来源:get_projects.py

示例2: Lims

# 需要导入模块: from genologics.lims import Lims [as 别名]
# 或者: from genologics.lims.Lims import get_project [as 别名]
from genologics.lims import Lims

# Login parameters for connecting to a LIMS instance.
# NOTE: Modify according to your setup.
from genologics.site_cloud import BASEURI, USERNAME, PASSWORD

# Create the LIMS interface instance, and check the connection and version.
lims = Lims(BASEURI, USERNAME, PASSWORD)
lims.check_version()

# Get the list of all samples.
samples = lims.get_samples()
print len(samples), 'samples in total'

# Get the list of samples in the project with the LIMS id KLL60.
project = lims.get_project('KLL60')
samples = lims.get_samples(projectlimsid=project.id)
print len(samples), 'samples in', project

print
# Get the sample with the LIMS id JGR58A21, and print info and its UDFs.
sample = lims.get_sample('JGR58A21')
print sample.id, sample.name, sample.date_received, sample.uri,
for key, value in sample.udf.items():
    print ' ', key, '=', value

# Get the sample with the name 'Joels proper sample-20'.
# Check that it is the sample as the previously obtained sample;
# not just equal, but exactly the same instance, courtesy of the Lims cache.
samples = lims.get_samples(name='Joels proper sample-20')
print samples[0].name, samples[0] is sample
开发者ID:b97pla,项目名称:GenoLogics-LIMS-Python,代码行数:33,代码来源:get_samples.py


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