Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add BrukerTiffSinglePlaneConverter #487

Merged
merged 18 commits into from
Oct 31, 2023
Merged
Show file tree
Hide file tree
Changes from 15 commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
1a4f9e0
Add converter
garrettmflynn Oct 31, 2023
957157a
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 31, 2023
4a85fe6
Update guideGlobalMetadata.json
garrettmflynn Oct 31, 2023
5389724
Add story
garrettmflynn Oct 31, 2023
74bb297
Merge branch 'bruker-single-converter' into BrukerTiffMultiPlaneConve…
garrettmflynn Oct 31, 2023
d4d15d2
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 31, 2023
bc5050f
Update guideGlobalMetadata.json
garrettmflynn Oct 31, 2023
fb44e7a
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 31, 2023
d9b3f2b
Merge branch 'BrukerTiffMultiPlaneConverter' into MiniscopeConverter
CodyCBakerPhD Oct 31, 2023
8e696be
Merge pull request #489 from NeurodataWithoutBorders/MiniscopeConverter
CodyCBakerPhD Oct 31, 2023
63522bb
Merge branch 'main' into bruker-single-converter
CodyCBakerPhD Oct 31, 2023
037ebc3
Merge branch 'bruker-single-converter' into BrukerTiffMultiPlaneConve…
CodyCBakerPhD Oct 31, 2023
78f14c7
Merge pull request #488 from NeurodataWithoutBorders/BrukerTiffMultiP…
CodyCBakerPhD Oct 31, 2023
02acfc5
Merge branch 'main' into bruker-single-converter
CodyCBakerPhD Oct 31, 2023
c64e54f
Merge branch 'main' into bruker-single-converter
CodyCBakerPhD Oct 31, 2023
6ed348e
Properly generate stories
garrettmflynn Oct 31, 2023
94e668e
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 31, 2023
5e1b58e
Merge branch 'main' into bruker-single-converter
CodyCBakerPhD Oct 31, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions generateInterfaceSchema.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from pathlib import Path
import json
from neuroconv import datainterfaces, NWBConverter
from neuroconv import converters, datainterfaces, NWBConverter

filepath = Path("guideGlobalMetadata.json")
generatedJSONSchemaPath = Path("schemas", "json", "generated")
Expand All @@ -16,7 +16,7 @@

class CustomNWBConverter(NWBConverter):
data_interface_classes = {
custom_name: getattr(datainterfaces, interface_name)
custom_name: getattr(datainterfaces, interface_name, getattr(converters, interface_name, None))
for custom_name, interface_name in interface_class_dict.items()
}

Expand Down
5 changes: 4 additions & 1 deletion guideGlobalMetadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@
"AudioInterface",
"MiniscopeBehaviorInterface",
"EDFRecordingInterface",
"SpikeGLXConverterPipe"
"SpikeGLXConverterPipe",
"BrukerTiffSinglePlaneConverter",
"BrukerTiffMultiPlaneConverter",
"MiniscopeConverter"
]
}
35 changes: 35 additions & 0 deletions schemas/json/generated/BrukerTiffMultiPlaneConverter.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"required": [],
"properties": {
"BrukerTiffMultiPlaneConverter": {
"required": [
"folder_path"
],
"properties": {
"folder_path": {
"format": "directory",
"type": "string"
},
"plane_separation_type": {
"enum": [
"disjoint",
"contiguous"
]
},
"verbose": {
"type": "boolean",
"default": false
}
},
"type": "object",
"additionalProperties": false
}
},
"type": "object",
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "source.schema.json",
"title": "Source data schema",
"description": "Schema for the source data, files and directories",
"version": "0.1.0"
}
29 changes: 29 additions & 0 deletions schemas/json/generated/BrukerTiffSinglePlaneConverter.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"required": [],
"properties": {
"BrukerTiffSinglePlaneConverter": {
"required": [
"folder_path"
],
"properties": {
"folder_path": {
"format": "directory",
"type": "string"
},
"verbose": {
"type": "boolean",
"default": false
}
},
"type": "object",
"additionalProperties": false
}
},
"type": "object",
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "source.schema.json",
"title": "Source data schema",
"description": "Schema for the source data, files and directories",
"version": "0.1.0"
}
33 changes: 33 additions & 0 deletions schemas/json/generated/EDFRecordingInterface.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"required": [],
"properties": {
"EDFRecordingInterface": {
"required": [
"file_path"
],
"properties": {
"file_path": {
"format": "file",
"type": "string"
},
"verbose": {
"type": "boolean",
"default": true
},
"es_key": {
"type": "string",
"default": "ElectricalSeries"
}
},
"type": "object",
"additionalProperties": false
}
},
"type": "object",
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "source.schema.json",
"title": "Source data schema",
"description": "Schema for the source data, files and directories",
"version": "0.1.0"
}
30 changes: 30 additions & 0 deletions schemas/json/generated/SpikeGLXConverterPipe.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"required": [],
"properties": {
"SpikeGLXConverterPipe": {
"required": [
"folder_path"
],
"properties": {
"folder_path": {
"format": "directory",
"type": "string",
"description": "Path to the folder containing SpikeGLX streams."
},
"verbose": {
"type": "boolean",
"default": false
}
},
"type": "object",
"additionalProperties": false
}
},
"type": "object",
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "source.schema.json",
"title": "Source data schema",
"description": "Schema for the source data, files and directories",
"version": "0.1.0"
}
114 changes: 114 additions & 0 deletions src/renderer/src/stories/pages/guided-mode/SourceData.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ import SLEAPInterfaceSchema from "../../../../../../schemas/json/generated/SLEAP
import FicTracDataInterfaceSchema from "../../../../../../schemas/json/generated/FicTracDataInterface.json";
import AudioInterfaceSchema from "../../../../../../schemas/json/generated/AudioInterface.json";
import MiniscopeBehaviorInterfaceSchema from "../../../../../../schemas/json/generated/MiniscopeBehaviorInterface.json";
import EDFRecordingInterfaceSchema from "../../../../../../schemas/json/generated/EDFRecordingInterface.json";
import SpikeGLXConverterPipeSchema from "../../../../../../schemas/json/generated/SpikeGLXConverterPipe.json";
import BrukerTiffSinglePlaneConverterSchema from "../../../../../../schemas/json/generated/BrukerTiffSinglePlaneConverter.json";
import BrukerTiffMultiPlaneConverterSchema from "../../../../../../schemas/json/generated/BrukerTiffMultiPlaneConverter.json";

export default {
title: "Pages/Guided Mode/Source Data",
Expand Down Expand Up @@ -116,6 +120,92 @@ globalStateCopy.schema.source_data.properties.FicTracDataInterface =
globalStateCopy.schema.source_data.properties.AudioInterface = AudioInterfaceSchema.properties.AudioInterface;
globalStateCopy.schema.source_data.properties.MiniscopeBehaviorInterface =
MiniscopeBehaviorInterfaceSchema.properties.MiniscopeBehaviorInterface;
globalStateCopy.schema.source_data.properties.EDFRecordingInterface =
EDFRecordingInterfaceSchema.properties.EDFRecordingInterface;
globalStateCopy.schema.source_data.properties.SpikeGLXConverterPipe =
SpikeGLXConverterPipeSchema.properties.SpikeGLXConverterPipe;
globalStateCopy.schema.source_data.properties.BrukerTiffSinglePlaneConverter =
BrukerTiffSinglePlaneConverterSchema.properties.BrukerTiffSinglePlaneConverter;

const globalStateCopy = JSON.parse(JSON.stringify(globalState));
globalStateCopy.schema.source_data.properties.SpikeGLXRecordingInterface =
SpikeGLXRecordingInterfaceSchema.properties.SpikeGLXRecordingInterface;
globalStateCopy.schema.source_data.properties.SpikeGLXNIDQInterface =
SpikeGLXNIDQInterfaceSchema.properties.SpikeGLXNIDQInterface;
globalStateCopy.schema.source_data.properties.PhySortingInterface =
PhySortingInterfaceSchema.properties.PhySortingInterface;
globalStateCopy.schema.source_data.properties.NeuroScopeRecordingInterface =
NeuroScopeRecordingInterfaceSchema.properties.NeuroScopeRecordingInterface;
globalStateCopy.schema.source_data.properties.NeuroScopeLFPInterface =
NeuroScopeLFPInterfaceSchema.properties.NeuroScopeLFPInterface;
globalStateCopy.schema.source_data.properties.NeuroScopeSortingInterface =
NeuroScopeSortingInterfaceSchema.properties.NeuroScopeSortingInterface;
globalStateCopy.schema.source_data.properties.BiocamRecordingInterface =
BiocamRecordingInterfaceSchema.properties.BiocamRecordingInterface;
globalStateCopy.schema.source_data.properties.IntanRecordingInterface =
IntanRecordingInterfaceSchema.properties.IntanRecordingInterface;
globalStateCopy.schema.source_data.properties.OpenEphysRecordingInterface =
OpenEphysRecordingInterfaceSchema.properties.OpenEphysRecordingInterface;
globalStateCopy.schema.source_data.properties.BlackrockRecordingInterface =
BlackrockRecordingInterfaceSchema.properties.BlackrockRecordingInterface;
globalStateCopy.schema.source_data.properties.BlackrockSortingInterface =
BlackrockSortingInterfaceSchema.properties.BlackrockSortingInterface;
globalStateCopy.schema.source_data.properties.CellExplorerSortingInterface =
CellExplorerSortingInterfaceSchema.properties.CellExplorerSortingInterface;
globalStateCopy.schema.source_data.properties.KiloSortSortingInterface =
KiloSortSortingInterfaceSchema.properties.KiloSortSortingInterface;
globalStateCopy.schema.source_data.properties.Spike2RecordingInterface =
Spike2RecordingInterfaceSchema.properties.Spike2RecordingInterface;
globalStateCopy.schema.source_data.properties.BrukerTiffSinglePlaneImagingInterface =
BrukerTiffSinglePlaneImagingInterfaceSchema.properties.BrukerTiffSinglePlaneImagingInterface;
globalStateCopy.schema.source_data.properties.ExtractSegmentationInterface =
ExtractSegmentationInterfaceSchema.properties.ExtractSegmentationInterface;
globalStateCopy.schema.source_data.properties.CnmfeSegmentationInterface =
CnmfeSegmentationInterfaceSchema.properties.CnmfeSegmentationInterface;
globalStateCopy.schema.source_data.properties.BrukerTiffMultiPlaneImagingInterface =
BrukerTiffMultiPlaneImagingInterfaceSchema.properties.BrukerTiffMultiPlaneImagingInterface;
globalStateCopy.schema.source_data.properties.MicroManagerTiffImagingInterface =
MicroManagerTiffImagingInterfaceSchema.properties.MicroManagerTiffImagingInterface;
globalStateCopy.schema.source_data.properties.ScanImageImagingInterface =
ScanImageImagingInterfaceSchema.properties.ScanImageImagingInterface;
globalStateCopy.schema.source_data.properties.TiffImagingInterface =
TiffImagingInterfaceSchema.properties.TiffImagingInterface;
globalStateCopy.schema.source_data.properties.MiniscopeImagingInterface =
MiniscopeImagingInterfaceSchema.properties.MiniscopeImagingInterface;
globalStateCopy.schema.source_data.properties.SbxImagingInterface =
SbxImagingInterfaceSchema.properties.SbxImagingInterface;
globalStateCopy.schema.source_data.properties.CaimanSegmentationInterface =
CaimanSegmentationInterfaceSchema.properties.CaimanSegmentationInterface;
globalStateCopy.schema.source_data.properties.MCSRawRecordingInterface =
MCSRawRecordingInterfaceSchema.properties.MCSRawRecordingInterface;
globalStateCopy.schema.source_data.properties.MEArecRecordingInterface =
MEArecRecordingInterfaceSchema.properties.MEArecRecordingInterface;
globalStateCopy.schema.source_data.properties.PlexonRecordingInterface =
PlexonRecordingInterfaceSchema.properties.PlexonRecordingInterface;
globalStateCopy.schema.source_data.properties.PlexonSortingInterface =
PlexonSortingInterfaceSchema.properties.PlexonSortingInterface;
globalStateCopy.schema.source_data.properties.AxonaRecordingInterface =
AxonaRecordingInterfaceSchema.properties.AxonaRecordingInterface;
globalStateCopy.schema.source_data.properties.NeuralynxRecordingInterface =
NeuralynxRecordingInterfaceSchema.properties.NeuralynxRecordingInterface;
globalStateCopy.schema.source_data.properties.AlphaOmegaRecordingInterface =
AlphaOmegaRecordingInterfaceSchema.properties.AlphaOmegaRecordingInterface;
globalStateCopy.schema.source_data.properties.DeepLabCutInterface =
DeepLabCutInterfaceSchema.properties.DeepLabCutInterface;
globalStateCopy.schema.source_data.properties.SLEAPInterface = SLEAPInterfaceSchema.properties.SLEAPInterface;
globalStateCopy.schema.source_data.properties.FicTracDataInterface =
FicTracDataInterfaceSchema.properties.FicTracDataInterface;
globalStateCopy.schema.source_data.properties.AudioInterface = AudioInterfaceSchema.properties.AudioInterface;
globalStateCopy.schema.source_data.properties.MiniscopeBehaviorInterface =
MiniscopeBehaviorInterfaceSchema.properties.MiniscopeBehaviorInterface;
globalStateCopy.schema.source_data.properties.EDFRecordingInterface =
EDFRecordingInterfaceSchema.properties.EDFRecordingInterface;
globalStateCopy.schema.source_data.properties.SpikeGLXConverterPipe =
SpikeGLXConverterPipeSchema.properties.SpikeGLXConverterPipe;
globalStateCopy.schema.source_data.properties.BrukerTiffSinglePlaneConverter =
BrukerTiffSinglePlaneConverterSchema.properties.BrukerTiffSinglePlaneConverter;
globalStateCopy.schema.source_data.properties.BrukerTiffMultiPlaneConverter =
BrukerTiffMultiPlaneConverterSchema.properties.BrukerTiffMultiPlaneConverter;

const results = globalStateCopy.results;
for (let sub in results) {
Expand Down Expand Up @@ -344,3 +434,27 @@ const MiniscopeBehaviorInterfaceGlobalCopy = JSON.parse(JSON.stringify(globalSta
MiniscopeBehaviorInterfaceGlobalCopy.interfaces.interface = MiniscopeBehaviorInterface;
MiniscopeBehaviorInterfaceGlobalCopy.schema.source_data = MiniscopeBehaviorInterfaceSchema;
MiniscopeBehaviorInterface.args = { activePage, globalState: MiniscopeBehaviorInterfaceGlobalCopy };

export const EDFRecordingInterface = PageTemplate.bind({});
const EDFRecordingInterfaceGlobalCopy = JSON.parse(JSON.stringify(globalState));
EDFRecordingInterfaceGlobalCopy.interfaces.interface = EDFRecordingInterface;
EDFRecordingInterfaceGlobalCopy.schema.source_data = EDFRecordingInterfaceSchema;
EDFRecordingInterface.args = { activePage, globalState: EDFRecordingInterfaceGlobalCopy };

export const SpikeGLXConverterPipe = PageTemplate.bind({});
const SpikeGLXConverterPipeGlobalCopy = JSON.parse(JSON.stringify(globalState));
SpikeGLXConverterPipeGlobalCopy.interfaces.interface = SpikeGLXConverterPipe;
SpikeGLXConverterPipeGlobalCopy.schema.source_data = SpikeGLXConverterPipeSchema;
SpikeGLXConverterPipe.args = { activePage, globalState: SpikeGLXConverterPipeGlobalCopy };

export const BrukerTiffSinglePlaneConverter = PageTemplate.bind({});
const BrukerTiffSinglePlaneConverterGlobalCopy = JSON.parse(JSON.stringify(globalState));
BrukerTiffSinglePlaneConverterGlobalCopy.interfaces.interface = BrukerTiffSinglePlaneConverter;
BrukerTiffSinglePlaneConverterGlobalCopy.schema.source_data = BrukerTiffSinglePlaneConverterSchema;
BrukerTiffSinglePlaneConverter.args = { activePage, globalState: BrukerTiffSinglePlaneConverterGlobalCopy };

export const BrukerTiffMultiPlaneConverter = PageTemplate.bind({});
const BrukerTiffMultiPlaneConverterGlobalCopy = JSON.parse(JSON.stringify(globalState));
BrukerTiffMultiPlaneConverterGlobalCopy.interfaces.interface = BrukerTiffMultiPlaneConverter;
BrukerTiffMultiPlaneConverterGlobalCopy.schema.source_data = BrukerTiffMultiPlaneConverterSchema;
BrukerTiffMultiPlaneConverter.args = { activePage, globalState: BrukerTiffMultiPlaneConverterGlobalCopy };
Loading