本文整理汇总了Python中omero.gateway.BlitzGateway.listGroups方法的典型用法代码示例。如果您正苦于以下问题:Python BlitzGateway.listGroups方法的具体用法?Python BlitzGateway.listGroups怎么用?Python BlitzGateway.listGroups使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类omero.gateway.BlitzGateway
的用法示例。
在下文中一共展示了BlitzGateway.listGroups方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: BlitzGateway
# 需要导入模块: from omero.gateway import BlitzGateway [as 别名]
# 或者: from omero.gateway.BlitzGateway import listGroups [as 别名]
password = getpass.getpass()
# Connect to the Python Blitz Gateway.
conn = BlitzGateway(username, password, host=HOST, port=PORT)
connected = conn.connect()
if not connected:
print >> sys.stderr, ("Error: Connection not available, please check your " "username and password.")
sys.exit(1)
else:
print "Login successful.\n"
# Set our default group so we can see the data.
# (I thought I had to do this, but now I am not sure it's needed.
# -JLM 2013/12/04)
try:
group = next(g for g in conn.listGroups() if g.getName() == GROUP)
except StopIteration:
print >> sys.stderr, "Error: could not find group '%s'" % GROUP
conn.setGroupForSession(group.getId())
# Get plate of interest.
# (ID 1552 is "RTK ligands induce differing FOXO3a translocation dynamics")
plate = conn.getObject("Plate", 1552)
# Get list of lists of well objects from the plate.
well_grid = plate.getWellGrid()
# Loop over all wells in the plate.
for (raw_row_num, row) in enumerate(well_grid):
for (raw_col_num, well) in enumerate(row):
# Fix up row and column numbers to match Pat's nomenclature.
row_num = raw_row_num + 1