From 09b1d8150c052562f746e1ddc2a5a4d4e77d99f9 Mon Sep 17 00:00:00 2001 From: Ben Dichter Date: Tue, 4 Jun 2024 15:55:18 -0400 Subject: [PATCH] add descriptions to args in the source schema (#886) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Cody Baker <51133164+CodyCBakerPhD@users.noreply.github.com> --- CHANGELOG.md | 3 +- .../deeplabcut/deeplabcutdatainterface.py | 7 +++++ .../behavior/fictrac/fictracdatainterface.py | 6 ++++ .../miniscope/miniscopedatainterface.py | 8 ++++++ .../behavior/sleap/sleapdatainterface.py | 9 ++++++ .../alphaomega/alphaomegadatainterface.py | 6 ++++ .../ecephys/axona/axonadatainterface.py | 6 ++++ .../ecephys/biocam/biocamdatainterface.py | 6 ++++ .../blackrock/blackrockdatainterface.py | 8 ++++-- .../cellexplorer/cellexplorerdatainterface.py | 15 ++++++++++ .../ecephys/edf/edfdatainterface.py | 6 ++++ .../ecephys/intan/intandatainterface.py | 6 ++++ .../ecephys/kilosort/kilosortdatainterface.py | 8 ++++++ .../ecephys/mcsraw/mcsrawdatainterface.py | 6 ++++ .../ecephys/mearec/mearecdatainterface.py | 6 ++++ .../neuralynx/neuralynxdatainterface.py | 10 ++++++- .../neuroscope/neuroscopedatainterface.py | 28 +++++++++++++++++-- .../openephys/openephysbinarydatainterface.py | 2 +- .../openephys/openephysdatainterface.py | 8 ++++++ .../openephyssortingdatainterface.py | 4 ++- .../ecephys/phy/phydatainterface.py | 9 ++++-- .../ecephys/plexon/plexondatainterface.py | 12 ++++++++ .../ecephys/spike2/spike2datainterface.py | 2 +- .../ophys/brukertiff/brukertiffconverter.py | 6 +++- .../brukertiff/brukertiffdatainterface.py | 4 +-- .../ophys/caiman/caimandatainterface.py | 6 ++++ .../micromanagertiffdatainterface.py | 4 +-- .../ophys/miniscope/miniscopeconverter.py | 4 ++- .../miniscopeimagingdatainterface.py | 13 +++++++-- 29 files changed, 196 insertions(+), 22 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 628dd18fc..c9db965fd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -44,7 +44,8 @@ * Support for pathlib in source data schema validation. [PR #854](https://github.com/catalystneuro/neuroconv/pull/854) * Use `ZoneInfo` instead of `dateutil.tz` in the conversion gallery. [PR #858](https://github.com/catalystneuro/neuroconv/pull/858) * Exposed `progress_bar_class` to ecephys and ophys data iterators. [PR #861](https://github.com/catalystneuro/neuroconv/pull/861) -* Unified the signatures between `add_units`, `add_sorting` and `write_sorting` [PR #875](https://github.com/catalystneuro/neuroconv/pull/875) +* Unified the signatures between `add_units`, `add_sorting` and `write_sorting`. [PR #875](https://github.com/catalystneuro/neuroconv/pull/875) +* Improved descriptions of all folder and file paths in the source schema, useful for rendering in the GUIDE. [PR #886](https://github.com/catalystneuro/neuroconv/pull/886) ### Testing * Add general test for metadata in-place modification by interfaces. [PR #815](https://github.com/catalystneuro/neuroconv/pull/815) diff --git a/src/neuroconv/datainterfaces/behavior/deeplabcut/deeplabcutdatainterface.py b/src/neuroconv/datainterfaces/behavior/deeplabcut/deeplabcutdatainterface.py index bedb6635e..8fa1d3cf1 100644 --- a/src/neuroconv/datainterfaces/behavior/deeplabcut/deeplabcutdatainterface.py +++ b/src/neuroconv/datainterfaces/behavior/deeplabcut/deeplabcutdatainterface.py @@ -59,6 +59,13 @@ class DeepLabCutInterface(BaseTemporalAlignmentInterface): _timestamps = None + @classmethod + def get_source_schema(cls) -> dict: + source_schema = super().get_source_schema() + source_schema["properties"]["file_path"]["description"] = "Path to the .h5 file output by dlc." + source_schema["properties"]["config_file_path"]["description"] = "Path to .yml config file" + return source_schema + def __init__( self, file_path: FilePathType, diff --git a/src/neuroconv/datainterfaces/behavior/fictrac/fictracdatainterface.py b/src/neuroconv/datainterfaces/behavior/fictrac/fictracdatainterface.py index 14ffe0eea..57ab1e54e 100644 --- a/src/neuroconv/datainterfaces/behavior/fictrac/fictracdatainterface.py +++ b/src/neuroconv/datainterfaces/behavior/fictrac/fictracdatainterface.py @@ -147,6 +147,12 @@ class FicTracDataInterface(BaseTemporalAlignmentInterface): }, } + @classmethod + def get_source_schema(cls) -> dict: + source_schema = super().get_source_schema() + source_schema["properties"]["file_path"]["description"] = "Path to the .dat file (the output of fictrac)" + return source_schema + def __init__( self, file_path: FilePathType, diff --git a/src/neuroconv/datainterfaces/behavior/miniscope/miniscopedatainterface.py b/src/neuroconv/datainterfaces/behavior/miniscope/miniscopedatainterface.py index 451d6c40f..d3b4f3b59 100644 --- a/src/neuroconv/datainterfaces/behavior/miniscope/miniscopedatainterface.py +++ b/src/neuroconv/datainterfaces/behavior/miniscope/miniscopedatainterface.py @@ -15,6 +15,14 @@ class MiniscopeBehaviorInterface(BaseDataInterface): associated_suffixes = (".avi",) info = "Interface for Miniscope behavior video data." + @classmethod + def get_source_schema(cls) -> dict: + source_schema = super().get_source_schema() + source_schema["properties"]["folder_path"][ + "description" + ] = "The main Miniscope folder. The movie files are expected to be in sub folders within the main folder." + return source_schema + def __init__(self, folder_path: FolderPathType): """ Initialize reading recordings from the Miniscope behavioral camera. diff --git a/src/neuroconv/datainterfaces/behavior/sleap/sleapdatainterface.py b/src/neuroconv/datainterfaces/behavior/sleap/sleapdatainterface.py index 4f56c8071..a689d970e 100644 --- a/src/neuroconv/datainterfaces/behavior/sleap/sleapdatainterface.py +++ b/src/neuroconv/datainterfaces/behavior/sleap/sleapdatainterface.py @@ -18,6 +18,15 @@ class SLEAPInterface(BaseTemporalAlignmentInterface): associated_suffixes = (".slp", ".mp4") info = "Interface for SLEAP pose estimation datasets." + @classmethod + def get_source_schema(cls) -> dict: + source_schema = super().get_source_schema() + source_schema["properties"]["file_path"]["description"] = "Path to the .slp file (the output of sleap)" + source_schema["properties"]["video_file_path"][ + "description" + ] = "Path of the video for extracting timestamps (optional)." + return source_schema + def __init__( self, file_path: FilePathType, diff --git a/src/neuroconv/datainterfaces/ecephys/alphaomega/alphaomegadatainterface.py b/src/neuroconv/datainterfaces/ecephys/alphaomega/alphaomegadatainterface.py index 9881a995b..a1eca6ac2 100644 --- a/src/neuroconv/datainterfaces/ecephys/alphaomega/alphaomegadatainterface.py +++ b/src/neuroconv/datainterfaces/ecephys/alphaomega/alphaomegadatainterface.py @@ -13,6 +13,12 @@ class AlphaOmegaRecordingInterface(BaseRecordingExtractorInterface): associated_suffixes = (".mpx",) info = "Interface class for converting AlphaOmega recording data." + @classmethod + def get_source_schema(cls) -> dict: + source_schema = super().get_source_schema() + source_schema["properties"]["folder_path"]["description"] = "Path to the folder of .mpx files." + return source_schema + def __init__(self, folder_path: FolderPathType, verbose: bool = True, es_key: str = "ElectricalSeries"): """ Load and prepare data for AlphaOmega. diff --git a/src/neuroconv/datainterfaces/ecephys/axona/axonadatainterface.py b/src/neuroconv/datainterfaces/ecephys/axona/axonadatainterface.py index a487ecab3..bd3fe06fa 100644 --- a/src/neuroconv/datainterfaces/ecephys/axona/axonadatainterface.py +++ b/src/neuroconv/datainterfaces/ecephys/axona/axonadatainterface.py @@ -23,6 +23,12 @@ class AxonaRecordingInterface(BaseRecordingExtractorInterface): associated_suffixes = (".bin", ".set") info = "Interface for Axona recording data." + @classmethod + def get_source_schema(cls) -> dict: + source_schema = super().get_source_schema() + source_schema["properties"]["file_path"]["description"] = "Path to .bin file." + return source_schema + def __init__(self, file_path: FilePathType, verbose: bool = True, es_key: str = "ElectricalSeries"): """ diff --git a/src/neuroconv/datainterfaces/ecephys/biocam/biocamdatainterface.py b/src/neuroconv/datainterfaces/ecephys/biocam/biocamdatainterface.py index 4b4297104..8df5a1fc9 100644 --- a/src/neuroconv/datainterfaces/ecephys/biocam/biocamdatainterface.py +++ b/src/neuroconv/datainterfaces/ecephys/biocam/biocamdatainterface.py @@ -13,6 +13,12 @@ class BiocamRecordingInterface(BaseRecordingExtractorInterface): associated_suffixes = (".bwr",) info = "Interface for Biocam recording data." + @classmethod + def get_source_schema(cls) -> dict: + schema = super().get_source_schema() + schema["properties"]["file_path"]["description"] = "Path to the .bwr file." + return schema + def __init__(self, file_path: FilePathType, verbose: bool = True, es_key: str = "ElectricalSeries"): """ Load and prepare data for Biocam. diff --git a/src/neuroconv/datainterfaces/ecephys/blackrock/blackrockdatainterface.py b/src/neuroconv/datainterfaces/ecephys/blackrock/blackrockdatainterface.py index cbae265c1..460ada6ce 100644 --- a/src/neuroconv/datainterfaces/ecephys/blackrock/blackrockdatainterface.py +++ b/src/neuroconv/datainterfaces/ecephys/blackrock/blackrockdatainterface.py @@ -18,7 +18,9 @@ class BlackrockRecordingInterface(BaseRecordingExtractorInterface): @classmethod def get_source_schema(cls): source_schema = get_schema_from_method_signature(method=cls.__init__, exclude=["block_index", "seg_index"]) - source_schema["properties"]["file_path"]["description"] = "Path to Blackrock file." + source_schema["properties"]["file_path"][ + "description" + ] = "Path to the Blackrock file with suffix being .ns1, .ns2, .ns3, .ns4m .ns4, or .ns6." return source_schema def __init__( @@ -34,7 +36,7 @@ def __init__( Parameters ---------- file_path : FilePathType - The path to the Blackrock with suffix being .ns1, .ns2, .ns3, .ns4m .ns4, or .ns6 + Path to the Blackrock file with suffix being .ns1, .ns2, .ns3, .ns4m .ns4, or .ns6 verbose: bool, default: True es_key : str, default: "ElectricalSeries" """ @@ -76,7 +78,7 @@ class BlackrockSortingInterface(BaseSortingExtractorInterface): def get_source_schema(cls) -> dict: metadata_schema = get_schema_from_method_signature(method=cls.__init__) metadata_schema["additionalProperties"] = True - metadata_schema["properties"]["file_path"].update(description="Path to Blackrock file.") + metadata_schema["properties"]["file_path"].update(description="Path to Blackrock .nev file.") return metadata_schema def __init__(self, file_path: FilePathType, sampling_frequency: float = None, verbose: bool = True): diff --git a/src/neuroconv/datainterfaces/ecephys/cellexplorer/cellexplorerdatainterface.py b/src/neuroconv/datainterfaces/ecephys/cellexplorer/cellexplorerdatainterface.py index a3eb66064..c5d72992e 100644 --- a/src/neuroconv/datainterfaces/ecephys/cellexplorer/cellexplorerdatainterface.py +++ b/src/neuroconv/datainterfaces/ecephys/cellexplorer/cellexplorerdatainterface.py @@ -288,7 +288,22 @@ class CellExplorerRecordingInterface(BaseRecordingExtractorInterface): sampling_frequency_key = "sr" binary_file_extension = "dat" + @classmethod + def get_source_schema(cls) -> dict: + source_schema = super().get_source_schema() + source_schema["properties"]["folder_path"]["description"] = "Folder containing the .session.mat file" + return source_schema + def __init__(self, folder_path: FolderPathType, verbose: bool = True, es_key: str = "ElectricalSeries"): + """ + + Parameters + ---------- + folder_path: str + Folder containing the .session.mat file. + verbose: bool, default=True + es_key: str, default="ElectricalSeries" + """ self.session_path = Path(folder_path) # No super here, we need to do everything by hand diff --git a/src/neuroconv/datainterfaces/ecephys/edf/edfdatainterface.py b/src/neuroconv/datainterfaces/ecephys/edf/edfdatainterface.py index 718081a07..13659b450 100644 --- a/src/neuroconv/datainterfaces/ecephys/edf/edfdatainterface.py +++ b/src/neuroconv/datainterfaces/ecephys/edf/edfdatainterface.py @@ -16,6 +16,12 @@ class EDFRecordingInterface(BaseRecordingExtractorInterface): associated_suffixes = (".edf",) info = "Interface for European Data Format (EDF) recording data." + @classmethod + def get_source_schema(cls) -> dict: + source_schema = super().get_source_schema() + source_schema["properties"]["file_path"]["description"] = "Path to the .edf file." + return source_schema + def __init__(self, file_path: FilePathType, verbose: bool = True, es_key: str = "ElectricalSeries"): """ Load and prepare data for EDF. diff --git a/src/neuroconv/datainterfaces/ecephys/intan/intandatainterface.py b/src/neuroconv/datainterfaces/ecephys/intan/intandatainterface.py index 2f0e2df3e..2403213bd 100644 --- a/src/neuroconv/datainterfaces/ecephys/intan/intandatainterface.py +++ b/src/neuroconv/datainterfaces/ecephys/intan/intandatainterface.py @@ -47,6 +47,12 @@ class IntanRecordingInterface(BaseRecordingExtractorInterface): info = "Interface for Intan recording data." stream_id = "0" # This is the only stream_id of Intan that might have neural data + @classmethod + def get_source_schema(cls) -> dict: + source_schema = super().get_source_schema() + source_schema["properties"]["file_path"]["description"] = "Path to either a .rhd or a .rhs file" + return source_schema + def __init__( self, file_path: FilePathType, diff --git a/src/neuroconv/datainterfaces/ecephys/kilosort/kilosortdatainterface.py b/src/neuroconv/datainterfaces/ecephys/kilosort/kilosortdatainterface.py index ab8fe8963..37f812142 100644 --- a/src/neuroconv/datainterfaces/ecephys/kilosort/kilosortdatainterface.py +++ b/src/neuroconv/datainterfaces/ecephys/kilosort/kilosortdatainterface.py @@ -9,6 +9,14 @@ class KiloSortSortingInterface(BaseSortingExtractorInterface): associated_suffixes = (".npy",) info = "Interface for KiloSort sorting data." + @classmethod + def get_source_schema(cls) -> dict: + source_schema = super().get_source_schema() + source_schema["properties"]["folder_path"][ + "description" + ] = "Path to the output Phy folder (containing the params.py)" + return source_schema + def __init__( self, folder_path: FolderPathType, diff --git a/src/neuroconv/datainterfaces/ecephys/mcsraw/mcsrawdatainterface.py b/src/neuroconv/datainterfaces/ecephys/mcsraw/mcsrawdatainterface.py index c973cc5bd..230b1d044 100644 --- a/src/neuroconv/datainterfaces/ecephys/mcsraw/mcsrawdatainterface.py +++ b/src/neuroconv/datainterfaces/ecephys/mcsraw/mcsrawdatainterface.py @@ -13,6 +13,12 @@ class MCSRawRecordingInterface(BaseRecordingExtractorInterface): associated_suffixes = (".raw",) info = "Interface for MCSRaw recording data." + @classmethod + def get_source_schema(cls) -> dict: + source_schema = super().get_source_schema() + source_schema["properties"]["file_path"]["description"] = "Path to the .raw file." + return source_schema + def __init__(self, file_path: FilePathType, verbose: bool = True, es_key: str = "ElectricalSeries"): """ Load and prepare data for MCSRaw. diff --git a/src/neuroconv/datainterfaces/ecephys/mearec/mearecdatainterface.py b/src/neuroconv/datainterfaces/ecephys/mearec/mearecdatainterface.py index a3d9beb41..f69c312fd 100644 --- a/src/neuroconv/datainterfaces/ecephys/mearec/mearecdatainterface.py +++ b/src/neuroconv/datainterfaces/ecephys/mearec/mearecdatainterface.py @@ -16,6 +16,12 @@ class MEArecRecordingInterface(BaseRecordingExtractorInterface): associated_suffixes = (".h5",) info = "Interface for MEArec recording data." + @classmethod + def get_source_schema(cls) -> dict: + source_schema = super().get_source_schema() + source_schema["properties"]["file_path"]["description"] = "Path to the MEArec .h5 file." + return source_schema + def __init__(self, file_path: FilePathType, verbose: bool = True, es_key: str = "ElectricalSeries"): """ Load and prepare data for MEArec. diff --git a/src/neuroconv/datainterfaces/ecephys/neuralynx/neuralynxdatainterface.py b/src/neuroconv/datainterfaces/ecephys/neuralynx/neuralynxdatainterface.py index 099035f98..83e60fb9c 100644 --- a/src/neuroconv/datainterfaces/ecephys/neuralynx/neuralynxdatainterface.py +++ b/src/neuroconv/datainterfaces/ecephys/neuralynx/neuralynxdatainterface.py @@ -24,6 +24,14 @@ def get_stream_names(cls, folder_path: FolderPathType) -> List[str]: stream_names, _ = NeuralynxRecordingExtractor.get_streams(folder_path=folder_path) return stream_names + @classmethod + def get_source_schema(cls) -> dict: + source_schema = super().get_source_schema() + source_schema["properties"]["folder_path"][ + "description" + ] = 'Path to Neuralynx directory containing ".nse", ".ntt", ".nse", or ".nev" files.' + return source_schema + def __init__( self, folder_path: FolderPathType, @@ -37,7 +45,7 @@ def __init__( Parameters ---------- folder_path: FolderPathType - Path to OpenEphys directory. + Path to Neuralynx directory. stream_name : str, optional The name of the recording stream to load; only required if there is more than one stream detected. Call `NeuralynxRecordingInterface.get_stream_names(folder_path=...)` to see what streams are available. diff --git a/src/neuroconv/datainterfaces/ecephys/neuroscope/neuroscopedatainterface.py b/src/neuroconv/datainterfaces/ecephys/neuroscope/neuroscopedatainterface.py index d3d14e897..fe6fa32ce 100644 --- a/src/neuroconv/datainterfaces/ecephys/neuroscope/neuroscopedatainterface.py +++ b/src/neuroconv/datainterfaces/ecephys/neuroscope/neuroscopedatainterface.py @@ -101,6 +101,12 @@ class NeuroScopeRecordingInterface(BaseRecordingExtractorInterface): associated_suffixes = (".dat", ".xml") info = "Interface for converting NeuroScope recording data." + @classmethod + def get_source_schema(self) -> dict: + source_schema = super().get_source_schema() + source_schema["properties"]["file_path"]["description"] = "Path to .dat file." + return source_schema + @staticmethod def get_ecephys_metadata(xml_file_path: str) -> dict: """Auto-populates ecephys metadata from the xml_file_path.""" @@ -188,6 +194,12 @@ class NeuroScopeLFPInterface(BaseLFPExtractorInterface): ExtractorName = "NeuroScopeRecordingExtractor" + @classmethod + def get_source_schema(self) -> dict: + source_schema = super().get_source_schema() + source_schema["properties"]["file_path"]["description"] = "Path to .lfp or .eeg file." + return source_schema + def __init__( self, file_path: FilePathType, @@ -200,7 +212,7 @@ def __init__( Parameters ---------- file_path : FilePathType - Path to .dat file. + Path to .lfp or .eeg file. gain : float, optional Conversion factors from int16 to Volts are not contained in xml_file_path; set them explicitly here. Most common value is 0.195 for an intan recording system. @@ -240,6 +252,19 @@ class NeuroScopeSortingInterface(BaseSortingExtractorInterface): associated_suffixes = (".res", ".clu", ".res.*", ".clu.*", ".xml") info = "Interface for converting NeuroScope recording data." + @classmethod + def get_source_schema(self) -> dict: + source_schema = super().get_source_schema() + source_schema["properties"]["folder_path"]["description"] = "Path to folder containing .res and .clu files." + source_schema["properties"]["keep_mua_units"][ + "description" + ] = "Whether to return sorted spikes from multi-unit activity." + source_schema["properties"]["exclude_shanks"]["description"] = "List of indices to ignore." + source_schema["properties"]["xml_file_path"][ + "description" + ] = "Path to .xml file containing device and electrode configuration." + return source_schema + def __init__( self, folder_path: FolderPathType, @@ -257,7 +282,6 @@ def __init__( Path to folder containing .clu and .res files. keep_mua_units : bool, default: True Optional. Whether to return sorted spikes from multi-unit activity. - The default is True. exclude_shanks : list, optional List of indices to ignore. The set of all possible indices is chosen by default, extracted as the final integer of all the .res.%i and .clu.%i pairs. diff --git a/src/neuroconv/datainterfaces/ecephys/openephys/openephysbinarydatainterface.py b/src/neuroconv/datainterfaces/ecephys/openephys/openephysbinarydatainterface.py index 79c69bd60..f8f5f7924 100644 --- a/src/neuroconv/datainterfaces/ecephys/openephys/openephysbinarydatainterface.py +++ b/src/neuroconv/datainterfaces/ecephys/openephys/openephysbinarydatainterface.py @@ -65,7 +65,7 @@ def __init__( Parameters ---------- folder_path: FolderPathType - Path to OpenEphys directory. + Path to directory containing OpenEphys binary files. stream_name : str, optional The name of the recording stream to load; only required if there is more than one stream detected. Call `OpenEphysRecordingInterface.get_stream_names(folder_path=...)` to see what streams are available. diff --git a/src/neuroconv/datainterfaces/ecephys/openephys/openephysdatainterface.py b/src/neuroconv/datainterfaces/ecephys/openephys/openephysdatainterface.py index 9b63261a9..13fc4e96e 100644 --- a/src/neuroconv/datainterfaces/ecephys/openephys/openephysdatainterface.py +++ b/src/neuroconv/datainterfaces/ecephys/openephys/openephysdatainterface.py @@ -16,6 +16,14 @@ class OpenEphysRecordingInterface(BaseRecordingExtractorInterface): ExtractorName = "OpenEphysBinaryRecordingExtractor" + @classmethod + def get_source_schema(cls) -> dict: + source_schema = super().get_source_schema() + source_schema["properties"]["folder_path"][ + "description" + ] = "Path to OpenEphys directory (.continuous or .dat files)." + return source_schema + def __new__( cls, folder_path: FolderPathType, diff --git a/src/neuroconv/datainterfaces/ecephys/openephys/openephyssortingdatainterface.py b/src/neuroconv/datainterfaces/ecephys/openephys/openephyssortingdatainterface.py index 86af9883d..8ccbf2ab1 100644 --- a/src/neuroconv/datainterfaces/ecephys/openephys/openephyssortingdatainterface.py +++ b/src/neuroconv/datainterfaces/ecephys/openephys/openephyssortingdatainterface.py @@ -15,7 +15,9 @@ def get_source_schema(cls) -> dict: metadata_schema = get_schema_from_method_signature( method=cls.__init__, exclude=["recording_id", "experiment_id"] ) - metadata_schema["properties"]["folder_path"].update(description="Path to directory containing OpenEphys files.") + metadata_schema["properties"]["folder_path"].update( + description="Path to directory containing OpenEphys .spikes files." + ) metadata_schema["additionalProperties"] = False return metadata_schema diff --git a/src/neuroconv/datainterfaces/ecephys/phy/phydatainterface.py b/src/neuroconv/datainterfaces/ecephys/phy/phydatainterface.py index 0f8399496..cac24faa2 100644 --- a/src/neuroconv/datainterfaces/ecephys/phy/phydatainterface.py +++ b/src/neuroconv/datainterfaces/ecephys/phy/phydatainterface.py @@ -16,9 +16,12 @@ class PhySortingInterface(BaseSortingExtractorInterface): @classmethod def get_source_schema(cls) -> dict: - schema = super().get_source_schema() - schema["properties"]["exclude_cluster_groups"]["items"] = dict(type="string") - return schema + source_schema = super().get_source_schema() + source_schema["properties"]["exclude_cluster_groups"]["items"] = dict(type="string") + source_schema["properties"]["folder_path"][ + "description" + ] = "Path to the output Phy folder (containing the params.py)." + return source_schema def __init__( self, diff --git a/src/neuroconv/datainterfaces/ecephys/plexon/plexondatainterface.py b/src/neuroconv/datainterfaces/ecephys/plexon/plexondatainterface.py index 581e6cf88..b13c738dd 100644 --- a/src/neuroconv/datainterfaces/ecephys/plexon/plexondatainterface.py +++ b/src/neuroconv/datainterfaces/ecephys/plexon/plexondatainterface.py @@ -15,6 +15,12 @@ class PlexonRecordingInterface(BaseRecordingExtractorInterface): associated_suffixes = (".plx",) info = "Interface for Plexon recording data." + @classmethod + def get_source_schema(cls) -> dict: + source_schema = super().get_source_schema() + source_schema["properties"]["file_path"]["description"] = "Path to the .plx file." + return source_schema + def __init__(self, file_path: FilePathType, verbose: bool = True, es_key: str = "ElectricalSeries"): """ Load and prepare data for Plexon. @@ -53,6 +59,12 @@ class PlexonSortingInterface(BaseSortingExtractorInterface): associated_suffixes = (".plx",) info = "Interface for Plexon sorting data." + @classmethod + def get_source_schema(cls) -> dict: + source_schema = super().get_source_schema() + source_schema["properties"]["file_path"]["description"] = "Path to the plexon spiking data (.plx file)." + return source_schema + def __init__(self, file_path: FilePathType, verbose: bool = True): """ Load and prepare data for Plexon. diff --git a/src/neuroconv/datainterfaces/ecephys/spike2/spike2datainterface.py b/src/neuroconv/datainterfaces/ecephys/spike2/spike2datainterface.py index da69c6b0d..c2030f06e 100644 --- a/src/neuroconv/datainterfaces/ecephys/spike2/spike2datainterface.py +++ b/src/neuroconv/datainterfaces/ecephys/spike2/spike2datainterface.py @@ -29,7 +29,7 @@ class Spike2RecordingInterface(BaseRecordingExtractorInterface): def get_source_schema(cls) -> dict: source_schema = get_schema_from_method_signature(method=cls.__init__, exclude=["smrx_channel_ids"]) source_schema.update(additionalProperties=True) - source_schema["properties"]["file_path"].update(description="Path to CED data file.") + source_schema["properties"]["file_path"].update(description="Path to .smr or .smrx file.") return source_schema @classmethod diff --git a/src/neuroconv/datainterfaces/ophys/brukertiff/brukertiffconverter.py b/src/neuroconv/datainterfaces/ophys/brukertiff/brukertiffconverter.py index d11363ed0..e6b7abf15 100644 --- a/src/neuroconv/datainterfaces/ophys/brukertiff/brukertiffconverter.py +++ b/src/neuroconv/datainterfaces/ophys/brukertiff/brukertiffconverter.py @@ -19,7 +19,11 @@ class BrukerTiffMultiPlaneConverter(NWBConverter): @classmethod def get_source_schema(cls): - return get_schema_from_method_signature(cls) + source_schema = get_schema_from_method_signature(cls) + source_schema["properties"]["folder_path"][ + "description" + ] = "The folder that contains the Bruker TIF image files (.ome.tif) and configuration files (.xml, .env)." + return source_schema def get_conversion_options_schema(self): interface_name = list(self.data_interface_objects.keys())[0] diff --git a/src/neuroconv/datainterfaces/ophys/brukertiff/brukertiffdatainterface.py b/src/neuroconv/datainterfaces/ophys/brukertiff/brukertiffdatainterface.py index 77bfa505d..78bdbaac4 100644 --- a/src/neuroconv/datainterfaces/ophys/brukertiff/brukertiffdatainterface.py +++ b/src/neuroconv/datainterfaces/ophys/brukertiff/brukertiffdatainterface.py @@ -19,7 +19,7 @@ def get_source_schema(cls) -> dict: source_schema = super().get_source_schema() source_schema["properties"]["folder_path"][ "description" - ] = "The path that points to the folder containing the Bruker volumetric TIF image files and configuration files." + ] = "The folder that contains the Bruker TIF image files (.ome.tif) and configuration files (.xml, .env)." return source_schema @classmethod @@ -186,7 +186,7 @@ def get_source_schema(cls) -> dict: source_schema = super().get_source_schema() source_schema["properties"]["folder_path"][ "description" - ] = "The path that points to the folder containing the Bruker TIF image files and configuration files." + ] = "The folder containing the Bruker TIF image files and configuration files." return source_schema @classmethod diff --git a/src/neuroconv/datainterfaces/ophys/caiman/caimandatainterface.py b/src/neuroconv/datainterfaces/ophys/caiman/caimandatainterface.py index 13bd00ab9..5d86695f4 100644 --- a/src/neuroconv/datainterfaces/ophys/caiman/caimandatainterface.py +++ b/src/neuroconv/datainterfaces/ophys/caiman/caimandatainterface.py @@ -9,6 +9,12 @@ class CaimanSegmentationInterface(BaseSegmentationExtractorInterface): associated_suffixes = (".hdf5",) info = "Interface for Caiman segmentation data." + @classmethod + def get_source_schema(cls) -> dict: + source_metadata = super().get_source_schema() + source_metadata["properties"]["file_path"]["description"] = "Path to .hdf5 file." + return source_metadata + def __init__(self, file_path: FilePathType, verbose: bool = True): """ diff --git a/src/neuroconv/datainterfaces/ophys/micromanagertiff/micromanagertiffdatainterface.py b/src/neuroconv/datainterfaces/ophys/micromanagertiff/micromanagertiffdatainterface.py index bdc91507f..57d966da9 100644 --- a/src/neuroconv/datainterfaces/ophys/micromanagertiff/micromanagertiffdatainterface.py +++ b/src/neuroconv/datainterfaces/ophys/micromanagertiff/micromanagertiffdatainterface.py @@ -15,9 +15,7 @@ class MicroManagerTiffImagingInterface(BaseImagingExtractorInterface): def get_source_schema(cls) -> dict: source_schema = super().get_source_schema() - source_schema["properties"]["folder_path"][ - "description" - ] = "The path that points to the folder containing the OME-TIF image files." + source_schema["properties"]["folder_path"]["description"] = "The folder containing the OME-TIF image files." return source_schema def __init__(self, folder_path: FolderPathType, verbose: bool = True): diff --git a/src/neuroconv/datainterfaces/ophys/miniscope/miniscopeconverter.py b/src/neuroconv/datainterfaces/ophys/miniscope/miniscopeconverter.py index 576ab7b34..ab7706646 100644 --- a/src/neuroconv/datainterfaces/ophys/miniscope/miniscopeconverter.py +++ b/src/neuroconv/datainterfaces/ophys/miniscope/miniscopeconverter.py @@ -18,7 +18,9 @@ class MiniscopeConverter(NWBConverter): @classmethod def get_source_schema(cls): - return get_schema_from_method_signature(cls) + source_schema = get_schema_from_method_signature(cls) + source_schema["properties"]["folder_path"]["description"] = "The path to the main Miniscope folder." + return source_schema def __init__(self, folder_path: FolderPathType, verbose: bool = True): """ diff --git a/src/neuroconv/datainterfaces/ophys/miniscope/miniscopeimagingdatainterface.py b/src/neuroconv/datainterfaces/ophys/miniscope/miniscopeimagingdatainterface.py index d7b6dfc9f..7031fd7f1 100644 --- a/src/neuroconv/datainterfaces/ophys/miniscope/miniscopeimagingdatainterface.py +++ b/src/neuroconv/datainterfaces/ophys/miniscope/miniscopeimagingdatainterface.py @@ -16,6 +16,15 @@ class MiniscopeImagingInterface(BaseImagingExtractorInterface): associated_suffixes = (".avi", ".csv", ".json") info = "Interface for Miniscope imaging data." + @classmethod + def get_source_schema(cls) -> dict: + source_schema = super().get_source_schema() + source_schema["properties"]["folder_path"][ + "description" + ] = "The main Miniscope folder. The microscope movie files are expected to be in sub folders within the main folder." + + return source_schema + def __init__(self, folder_path: FolderPathType): """ Initialize reading the Miniscope imaging data. @@ -23,8 +32,8 @@ def __init__(self, folder_path: FolderPathType): Parameters ---------- folder_path : FolderPathType - The path that points to the main Miniscope folder. - The miscroscope movie files are expected to be in sub folders within the main folder. + The main Miniscope folder. + The microscope movie files are expected to be in sub folders within the main folder. """ from ndx_miniscope.utils import get_recording_start_times, read_miniscope_config