本文へ移動
cccskills
無料GitHub で公開

nwb-conversion

Converts neuroscience acquisition data to Neurodata Without Borders files with NeuroConv and PyNWB, preserves metadata and timebases, checks evidence-based clock alignment, and produces schema validation, NWB Inspector findings and round-trip checks. Use for NWB conversion and synchronization of planar single-channel two-photon TIFF imaging plus timestamped behavioral position CSV; this skill does not perform spike sorting or claim tested support for arbitrary acquisition formats.

インストール方法を見る

含まれるファイル(5)

  • SKILL.md7.4 KB
  • assets/session-template.json1.3 KB
  • references/input-contract.md4.7 KB
  • references/upstream-review.md3.9 KB
  • scripts/convert_session.py15.7 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

Validated NWB conversion

Supported streams

The executable workflow covers two explicit input streams in one session:

InputNWB representationTested constraints
Two-photon grayscale multi-page TIFF + frame timestamps CSVAcquisition TwoPhotonSeries named Imaging through NeuroConvOne channel, one plane, one 2D image per page, fixed shape and dtype
Calibrated position CSV (time_s,x,y)Behavior Position / SpatialSeries through PyNWBCoordinates in m, cm or mm; converted to meters without temporal resampling

Other acquisition readers require their own format-specific tests. In particular, this helper does not decode SpikeGLX, Open Ephys, multichannel TIFF, volumetric TIFF, compressed video, or pixel-to-world calibration. Do not rename an arbitrary numeric table to a supported stream.

Install the tested environment

uv venv --python 3.12 nwb-env
uv pip install --python nwb-env/bin/python 'neuroconv[tiff]==0.10.2' pynwb==4.2.0 \
  nwbinspector==0.7.2 roiextractors==0.10.0 tifffile==2026.9.20 \
  zarr==2.18.7 hdmf-zarr==0.11.3

Keep both Zarr pins even for an HDF5-only conversion: NeuroConv 0.10.2 imports its backend configuration modules at startup, and the tested unconstrained Zarr 3.4.0 installation failed on zarr.codec_registry. The pinned environment ran the real conversion, PyNWB validation and Inspector successfully on macOS ARM64. The dependency resolver supplies NumPy and HDF5 support. These are compatibility pins, not claims that Zarr 2 and hdmf-zarr 0.11.3 are the latest releases. Current interface checks and the tested dependency exception are recorded in references/upstream-review.md.

Workflow

  1. Inventory the actual inputs and acquisition metadata. Identify image plane/channel, optical settings, subject/session identifiers, timezone, behavior coordinate system, units and the timestamp clock for every stream. Preserve originals. Do not replace missing metadata with plausible defaults from a sample config.
  2. Copy assets/session-template.json beside the raw data and replace the explicitly synthetic values. Paths resolve from that JSON file. Read references/input-contract.md for the exact CSV and metadata contract and the pulse-pair variant. TIFF pixels are retained as acquired; a raw arbitrary-unit intensity does not become a photon count merely by changing its unit label.
  3. Establish the common timebase from acquisition evidence. Frame timestamps must already be reference-clock seconds since the timezone-aware session start. For position, provide either a documented shared clock or matched synchronization pulses. The helper fits one affine clock transform, checks its residual against a specified tolerance, and refuses extrapolation beyond the pulse range. It never estimates synchronization from coincident-looking neural/behavioral signals. Clock resets or nonlinear drift require an explicitly validated piecewise mapping.
  4. Execute the converter. Inputs must have finite, strictly increasing timestamps and matching image/timestamp counts. Explicitly declare one channel and one plane; known TIFF channel/plane metadata must agree. Grayscale pages alone cannot exclude undocumented interleaving. The acquisition samples stay intact; only coordinate units and, when evidenced, behavior timestamps are transformed.
  5. Read the .validation.json alongside the NWB file. Schema compliance, Inspector findings and data equality answer different questions. The script exits with an error for schema failures and flags critical Inspector findings for review in the report. Review all findings in context; successful validation cannot establish that anatomical labels, pulse pairing or calibration supplied by the user are correct.
  6. Deliver the NWB, validation JSON, original conversion config and an explanation of remaining metadata gaps or Inspector findings. No upload or archive submission is part of this workflow.

Execute

Run the following from the skill directory, with paths to the actual analysis files:

nwb-env/bin/python scripts/convert_session.py /path/to/session.json --output /path/to/session.nwb

nwb-env must point to the environment created above; the absolute example input paths are illustrative. The command requires a .nwb output and refuses to overwrite an existing NWB or validation report. Output contains source and converter checksums, package versions, full supplied metadata, units and clock-fit provenance in both a scratch record and the validation report. When adapting this command for large data, TIFF writes are iterative and equality checking loads one frame at a time; position CSV currently loads into memory. Round-trip checks also verify dtype, unit scaling, optical-channel links, subject metadata, position reference frame, common time origin and embedded provenance. Inspector findings requiring review appear in the CLI summary; exit zero alone does not mean the file is scientifically correct. An exception during writing or round-trip checks can leave an incomplete NWB without a report; retain the error and use a fresh output path after correcting the cause.

The real-library test converts eight non-square uint16 images with irregular frame timing plus four position samples, asserts exact pixel and timestamp round trips, and checks centimeter-to-meter conversion. A second integration test recovers a known 1000-ppm clock drift and 50-ms offset from three matched pulses. Duplicate timestamps, mismatched frame counts, absent clock evidence, nonlinear pulse disagreement and missing timezone are rejection cases. The mapping is TIFF (time,y,x) to NWB (time,x,y), explicitly checked against every transposed source page. NWB Inspector flags the short fixture with a critical orientation heuristic because width exceeds frame count; the report retains that finding and adds the exact frame/timestamp equality evidence. No transpose is performed merely to satisfy a longest-axis heuristic.

Primary references

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

Estimates intracellular metabolic fluxes from steady-state carbon-13 isotope-tracing measurements using validated atom maps, mfapy isotope simulation, constrained multistart fitting, and flux-profile diagnostics. Use for 13C-MFA, carbon tracing, mass isotopomer distributions (MDVs/MIDs), positional isotopomers, parallel tracer experiments, and determining whether labeling data constrain a pathway flux. Distinguishes measured-label inference from COBRA flux balance analysis and flags experiments requiring nonstationary MFA.

日本語の概要は準備中です。原文の説明を表示しています。

K-Dense-AI/scientific-agent-skills4.9万2026年10月12日 更新

adaptyv

無料

Uses the Adaptyv Bio Foundry API and Python SDK to design protein characterization experiments, estimate costs, submit sequences, monitor laboratory progress, and retrieve results. Applies to Adaptyv Foundry, its target catalog, binding screening and affinity assays, thermostability, expression, fluorescence, epitope binning, and enzyme activity workflows, including code using adaptyv or FoundryClient.

日本語の概要は準備中です。原文の説明を表示しています。

K-Dense-AI/scientific-agent-skills4.9万2026年10月12日 更新

aeon

無料

This skill should be used for time series machine learning tasks including classification, regression, clustering, forecasting, anomaly detection, segmentation, and similarity search. Use when working with temporal data, sequential patterns, or time-indexed observations requiring specialized algorithms beyond standard ML approaches. Particularly suited for univariate and multivariate time series analysis with scikit-learn compatible APIs.

日本語の概要は準備中です。原文の説明を表示しています。

K-Dense-AI/scientific-agent-skills4.9万2026年10月12日 更新

Looks up precomputed AlphaGenome Atlas effects for any GRCh38 single-nucleotide variant (AVI score with Phred and 18 SHAP feature attributions, plus raw and quantile scores for RNA-seq, DNase, ATAC, ChIP-TF, ChIP-histone, CAGE, PRO-cap, splicing, polyadenylation and contact-map tracks), scores variants or scans windows on demand with the AlphaGenome model for human and mouse (variant scoring, in silico mutagenesis, REF-versus-ALT track prediction), and builds Atlas website deep links. Use when the user mentions AlphaGenome, AlphaGenome Atlas, AVI or AlphaGenome Variant Impact, DeepMind variant effect prediction, or wants to prioritise or mechanistically interpret non-coding, regulatory, splicing, enhancer, promoter, or chromatin-accessibility effects of SNVs from a VCF, credible set, or region. Research use only; not a clinical tool.

日本語の概要は準備中です。原文の説明を表示しています。

K-Dense-AI/scientific-agent-skills4.9万2026年10月12日 更新

Plans, executes, and documents validation, verification, and transfer of analytical procedures under the governing framework - ICH Q2(R2) and Q14, USP <1220>/<1225>/<1226>, ICH M10 bioanalytical, CLSI EP, or ISO/IEC 17025. Use for HPLC, LC-MS/MS, GC, CE, ICP-MS, dissolution, qNMR, qPCR, NIR, and ligand binding or cell-based assays whenever the question is whether a procedure is fit for its intended purpose. Triggers include "method validation", "analytical method validation", "AMV", "validation protocol", "acceptance criteria", "linearity", "reportable range", "accuracy and precision", "repeatability", "intermediate precision", "recovery", "LOD", "LOQ", "detection limit", "quantitation limit", "specificity", "robustness", "method transfer", "method comparison", "Deming", "Passing-Bablok", "Bland-Altman", "equivalence testing", "OOS investigation", "ICH Q2", "Q2(R2)", "Q14", "USP 1225", "ICH M10", "incurred sample reanalysis", "ISR", "CLSI EP", and any request to show that an assay works.

日本語の概要は準備中です。原文の説明を表示しています。

K-Dense-AI/scientific-agent-skills4.9万2026年10月12日 更新

anndata

無料

Handles annotated matrices in single-cell analysis, .h5ad and Zarr files, and integration with the scverse ecosystem. This is the data format skill—for analysis workflows use scanpy; for probabilistic models use scvi-tools; for population-scale queries use cellxgene-census.

日本語の概要は準備中です。原文の説明を表示しています。

K-Dense-AI/scientific-agent-skills4.9万2026年10月12日 更新

K-Dense-AI のスキルをすべて見る

このスキルの問題を報告する