Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
e0e2316
Add QC capsules, unify scripts, update capsule versions
alejoe91 May 13, 2025
3187d87
Update to si-0.102.3 and DSL2
alejoe91 May 13, 2025
dac5163
Update NWB requirements and fix process name in slurm config
alejoe91 May 13, 2025
0f47c13
Add torch to base image and update capsule env
alejoe91 May 14, 2025
d005caf
clean up config_w_resources
alejoe91 May 14, 2025
705aed0
Merge branch 'improve-user-exp' of github.com:AllenNeuralDynamics/ain…
alejoe91 May 14, 2025
3585164
clean up config
alejoe91 May 14, 2025
863d9a1
Fix time handling in DSL2
alejoe91 May 15, 2025
ea6da0d
update ks4 commit
alejoe91 May 16, 2025
088aaee
Update docs and file names
alejoe91 May 20, 2025
c8ca8ee
Fix conflicts
alejoe91 May 20, 2025
1b38ee5
Merge branch 'main' of github.com:AllenNeuralDynamics/aind-ephys-pipe…
alejoe91 May 20, 2025
bd86c9d
Fix tests
alejoe91 May 20, 2025
7a32f00
Update nextflow version in tests
alejoe91 May 20, 2025
cbb0e80
Add nextfloe_test.config
alejoe91 May 20, 2025
41ece84
Cleanup unused apps for space
alejoe91 May 20, 2025
451c27c
Update docker images and add spikeitnerface input type
alejoe91 May 20, 2025
aa560cd
Add --params_file input, cleam up README
alejoe91 May 28, 2025
3c899a0
Fix test params json
alejoe91 May 28, 2025
9b00a0a
Fix remapping in collect results process and results copy
alejoe91 May 28, 2025
dcce25e
Final touches
alejoe91 May 28, 2025
fec3458
Add default_params.json file
alejoe91 Jun 3, 2025
4ffd5b2
Update preprocessing
alejoe91 Jun 3, 2025
1080585
update postprocessing
alejoe91 Jun 3, 2025
fdc397e
Initialize params
alejoe91 Jun 3, 2025
54b4130
Update troubleshooting
alejoe91 Jun 3, 2025
1dc0b25
update docs
alejoe91 Jun 3, 2025
5d19d6d
update params undefined
alejoe91 Jun 3, 2025
728ee30
Add HF_HUB_CACHE troubleshoot
alejoe91 Jun 3, 2025
7783d3c
add mplconfigsir to troubleshoot
alejoe91 Jun 3, 2025
b343244
typo
alejoe91 Jun 3, 2025
ea2e7cd
More troubleshooting
alejoe91 Jun 3, 2025
429a3ef
Fix naming in config
alejoe91 Jun 3, 2025
fb4ddc5
comment out bind command
alejoe91 Jun 3, 2025
da14837
Fix kachery docs
alejoe91 Jun 4, 2025
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
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,13 @@ process {
cpus = 2
memory = '8 GB'
containerOptions = '--memory-swap=-1 --memory-swappiness 20 --shm-size=4g'

withName: spikesort_kilosort25 {
errorStrategy = 'retry'
maxRetries = 3
maxErrors = 5
}
withName: spikesort_kilosort4 {
errorStrategy = 'retry'
maxRetries = 3
maxErrors = 5
}
}

docker {
enabled = true
platform = 'linux/amd64'
runOptions = '--volume $DATA_PATH:/tmp/data'
envWhitelist = ['KACHERY_ZONE', 'KACHERY_CLOUD_CLIENT_ID', 'KACHERY_CLOUD_PRIVATE_KEY']
envWhitelist = ['KACHERY_ZONE', 'KACHERY_API_KEY']
}

dag {
Expand Down
314 changes: 314 additions & 0 deletions .github/workflows/params_test.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,314 @@
{
"job_dispatch": {
"concatenate": false,
"split_groups": true,
"debug": false,
"debug_duration": 30,
"skip_timestamps_check": false,
"multi_session": false,
"input": "nwb"
},
"preprocessing": {
"job_kwargs": {
"chunk_duration": "1s",
"progress_bar": false
},
"denoising_strategy": "cmr",
"min_preprocessing_duration": 120,
"filter_type": "bandpass",
"highpass_filter": {
"freq_min": 300.0,
"margin_ms": 5.0
},
"bandpass_filter": {
"freq_min": 300.0,
"freq_max": 6000.0,
"margin_ms": 5.0
},
"phase_shift": {
"margin_ms": 100.0
},
"detect_bad_channels": {
"method": "coherence+psd",
"dead_channel_threshold": -0.5,
"noisy_channel_threshold": 1.0,
"outside_channel_threshold": -0.3,
"outside_channels_location": "top",
"n_neighbors": 11,
"seed": 0
},
"remove_out_channels": true,
"remove_bad_channels": true,
"max_bad_channel_fraction": 0.5,
"common_reference": {
"reference": "global",
"operator": "median"
},
"highpass_spatial_filter": {
"n_channel_pad": 60,
"n_channel_taper": null,
"direction": "y",
"apply_agc": true,
"agc_window_length_s": 0.01,
"highpass_butter_order": 3,
"highpass_butter_wn": 0.01
},
"motion_correction": {
"compute": true,
"apply": false,
"preset": "dredge_fast",
"detect_kwargs": {},
"select_kwargs": {},
"localize_peaks_kwargs": {},
"estimate_motion_kwargs": {
"win_step_norm": 0.1,
"win_scale_norm": 0.1
},
"interpolate_motion_kwargs": {}
}
},
"postprocessing": {
"job_kwargs": {
"chunk_duration": "1s",
"progress_bar": false
},
"use_motion_corrected": false,
"sparsity": {
"method": "radius",
"radius_um": 100
},
"duplicate_threshold": 0.9,
"return_scaled": true,
"random_spikes": {
"max_spikes_per_unit": 500,
"method": "uniform",
"margin_size": null,
"seed": null
},
"noise_levels": {
"num_chunks_per_segment": 20,
"chunk_size": 10000,
"seed": null
},
"waveforms": {
"ms_before": 3.0,
"ms_after": 4.0,
"dtype": null
},
"templates": {},
"spike_amplitudes": {
"peak_sign": "neg"
},
"template_similarity": {
"method": "cosine_similarity"
},
"correlograms": {
"window_ms": 50.0,
"bin_ms": 1.0
},
"isi_histograms": {
"window_ms": 100.0,
"bin_ms": 5.0
},
"unit_locations": {
"method": "monopolar_triangulation"
},
"spike_locations": {
"method": "grid_convolution"
},
"template_metrics": {
"upsampling_factor": 10,
"sparsity": null,
"include_multi_channel_metrics": true
},
"principal_components": {
"n_components": 5,
"mode": "by_channel_local",
"whiten": true
},
"quality_metrics_names": [
"num_spikes",
"firing_rate",
"presence_ratio",
"snr",
"isi_violation",
"rp_violation",
"sliding_rp_violation",
"amplitude_cutoff",
"amplitude_median",
"amplitude_cv",
"synchrony",
"firing_range",
"drift",
"isolation_distance",
"l_ratio",
"d_prime",
"nearest_neighbor",
"silhouette"
],
"quality_metrics": {
"presence_ratio": {
"bin_duration_s": 60
},
"snr": {
"peak_sign": "neg",
"peak_mode": "extremum"
},
"isi_violation": {
"isi_threshold_ms": 1.5,
"min_isi_ms": 0
},
"rp_violation": {
"refractory_period_ms": 1,
"censored_period_ms": 0.0
},
"sliding_rp_violation": {
"bin_size_ms": 0.25,
"window_size_s": 1,
"exclude_ref_period_below_ms": 0.5,
"max_ref_period_ms": 10,
"contamination_values": null
},
"amplitude_cutoff": {
"peak_sign": "neg",
"num_histogram_bins": 100,
"histogram_smoothing_value": 3,
"amplitudes_bins_min_ratio": 5
},
"amplitude_median": {
"peak_sign": "neg"
},
"amplitude_cv": {
"average_num_spikes_per_bin": 50,
"percentiles": [5, 95],
"min_num_bins": 10,
"amplitude_extension": "spike_amplitudes"
},
"firing_range": {
"bin_size_s": 5,
"percentiles": [5, 95]
},
"synchrony": {
"synchrony_sizes": [2, 4, 8]
},
"nearest_neighbor": {
"max_spikes": 10000,
"n_neighbors": 4
},
"nn_isolation": {
"max_spikes": 10000,
"min_spikes": 10,
"n_neighbors": 4,
"n_components": 10,
"radius_um": 100
},
"nn_noise_overlap": {
"max_spikes": 10000,
"min_spikes": 10,
"n_neighbors": 4,
"n_components": 10,
"radius_um": 100
},
"silhouette": {
"method": ["simplified"]
}
}
},
"curation": {
"job_kwargs": {
"chunk_duration": "1s",
"progress_bar": false
},
"query": "isi_violations_ratio < 0.5 and presence_ratio > 0.8 and amplitude_cutoff < 0.1",
"noise_neural_classifier": "SpikeInterface/UnitRefine_noise_neural_classifier",
"sua_mua_classifier": "SpikeInterface/UnitRefine_sua_mua_classifier"
},
"visualization": {
"job_kwargs": {
"chunk_duration": "1s",
"progress_bar": false
},
"timeseries": {
"n_snippets_per_segment": 2,
"snippet_duration_s": 0.5
},
"drift": {
"detection": {
"peak_sign": "neg",
"detect_threshold": 5,
"exclude_sweep_ms": 0.1
},
"localization": {
"ms_before": 0.1,
"ms_after": 0.3,
"radius_um": 100.0
},
"n_skip": 30,
"alpha": 0.15,
"vmin": -200,
"vmax": 0,
"cmap": "Greys_r",
"figsize": [10, 10]
},
"motion": {
"cmap": "Greys_r",
"scatter_decimate": 15,
"figsize": [15, 10]
}
},
"nwb": {
"backend": "zarr",
"ecephys": {
"stub": false,
"stub_seconds": 10,
"write_lfp": true,
"write_raw": false,
"lfp_temporal_factor": 2,
"lfp_spatial_factor": 4,
"lfp_highpass_freq_min": 0.1,
"surface_channel_agar_probes_indices": "",
"lfp": {
"filter": {
"freq_min": 0.1,
"freq_max": 500
},
"sampling_rate": 2500
}
}
},
"spikesorting": {
"sorter": "spykingcircus2",
"spykingcircus2": {
"job_kwargs": {
"chunk_duration": "1s",
"progress_bar": false
},
"sorter": {
"general": {"ms_before": 2, "ms_after": 2, "radius_um": 100},
"sparsity": {"method": "snr", "amplitude_mode": "peak_to_peak", "threshold": 0.25},
"filtering": {"freq_min": 150, "freq_max": 7000, "ftype": "bessel", "filter_order": 2, "margin_ms": 10},
"whitening": {"mode": "local", "regularize": false},
"detection": {"peak_sign": "neg", "detect_threshold": 5},
"selection": {
"method": "uniform",
"n_peaks_per_channel": 5000,
"min_n_peaks": 100000,
"select_per_channel": false,
"seed": 42
},
"apply_motion_correction": true,
"motion_correction": {"preset": "dredge_fast"},
"merging": {"max_distance_um": 50},
"clustering": {"legacy": true},
"matching": {"method": "wobble"},
"apply_preprocessing": false,
"templates_from_svd": true,
"cache_preprocessing": {"mode": "no-cache", "memory_limit": 0.5, "delete_cache": true},
"multi_units_only": false,
"job_kwargs": {"n_jobs": 0.9},
"seed": 42,
"debug": false
}
}
}
}
17 changes: 14 additions & 3 deletions .github/workflows/test_pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,17 @@ jobs:
uses: actions/setup-python@v5
with:
python-version: "3.11"

- name: Free up disk space
run: |
echo "Before cleanup:"
df -h
sudo rm -rf /usr/local/lib/android
sudo rm -rf /opt/ghc
sudo rm -rf /usr/share/dotnet
sudo rm -rf /opt/hostedtoolcache
echo "After cleanup:"
df -h

- name: Install packages
run: |
Expand All @@ -29,10 +40,10 @@ jobs:
- name: Set up Nextflow
uses: nf-core/setup-nextflow@v1
with:
version: "22.10.8"
version: latest-stable

- name: Run Nextflow pipeline
run: |
DATA_PATH="$(pwd)/sample_dataset/nwb" RESULTS_PATH="$(pwd)/sample_dataset/nwb/results" \
nextflow -C pipeline/nextflow_test.config run pipeline/main_local.nf \
--sorter spykingcircus2 --job_dispatch_args "--input nwb"
nextflow -C "$(pwd)/.github/workflows/nextflow_test.config" run pipeline/main_multi_backend.nf \
--params_file "$(pwd)/.github/workflows/params_test.json"
Loading