ipfx.bin package¶
Submodules¶
ipfx.bin.generate_fx_input module¶
ipfx.bin.generate_pipeline_input module¶
ipfx.bin.generate_qc_input module¶
ipfx.bin.generate_se_input module¶
-
ipfx.bin.generate_se_input.generate_se_input(cell_dir, specimen_id=None, input_nwb_file=None)[source]¶
ipfx.bin.get_fx_output module¶
-
ipfx.bin.get_fx_output.get_fx_output_json(specimen_id)[source]¶ Find in LIMS the full path to the json output of the feature extraction module If more than one file exists, then chose the latest version
specimen_id
file_name: string
ipfx.bin.make_stimulus_ontology module¶
ipfx.bin.mcc_get_settings module¶
Code for interfacing with the Multi Clamp Commander application from Axon/Molecular Devices
-
class
ipfx.bin.mcc_get_settings.DataGatherer[source]¶ Bases:
objectCollect data from all available MCC amplifiers
-
class
ipfx.bin.mcc_get_settings.MultiClampControl(dllPath=None)[source]¶ Bases:
objectClass for interacting with the MultiClamp Commander from Axon/Molecular Devices
Usage:
-
class
ipfx.bin.mcc_get_settings.SettingsFetcher(settingsFile)[source]¶ Bases:
watchdog.events.RegexMatchingEventHandler
-
ipfx.bin.mcc_get_settings.c_bool_p¶ alias of
ipfx.bin.mcc_get_settings.LP_c_bool
-
ipfx.bin.mcc_get_settings.c_double_p¶ alias of
ipfx.bin.mcc_get_settings.LP_c_double
-
ipfx.bin.mcc_get_settings.c_uint_p¶ alias of
ipfx.bin.mcc_get_settings.LP_c_uint
ipfx.bin.nwb_to_pdf module¶
-
class
ipfx.bin.nwb_to_pdf.PatchClampSeriesPlotData(pcs)[source]¶ Bases:
object- Data class for storing plotting information for PatchClampSeries
- pcs: neurodata patchClampSeries or derived object
-
class
ipfx.bin.nwb_to_pdf.SingleSweep(id)[source]¶ Bases:
objectGeneric Class for storing sweep specific PatchClampSeries Data
-
class
ipfx.bin.nwb_to_pdf.SweepCollection[source]¶ Bases:
objectClass for grouping sweep related PatchClampSeries
-
ipfx.bin.nwb_to_pdf.check_stimset_reconstruction(nwbfile, outfile)[source]¶ From a specially crafted NWB file this routine creates a PDF for checking the stimset reconstruction.
The NWB file must have data acquired on two headstages/electrodes where the second just reads back the stimulus set.
-
ipfx.bin.nwb_to_pdf.create_regular_pdf(nwbfile, outfile)[source]¶ convert a NeurodataWithoutBorders file to a PortableDocumentFile
-
ipfx.bin.nwb_to_pdf.plot_patchClampSeries(axis, pcs_data_plot, length)[source]¶ - plot a PatchClampSeries against the axis
- pcs_data_plot: class PatchClampSeriesPlotData axis: plt.axis length: number of points to plot
-
ipfx.bin.nwb_to_pdf.plot_sweepdata(sweepdata, axes, length, addXTicks=False)[source]¶ - plot the given sweep data (stimulus or acquisition) on the given axes
- sweepdata: dict(class PatchClampSeriesPlotData) (either acquisition or
- stimulus)
axes: np.ndarray(plt.axis) length: number of points to plot addXTicks: Add ticks and a label to the X axis at the bottom
-
ipfx.bin.nwb_to_pdf.to_si(d, sep=' ')[source]¶ taken from https://stackoverflow.com/a/15734251/7809404
Convert number to string with SI prefix
Example: >>> to_si(2500.0) '2.5 k'
>>> to_si(2.3E6) '2.3 M'
>>> to_si(2.3E-6) '2.3 µ'
>>> to_si(-2500.0) '-2.5 k'
>>> to_si(0) '0'
ipfx.bin.pipeline_from_specimen_id module¶
ipfx.bin.plot_ephys_nwb module¶
ipfx.bin.run_chirp_fv_extraction module¶
-
class
ipfx.bin.run_chirp_fv_extraction.CollectChirpFeatureVectorParameters(only=None, exclude=(), many=False, context=None, load_only=(), dump_only=(), partial=False, unknown=None)[source]¶ Bases:
argschema.schemas.ArgSchema-
opts= <marshmallow.schema.SchemaOpts object>¶
-
-
ipfx.bin.run_chirp_fv_extraction.edit_ontology_data(original_ontology_data, codes_to_rename, new_name_tag, new_core_tag)[source]¶
ipfx.bin.run_feature_collection module¶
-
class
ipfx.bin.run_feature_collection.CollectFeatureParameters(only=None, exclude=(), many=False, context=None, load_only=(), dump_only=(), partial=False, unknown=None)[source]¶ Bases:
argschema.schemas.ArgSchema-
opts= <marshmallow.schema.SchemaOpts object>¶
-
-
ipfx.bin.run_feature_collection.data_for_specimen_id(specimen_id, passed_only, data_source, ontology, file_list=None)[source]¶
-
ipfx.bin.run_feature_collection.extract_features(data_set, ramp_sweep_numbers, ssq_sweep_numbers, lsq_sweep_numbers, amp_interval=20, max_above_rheo=100)[source]¶
-
ipfx.bin.run_feature_collection.first_spike_lsq(spike_data, feature_list=['threshold_v', 'peak_v', 'upstroke', 'downstroke', 'upstroke_downstroke_ratio', 'width', 'fast_trough_v'])[source]¶
-
ipfx.bin.run_feature_collection.first_spike_ramp(ramp_analyzer, feature_list=['threshold_v', 'peak_v', 'upstroke', 'downstroke', 'upstroke_downstroke_ratio', 'width', 'fast_trough_v'])[source]¶
-
ipfx.bin.run_feature_collection.first_spike_ssq(ssq_analyzer, feature_list=['threshold_v', 'peak_v', 'upstroke', 'downstroke', 'upstroke_downstroke_ratio', 'width', 'fast_trough_v'])[source]¶
-
ipfx.bin.run_feature_collection.mean_spike_lsq(spike_data, feature_list=['threshold_v', 'peak_v', 'upstroke', 'downstroke', 'upstroke_downstroke_ratio', 'width', 'fast_trough_v'])[source]¶
ipfx.bin.run_feature_extraction module¶
ipfx.bin.run_feature_vector_extraction module¶
-
class
ipfx.bin.run_feature_vector_extraction.CollectFeatureVectorParameters(only=None, exclude=(), many=False, context=None, load_only=(), dump_only=(), partial=False, unknown=None)[source]¶ Bases:
argschema.schemas.ArgSchema-
opts= <marshmallow.schema.SchemaOpts object>¶
-
-
ipfx.bin.run_feature_vector_extraction.data_for_specimen_id(specimen_id, sweep_qc_option, data_source, ontology, ap_window_length=0.005, target_sampling_rate=50000, file_list=None)[source]¶ Extract feature vector from given cell identified by the specimen_id Parameters ———- specimen_id : int
cell identified- sweep_qc_option : str
- see CollectFeatureVectorParameters input schema for details
- data_source: str
- see CollectFeatureVectorParameters input schema for details
- ontology : stimulus.StimulusOntology
- mapping of stimuli names to stimulus codes
- ap_window_length : float
- see CollectFeatureVectorParameters input schema for details
- target_sampling_rate : float
- sampling rate
- file_list : list of str
- nwbfile names
- dict :
- features for a given cell specimen_id
-
ipfx.bin.run_feature_vector_extraction.run_feature_vector_extraction(output_dir, data_source, output_code, project, output_file_type, sweep_qc_option, include_failed_cells, run_parallel, ap_window_length, ids=None, file_list=None, **kwargs)[source]¶ Extract feature vector from a list of cells and save result to the output file(s)
- output_dir : str
- see CollectFeatureVectorParameters input schema for details
- data_source : str
- see CollectFeatureVectorParameters input schema for details
- output_code: str
- see CollectFeatureVectorParameters input schema for details
- project : str
- see CollectFeatureVectorParameters input schema for details
- output_file_type : str
- see CollectFeatureVectorParameters input schema for details
- sweep_qc_option: str
- see CollectFeatureVectorParameters input schema for details
- include_failed_cells: bool
- see CollectFeatureVectorParameters input schema for details
- run_parallel: bool
- see CollectFeatureVectorParameters input schema for details
- ap_window_length: float
- see CollectFeatureVectorParameters input schema for details
- ids: int
- ids associated to each cell.
- file_list: list of str
- nwbfile names
kwargs
ipfx.bin.run_pipeline module¶
ipfx.bin.run_pipeline_from_nwb_file module¶
ipfx.bin.run_qc module¶
-
ipfx.bin.run_qc.main()[source]¶ Usage: python run_qc.py –input_json INPUT_JSON –output_json OUTPUT_JSON
-
ipfx.bin.run_qc.qc_summary(sweep_features, sweep_states, cell_features, cell_state)[source]¶ Output QC summary
sweep_features: list of dicts sweep_states: list of dict cell_features: list of dicts cell_state: dict
-
ipfx.bin.run_qc.run_qc(stimulus_ontology_file, cell_features, sweep_features, qc_criteria)[source]¶ -
- stimulus_ontology_file : str
- ontology file name
- cell_features: dict
- cell features
- sweep_features : list of dicts
- sweep features
- qc_criteria: dict
- qc criteria
- dict
- containing state of the cell and sweeps
ipfx.bin.run_sweep_extraction module¶
ipfx.bin.run_synphys_feature_vector_extraction module¶
ipfx.bin.run_x_to_nwb_conversion module¶
-
ipfx.bin.run_x_to_nwb_conversion.convert(inFileOrFolder, overwrite=False, fileType=None, outputMetadata=False, outputFeedbackChannel=False, multipleGroupsPerFile=False, compression=True)[source]¶ Convert the given file to a NeuroDataWithoutBorders file using pynwb
- Supported fileformats:
- ABF v2 files created by Clampex
- DAT files created by Patchmaster v2x90
Parameters: - inFileOrFolder – path to a file or folder
- overwrite – overwrite output file, defaults to False
- fileType – file type to be converted, must be passed iff inFileOrFolder refers to a folder
- outputMetadata – output metadata of the file, helpful for debugging
- outputFeedbackChannel – Output ADC data which stems from stimulus feedback channels (ignored for DAT files)
- multipleGroupsPerFile – Write all Groups in the DAT file into one NWB file. By default we create one NWB per Group (ignored for ABF files).
- compression – Toggle compression for HDF5 datasets
Returns: path of the created NWB file
ipfx.bin.validate_experiment module¶
-
ipfx.bin.validate_experiment.get_pipeline_output_json(storage_dir, err_id)[source]¶ Return the name of the output file giving preference to the newer version Parameters ———- storage_dir: str of storage directory err_id: str err_id Returns ——- pipeline_output_json: str filename