AllenInstitute/ipfx

Generate NWB file even when values don't meet QC criteria

Closed this issue · 3 comments

From 4/3 meeting with Jim, we want to be able to use ipfx to produce an NWB file, even when the values for the cell fall outside of the criteria set by LIMS ephys_qc_criteria. The values used to measure against the criteria should be stored somehow so that they can be queried against (this may already be happening in LIMS ephys_roi_results table).

An example of a failing cell is this NWB2 file:

/allen/programs/celltypes/production/mousecelltypes/prod2/Ephys_Roi_Result_646995001/nwb2_Nos1-CreERT2;Sst-IRES-FlpO;Ai65-357671.03.01.01.nwb

Consider splitting cell and sweep qc:
Need independent cell-level and sweep-level executables
Modify current LIMS QC to just do sweep-level
Add new executable to do cell-level QC
Consolidate outputs

sweep qc runs before feature extraction
cell qc can run separately

Acceptance criteria: Feature extractor still runs on cell where run_qc fails

A breakdown of the remaining reasons why nwb files may not have been generated for the June set:
18: "No spiking short square sweeps, cannot compute cell features."
11: "No short square sweeps available for feature extraction"
7: "Cannot fit f-I curve slope with less than two sweeps"
3: "No ramp sweeps available for feature extraction"
2: "No spiking long square sweeps, cannot compute cell features."
2: "No subthreshold long square sweeps with stim_amp in range [(-100, 0)] Cannot evaluate cell features."
1: "No subthreshold long square sweeps, cannot evaluate cell features."
1: "All stimuli have identical amplitudes"

Issue #278 Is very related to this - some of the above errors are due to the feature extractor not failing gracefully. I think it would be optimal for cells to have as many features extracted as possible in ipfx for release (rather than the cell failing QC if one feature can't be calculated).

This should be addressed by PR #449 which has been merged into the released version of ipfx. Now available from pypi: pip install --upgrade ipfx

Please use that updated version and let us know if there are still issues that need to be addressed.