lookupMap#

Example Usage#

Full Contents:#

@lookupMap.buildLookupMap(lum, options)#

BUILDLOOKUPMAPTIMING Principal function for lookupTable Class object construction This builds a searchable object indexing datasets in a lookupMap

Parameters
  • lum (lookupMap class instance with properties) –

    genoDirstr

    directory path where the staining/label dirs containing experiments, each with pullbacks, are located

    prependstr

    prepended string in filename of pullback

    extenstr

    extened string in filename of pullback

    timematfnstr or cell array of strings

    If string, name of the .mat file or .txt file containing ‘matchtime’ and ‘matchtime_unc’. If cell array, list of names of .mat files or .txt files in rank order to use for time matching

  • optionns (struct with fields) –

    labelscell array

    the labels to include, if not all labels of a genotype

    save_mapbool

    whether to save the map object to disk

Returns

map – The map from fixed sample datasets to time estimate

Return type

containers.Map object

@lookupMap.buildStructWrtTime(obj, timestr, label2find, tfind, deltaT)#
BUILDSTRUCTWRTTIME(obj, timestr, label) Find static/dynamic embryos

Give the times, folders, and time uncertainties of all dynamic samples or fixed samples matching the supplied channel ‘label’, depending on whether they match our desired classification as ‘dynamic’ or ‘fixed’.

This is a helper function for the lookupMap class.

Parameters
  • obj (the class instance of lookup) –

  • timestr ('dynamic' or 'static') –

  • label2find (string, label name (ex 'Eve' or 'Runt')) –

Returns

  • outstruct (struct with fields) – folders = cell ; names = cell ; embryoIDs = cell ; times = list ; uncs = list ; nTimePoints = list ; tiffpages = list ;

  • NPMitchell 2020

class @lookupMap.lookupMap(genoDir, Options)#

Bases: sphinxcontrib.mat_types.handle

LOOKUPTABLE Look up timing or channels from a containers.Map object

Class for a lookuptable for finding times and channels

Example

a = lookup(‘../WT’) % pass a genotype directory a = a.buildLookup() a.findTime(40) a.findTime(40, 3) a.findLabel(‘Eve’) a.findLabel(‘Runt’) a.findLabelTime(‘Eve’, 40) a.findLabelTime(‘Eve’, 40, 3)

keys = a.map(‘Eve’).keys for i = 1:length(keys)

q = a.map(‘Eve’) ; q(keys{i})

end

NPMitchell 2019

findDynamicLabel(label2find)#
FINDDYNAMICLABEL(label2find) Find dynamic embryos with label

Give the times, folders, and time uncertainties of all live samples matching the supplied channel ‘label’

Parameters
  • obj (the class instance of lookup) –

  • label2find (string, label name (ex 'Eve' or 'Runt')) –

findDynamicLabelTime(label2find, tfind, deltaT)#
FINDDYNAMICLABELTIME(label2find, tfind, deltaT) Find dynamic embryos with label

Give the times, folders, and time uncertainties of all dynamic/live samples matching the supplied channel ‘label’ at timestamps in range tfind-deltaT < t < tfind+deltaT.

Parameters
  • obj (the class instance of lookup) –

  • label2find (string, label name (ex 'Eve' or 'Runt')) –

  • tfind (timestamp to search for (within tfind+/- deltaT)) –

  • deltaT (halfwidth of range of times for which to search) –

Returns

qs – collection of the data matching criteria, as queriedSample class instance

Return type

queriedSample instance

findEmbryo(embryoID)#
FINDEMBRYO(embryoID) Find all instances with given embryo

Give the names, folder, times, and time uncertainties for stained samples matching the supplied embryoID

Parameters
  • obj (the class instance of lookup) –

  • embryoID (string, embryo identification name) – (ex ‘201904011200’)

Returns

estruct – The output structure with fields labels, folders, times, uncs

Return type

struct

findLabel(label2find)#
FINDLABEL(label2find) Find all embryos with given stain

Give the times, folders, and time uncertainties of all stained samples matching the supplied channel ‘label’

Parameters
  • obj (the class instance of lookup) –

  • label (string, label name (ex 'Eve' or 'Runt')) –

findLabelTime(label2find, tfind, eps)#
FINDLABELTIME(label2find, tfind, eps)

Give the times, folders, and time uncertainties of all stained samples matching the supplied channel ‘label’

Parameters
  • obj (the class instance of lookup) –

  • label (string, label name (ex 'Eve' or 'Runt')) –

  • tfind (float or int timestamp) –

  • eps (optional, the allowed difference from tstamp) –

Returns

outstruct – The output structure with fields folders, times, uncs

Return type

struct

findStaticLabel(label2find)#
FINDSTATICLABEL(label2find) Find dynamic embryos with label

Give the times, folders, and time uncertainties of all live samples matching the supplied channel ‘label’

Parameters
  • obj (the class instance of lookup) –

  • label2find (string, label name (ex 'Eve' or 'Runt')) –

findStaticLabelTime(label2find, tfind, deltaT)#
FINDSTATICLABELTIME(label2find, tfind, deltaT) Find dynamic embryos with label

Give the times, folders, and time uncertainties of all live samples matching the supplied channel ‘label’ at timestamps in range tfind-deltaT < t < tfind+deltaT.

Parameters
  • obj (the class instance of lookup) –

  • label2find (string, label name (ex 'Eve' or 'Runt')) –

  • tfind (timestamp to search for (within tfind+/- deltaT)) –

  • deltaT (halfwidth of range of times for which to search) –

Returns

qs – collection of the data matching criteria, as queriedSample class instance

Return type

queriedSample instance

findTime(tfind, eps)#
FINDTIME(tfind, eps) Find all instances with time near tfind

Give the labels, folders, and time uncertainties of all samples matching the supplied time tfind, within a value eps of that time. Returns an output struct.

Parameters
  • obj (the class instance of lookup) –

  • tfind (float or int timestamp) –

  • eps (optional, the allowed difference from tstamp) –

Returns

qs – QueriedSample containing all samples with matching time

Return type

QueriedSample instance

lookupMap(genoDir, Options)#
LOOKUPMAP(genoDir, Options)

Instantiate a lookupMap object for genotype of genoDir

Parameters
  • genoDir (str) – path to the genotype data directory

  • Options (optional struct with fields) –

    timerfnstr, default=’timematch_curve7_chisq.mat’

    name of file to use to obtain timestamp for each embryo

    prependstr, default=’MAX_Cyl1_2_000000_c*_rot_scaled_view1’

    filename search string without extension for pullback

    extenstr, default=’.tif’

    filename extension for pullback

saveLookupMap()#

SAVELOOKUPMAP Save the constructed lookup map

Indices and tables#