本文整理汇总了Python中genologics.lims.Lims.get_sample方法的典型用法代码示例。如果您正苦于以下问题:Python Lims.get_sample方法的具体用法?Python Lims.get_sample怎么用?Python Lims.get_sample使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类genologics.lims.Lims
的用法示例。
在下文中一共展示了Lims.get_sample方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: Lims
# 需要导入模块: from genologics.lims import Lims [as 别名]
# 或者: from genologics.lims.Lims import get_sample [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 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
# Get the samples having a UDF Color with values Blue or Orange.
samples = lims.get_samples(udf={'Color': ['Blue', 'Orange']})
print len(samples)
for sample in samples:
print sample, sample.name, sample.udf['Color']