ndi.fun.probe.import.jrclust.status
NDI.FUN.PROBE.IMPORT.JRCLUST.STATUS - JRCLUST pipeline status for a probe
S_STATUS = NDI.FUN.PROBE.IMPORT.JRCLUST.STATUS(S, PROBE, ...)
Reports where PROBE stands in the NDI/JRCLUST pipeline for the ndi.session S, by
checking the files each step produces and (optionally) the NDI database. Returns a
struct with the fields:
directory - the probe's JRCLUST directory (see NDI.FUN.PROBE.IMPORT.JRCLUST.PATHS)
prmFile - the JRCLUST parameter file
resFile - the JRCLUST results file
bootstrapped - true if the parameter file exists (ndi.fun.probe.export.jrclust)
detected - true if spikes have been detected ('jrc detect')
features - true if the spike features JRCLUST's detect step writes
(<session>_features.jrc) are still on disk. 'jrc sort' needs
them: without them it stops with 'cannot sort without
features', so a probe can be 'detected' and still not sortable
if the intermediate files were cleaned up.
sorted - true if the spikes have been sorted ('jrc sort')
curated - true if the sort has been saved from the curator ('jrc manual'),
i.e. JRCLUST stamped the file with curatedOn
annotated - true if at least one unit carries a non-empty curation note. This
is what the importer needs: it imports units by their note, and
JRCLUST creates an empty note for every unit at sort time, so a
sorted-but-unlabelled file is 'curated' only once saved and is
never 'annotated' until a human labels units.
imported - true if a 'jrclust_clusters' document for this probe is in the
database (i.e. the sort has been imported into NDI)
upToDate - true if the imported document's checksum matches the current
results file; [] if it was not checked (see 'checksum')
checksum - the MD5 checksum of the results file, if it was computed ('')
This centralizes the pipeline-status logic so GUIs (e.g. ndi.gui.app.jrclust)
stay thin wrappers over ndi.fun.probe.*.
This function takes name/value pairs that modify its operation:
---------------------------------------------------------------------------------
| Parameter (default) | Description |
|--------------------------|-----------------------------------------------------|
| jrclustDir ('.JRCLUST') | Directory (within S.path) holding the JRCLUST work. |
| prmName ('jrclust.prm') | Name of the JRCLUST parameter file. |
| checkDatabase (true) | Look for a 'jrclust_clusters' document for PROBE. |
| checksum (false) | Also checksum the results file to fill in upToDate. |
| | Off by default: the file can be large. |
---------------------------------------------------------------------------------
See also: NDI.FUN.PROBE.IMPORT.JRCLUST.PATHS, NDI.FUN.PROBE.IMPORT.JRCLUST.PROBE,
NDI.FUN.PROBE.EXPORT.JRCLUST
Example:
S = ndi.session.dir('/path/to/session');
p = S.getprobes('type','n-trode');
st = ndi.fun.probe.import.jrclust.status(S, p{1});