Coverage for /home/kale/research/projects/201511_sgrna_sensor/scripts/facs/fcmcmp/fcmcmp/experiments.py : 98%

Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
#!/usr/bin/env python3
# Find the *.fcs data files relevant to this experiment. If there is a # document with a mapping called "plates:", treat the values as paths to # data directories and the keys as names that can refer to the directories # in the rest of the file. If there is a document with an assignment # called "plate:", treat it as the path to the only data directory that # will be used in the rest of the file. If no data directory is specified # by either of these two mechanisms, try to infer a path from the name of # the YAML file itself.
else:
# Construct and fill in a list of experiments. Well names are converted # into paths based on the user-given glob pattern, then parsed and stored # as pandas data frames. Note that if a well is referenced more than once, # it will also be parsed more than once. This guarantees that each well # can be processed independently, which is important for many workflows.
# Find the *.fcs file referenced by the given name.
"Plate '{}' not defined.".format(plate) if plate is not None else "No default plate defined.")
raise UsageError("Multiple *.fcs files found for well '{}'".format(name))
# Load the cell data for the given well.
# Make sure each document has a label and a list of wells. Other key- # value pairs can be present but are not required.
# Set the well data for the comparison. This requires converting the # well names we were given into paths and parsing those files.
""" Return the well, and possibly the plate, specified by the given name.
The purpose of a well name is to specify a particular well on a particular 96-well plate. The plate doesn't always have to be specified, because often there's only one. The well is specified as a single capital letter followed by a number, like "A1". The number may be zero-padded. If there is a plate, it is specified before the well as an arbitrary name followed by a slash, like "replicate_1/A1". """
""" Indicate errors caused by invalid user input. """
|