Skip to content

Commit

Permalink
mountainsort5
Browse files Browse the repository at this point in the history
  • Loading branch information
magland committed May 15, 2024
1 parent d651eab commit 0a13ce4
Show file tree
Hide file tree
Showing 8 changed files with 1,552 additions and 0 deletions.
6 changes: 6 additions & 0 deletions dendro_apps/spikeforestxyz/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ RUN pip install lindi==0.3.4
# Install sortingview
RUN pip install sortingview==0.13.3

# Install spikeinterface-pipelines from source, for now
RUN git clone https://github.com/SpikeInterface/spikeinterface_pipelines.git && \
cd spikeinterface_pipelines && \
# git checkout dev && \
pip install -e .

# Copy files into the container
RUN mkdir /app
COPY *.py /app/
Expand Down
2 changes: 2 additions & 0 deletions dendro_apps/spikeforestxyz/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

from dendro.sdk import App
from recording_summary.recording_summary import RecordingSummaryProcessor
from mountainsort5.mountainsort5 import Mountainsort5Processor

app = App(
name="spikeforestxyz",
Expand All @@ -13,6 +14,7 @@


app.add_processor(RecordingSummaryProcessor)
app.add_processor(Mountainsort5Processor)

if __name__ == "__main__":
app.run()
Empty file.
26 changes: 26 additions & 0 deletions dendro_apps/spikeforestxyz/mountainsort5/mountainsort5.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
from dendro.sdk import ProcessorBase, InputFile, OutputFile
from dendro.sdk import BaseModel, Field


class Mountainsort5Context(BaseModel):
input: InputFile = Field(description="Input .nwb.lindi.json file")
output: OutputFile = Field(description="Output .json file")


class Mountainsort5Processor(ProcessorBase):
name = "spikeforestxyz.mountainsort5"
description = "Run mountainsort5 spike sorting on a recording."
label = "spikeforestxyz.mountainsort5"
tags = []
attributes = {"wip": True}

@staticmethod
def run(context: Mountainsort5Context):
from .run_mountainsort5 import run_mountainsort5

output_fname = 'output.nwb.lindi.json'
context.input.download(output_fname)
run_mountainsort5(
output_fname
)
context.output.upload(output_fname)
Loading

0 comments on commit 0a13ce4

Please sign in to comment.