Логотип Calcium Imaging Analysis Guide

Calcium Imaging Analysis Guide

ОрганизацияПопулярный
NeuroAIHub
calcium-imaging-analysis-guide

Domain-validated pipeline guidance for calcium imaging data analysis: motion correction, ROI extraction, neuropil correction, spike inference, and quality control

Обзор

ИздательNeuroAIHub
РепозиторийBrainPilot
Название навыкаcalcium-imaging-analysis-guide
Звёзды
1.1K
Форки
74
Файлы в комплекте
2
ЛицензияAGPL-3.0
Ссылки
  • Инструкции в формате Markdown

    Модель загружает файл SKILL.md по мере необходимости, поэтому токены расходуются только при подходящем запросе.

  • Работает с любой большой языковой моделью

    Навыки ИИ — это обычный Markdown, а не код для конкретного поставщика, поэтому они работают с GPT, Claude, Gemini, Grok и локальными моделями.

  • Файлы в комплекте: 2

    Скрипты, шаблоны и справочные материалы, которые модель может читать во время работы. Файлы доступны только для чтения и никогда не выполняются.

  • Открытый исходный код

    Издатель навыка на GitHub — NeuroAIHub. Перед установкой изучите исходные материалы.

Установка

Установите навык ИИ Calcium Imaging Analysis Guide в TypingMind, чтобы использовать его с любой LLM, или добавьте его в другой агент, который умеет читать SKILL.md.

1

Установка в TypingMind

TypingMind устанавливает навык прямо из его папки на GitHub: читает SKILL.md, собирает файлы ресурсов и сохраняет результат локально.

  1. Откройте приложение и перейдите в раздел «Плагины → Навыки».
  2. Выберите «Установить из GitHub».
  3. Вставьте указанную ниже ссылку на папку навыка и подтвердите установку.
    https://github.com/NeuroAIHub/BrainPilot/tree/main/packages/skills/skills/09_Cellular_Molecular_Neuroscience/calcium-imaging-analysis-guide
  4. Включите навык в каждом чате, где хотите его использовать.
Плагины → Навыки → Добавить навык → По ссылке GitHub, затем вставьте ссылку на папку и нажмите «Продолжить».
2

Установка в другом агенте

Любой агент с поддержкой формата Agent Skills может использовать этот навык — скопируйте папку в каталог навыков этого агента.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/NeuroAIHub/BrainPilot.git /tmp/BrainPilot
mkdir -p .claude/skills
cp -r /tmp/BrainPilot/packages/skills/skills/09_Cellular_Molecular_Neuroscience/calcium-imaging-analysis-guide .claude/skills/calcium-imaging-analysis-guide
После копирования перезапустите Claude Code, чтобы загрузить новый навык.

Использование в TypingMind

Включите навык Calcium Imaging Analysis Guide в любом чате TypingMind, и дальше модель всё сделает сама. Его название и описание хранятся в системном промпте, а при появлении подходящего запроса модель сама загружает полные инструкции. Вам не нужно вызывать навык вручную, и до фактического использования он не расходует токены.

Модель сама загружает навык Calcium Imaging Analysis Guide, как только появляется подходящий для него запрос.

Работает с любой моделью ИИ

Навыки ИИ — это обычные инструкции в Markdown, а не код для конкретного поставщика, поэтому навык Calcium Imaging Analysis Guide не привязан к модели, для которой он был создан. Установите его один раз в TypingMind и используйте с GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama или локальной моделью, которую запускаете самостоятельно, — со своими ключами API.

  • Загружается только при необходимости

    Системный промпт содержит только название и описание. Инструкции загружаются при первом подходящем запросе, поэтому неиспользуемый навык не расходует токены.

  • Меняйте модели прямо в чате

    Навык состоит из инструкций, а не кода, поэтому смена модели не нарушает его работу: новая модель читает тот же файл SKILL.md.

Инструкции навыка

Это содержимое файла SKILL.md, которое загружает модель. Прочитайте его перед установкой: навык — это инструкции, которым будет следовать ваша модель.

Calcium Imaging Analysis Guide

Purpose

This skill encodes expert methodological knowledge for analyzing calcium imaging data from fluorescent genetically encoded calcium indicators (GECIs). It covers the domain-specific decisions that a general-purpose programmer or data scientist would get wrong without specialized training in optical neurophysiology: choosing deconvolution parameters based on indicator kinetics, correcting neuropil contamination, handling modality-specific preprocessing, and interpreting fluorescence signals as neural activity.

When to Use This Skill

  • Designing an analysis pipeline for two-photon, one-photon/miniscope, or fiber photometry data
  • Choosing motion correction strategy for awake behaving animal recordings
  • Selecting ROI detection method for your preparation density and imaging modality
  • Setting deconvolution parameters matched to your calcium indicator
  • Evaluating whether extracted signals reflect genuine single-neuron activity
  • Troubleshooting common artifacts: photobleaching, neuropil contamination, motion

Research Planning Protocol

Before executing the domain-specific steps below, you MUST:

  1. State the research question — What neural activity question is this calcium imaging analysis addressing?
  2. Justify the method choice — Why calcium imaging (not electrophysiology, fMRI, etc.)? What alternatives were considered?
  3. Declare expected outcomes — What activity patterns would support vs. refute the hypothesis?
  4. Note assumptions and limitations — What does this method assume? Where could it mislead (e.g., indicator kinetics, neuropil)?
  5. Present the plan to the user and WAIT for confirmation before proceeding.

For detailed methodology guidance, see the research-literacy skill.

⚠️ Verification Notice

This skill was generated by AI from academic literature. All parameters, thresholds, and citations require independent verification before use in research. If you find errors, please open an issue.

Decision Tree: Which Pipeline for Your Modality

What is your imaging modality?
 |
 +-- Two-photon (2P) microscopy
 | |
 | +-- Sparse labeling (Cre-dependent, cell-type specific)?
 | | --> Suite2P or CaImAn with standard CNMF
 | | Neuropil coefficient ~0.7 (Chen et al., 2013)
 | |
 | +-- Dense labeling (pan-neuronal)?
 | --> Suite2P with increased max_overlap (>=0.75)
 | or CaImAn CNMF with careful merge parameters
 | Consider soma-targeted indicators (Chen et al., 2020)
 |
 +-- One-photon (1P) / miniscope
 | |
 | --> CNMF-E (Zhou et al., 2018) or MIN1PIPE (Lu et al., 2018)
 | Standard CNMF will FAIL: 1P has large structured background
 | that requires explicit background modeling
 | CaImAn supports 1P via CNMF-E mode
 |
 +-- Fiber photometry (population-level)
 |
 --> No single-cell extraction needed
 Use isosbestic channel (405-415 nm) for motion/bleaching correction
 IRLS regression preferred over OLS (Lerner et al., 2015)
 Compute dF/F or z-scored signal

Core Pipeline Steps

Step 1: Motion Correction

Motion correction must precede all other analysis. Uncorrected motion creates false transients and blurs cellular signals.

ParameterRigidNon-RigidSource
Use caseAnesthetized or head-fixed, stableAwake behaving, brain pulsationPnevmatikakis & Giovannucci, 2017
Max shift10% of FOV (default)10% of FOV per patchSuite2P default
Reference frameIterative: top 20 of 300 random framesSame, per-patchPachitariu et al., 2017

Domain judgment:

  • Always use non-rigid registration for awake behaving animals. Brain tissue deforms non-uniformly due to heartbeat, respiration, and locomotion (Dombeck et al., 2007).
  • For 1P/miniscope data, apply spatial high-pass filtering before estimating motion vectors, because the large fluctuating background confounds rigid correlation-based registration (Giovannucci et al., 2019).
  • Inspect registration quality by computing the correlation of each frame to the reference. Frames with correlation below 0.5 indicate severe motion and should be flagged or excluded (expert consensus).
  • Edge pixels that shift out of the FOV during registration should be cropped; ROIs near edges may have unreliable signals.

Step 2: ROI Detection

MethodBest ForToolSource
CNMF / sparse NMF2P, moderate densityCaImAnPnevmatikakis et al., 2016
Clustering + PCA2P, large FOVSuite2PPachitariu et al., 2017
CNMF-E1P / miniscopeCaImAn (1P mode)Zhou et al., 2018
Cellpose (anatomical)Weak functional signal, good morphologySuite2P + CellposeStringer et al., 2021
PCA/ICALegacy, not recommended for dense dataVariousMukamel et al., 2009

Domain judgment:

  • Set expected cell diameter to match your preparation. Cortical pyramidal somata are ~10-15 um; Purkinje cells are ~25 um; granule cells are ~5 um. Converting to pixels depends on your magnification and pixel size.
  • For dense labeling, increase max_overlap to 0.75-1.0 (Suite2P) or adjust merge thresholds (CaImAn). Default overlap rejection discards valid overlapping neurons.
  • Set connected=False when detecting dendrites or axonal boutons, which are not spatially contiguous in 2D projections.
  • Always manually curate detected ROIs. Automated classifiers achieve near-human performance (Giovannucci et al., 2019) but are not perfect, especially for non-standard preparations.

Step 3: Neuropil Contamination Correction

Why this matters: In 2P imaging, each ROI's fluorescence contains signal from the surrounding neuropil (dense mesh of dendrites and axons). Without correction, you will observe artificial correlations between neurons, inflated response amplitudes, and obscured cell-specific tuning (Chen et al., 2013).

Correction formula:

F_corrected = F_raw - r * F_neuropil
ParameterTypical ValueSource
Neuropil coefficient (r)0.7 (range: 0.5-0.8)Chen et al., 2013
Neuropil annulus inner gap2 pixels from ROI borderSuite2P default
Minimum neuropil pixels350Suite2P default

Domain judgment:

  • The coefficient r = 0.7 is an empirically derived average for 2P cortical imaging. It was estimated by measuring fluorescence in blood vessels (which should have zero true signal) relative to surrounding neuropil (Chen et al., 2013).
  • Suite2P estimates r iteratively together with spike deconvolution, minimizing the deconvolution residual. This data-driven approach is preferred over a fixed coefficient.
  • For 1P data, neuropil correction is handled differently: CNMF-E models the background as a low-rank spatiotemporal component rather than a per-ROI annulus (Zhou et al., 2018).
  • Over-subtraction (r too high) produces negative fluorescence values. If you see many negative dF/F values, reduce r.
  • For soma-targeted indicators (e.g., soma-GCaMP6f; Chen et al., 2020), neuropil contamination is reduced but not eliminated.

Step 4: dF/F Computation

Baseline estimation methods:

MethodDescriptionBest ForSource
Rolling percentile (8th)8th percentile over sliding windowContinuous recordings, moderate activityDombeck et al., 2007
Rolling percentile (10th-20th)Higher percentile over sliding windowLower activity preparationsExpert consensus
Exponential fitFit decaying exponential to sessionStrong photobleachingGiovannucci et al., 2019
Mode of distributionHistogram mode of fluorescenceStable baseline, high frame ratePeron et al., 2015

Formula:

dF/F = (F(t) - F0) / F0

Domain judgment:

  • The sliding window for rolling percentile should be 30-60 seconds to capture slow baseline fluctuations without tracking fast transients (expert consensus).
  • Using the mean as baseline inflates dF/F for highly active neurons. Use a low percentile (8th-10th) or the mode instead (Dombeck et al., 2007).
  • Photobleaching causes an exponential decay in baseline fluorescence. If uncorrected, early time points will have artificially low dF/F and late time points artificially high dF/F. Fit and subtract an exponential before computing dF/F (Giovannucci et al., 2019).

Step 5: Deconvolution / Spike Inference

Deconvolution estimates the underlying spike train from the slow calcium fluorescence signal.

AlgorithmTypeSpeedStrengthsSource
OASISModel-based (AR)Very fast (1 us/frame)Online, warm-startable, scalableFriedrich et al., 2017
FOOPSIModel-based (L1)FastSparse, non-negativeVogelstein et al., 2010
CASCADEDeep learningModerateNoise-adaptive, calibrated ratesRupprecht et al., 2021
MLSpikeBayesianSlowPrincipled uncertaintyDeneux et al., 2016

Critical: The deconvolution kernel decay constant (tau) must match your calcium indicator. See references/indicator-parameters.md for the full table.

Indicatortau (decay time) for deconvolutionSource
GCaMP6s~1.0-1.5 sChen et al., 2013
GCaMP6f~0.4 sChen et al., 2013
jGCaMP7f~0.3 sDana et al., 2019
jGCaMP8f~0.2 sZhang et al., 2023
jGCaMP8m~0.14 sZhang et al., 2023
jGCaMP8s~0.2 sZhang et al., 2023

Domain judgment:

  • If tau is wrong, deconvolution is systematically biased. Too long produces sluggish traces; too short produces overshoot artifacts.
  • The kernel is fixed to tau in Suite2P; it is not fit to the data. Always verify your indicator and set tau explicitly.
  • Do NOT threshold deconvolved events to create binary spike trains. This discards magnitude information: a 1-spike event and a 10-spike burst become identical (Pachitariu et al., 2017).
  • Deconvolved amplitudes are in arbitrary units. There is an unknown scaling factor between fluorescence and spike count. Do not interpret amplitudes as absolute firing rates.
  • CASCADE (Rupprecht et al., 2021) can produce calibrated spike rate estimates by resampling ground truth data to match your recording's noise level, but still has systematic errors at low SNR.

Step 6: Quality Metrics for ROI Acceptance

MetricCriterionRationaleSource
SNR (peak transient / noise SD)> 3Below this, transients are indistinguishable from noiseGiovannucci et al., 2019
Skewness of dF/F trace> 0.5Real calcium transients produce right-skewed distributions; noise is symmetricSuite2P classifier
Spatial footprint compactnessCompact, soma-shapedDiffuse or fragmented footprints indicate neuropil or artifactsGiovannucci et al., 2019
Spatial-temporal CNN score> 0.5 (CaImAn)Learned classifier combining shape and activityGiovannucci et al., 2019

Domain judgment:

  • SNR varies dramatically with indicator brightness, expression level, and imaging depth. An SNR of 3 is a minimum; SNR > 5 is preferred for reliable spike inference.
  • Skewness exploits the biophysics: calcium transients have fast rise and slow decay, producing a positively skewed fluorescence distribution. Gaussian noise has skewness near zero.
  • Always examine the spatial footprint. A valid somatic ROI should be roughly circular (10-20 um diameter in cortex). Elongated or multi-lobed footprints often indicate dendrites, overlapping cells, or motion artifacts.

Common Pitfalls

  1. Wrong tau for your indicator: Using GCaMP6s parameters for GCaMP6f data (or vice versa) produces incorrect deconvolution. Always check which indicator was used.

  2. Skipping neuropil correction: Without subtracting r * F_neuropil, apparent correlations between nearby neurons will be inflated by shared neuropil signal. This is the most common error in published calcium imaging analyses.

  3. Using standard CNMF for 1P data: One-photon microscopy has large, spatially structured background fluorescence from out-of-focus tissue. Standard CNMF assumes a sparse background and will fail. Use CNMF-E or MIN1PIPE.

  4. Ignoring photobleaching: GECIs photobleach over minutes to hours. Uncorrected bleaching creates a downward trend that biases dF/F computation and can mask late-session activity.

  5. Motion artifacts in awake animals: Residual motion after correction creates false transients synchronized across neurons (they all move together). Check for correlated artifacts by examining the relationship between motion metrics and neural activity.

  6. Indicator saturation at high firing rates: GECIs have a limited dynamic range. At high firing rates (> 10-20 Hz for GCaMP6s, > 50 Hz for GCaMP8f), the fluorescence signal saturates and underestimates true activity (Chen et al., 2013). Faster indicators saturate at higher rates.

  7. Over-aggressive neuropil subtraction: Setting r too high produces negative fluorescence, especially with bright indicators. Negative dF/F values that exceed noise levels indicate over-subtraction.

  8. Interpreting deconvolved amplitudes as spike counts: The mapping from fluorescence to spike number is nonlinear and depends on indicator expression level, baseline calcium, and imaging conditions. Treat deconvolved traces as relative activity measures.

Minimum Reporting Checklist

Based on community standards (Giovannucci et al., 2019; Pachitariu et al., 2017):

  • Calcium indicator used (name and version, e.g., GCaMP6f, jGCaMP8s)
  • Imaging modality and frame rate (e.g., 2P at 30 Hz, 1P miniscope at 20 Hz)
  • Motion correction method (rigid/non-rigid) and software version
  • ROI detection method and key parameters (cell diameter, threshold)
  • Number of ROIs detected and accepted after curation
  • Neuropil correction method and coefficient used
  • dF/F baseline estimation method and window
  • Deconvolution algorithm and tau value used
  • Quality metrics and acceptance thresholds (SNR, skewness)
  • Number of sessions, animals, and total neurons in final dataset

Key References

  • Chen, T. W., et al. (2013). Ultrasensitive fluorescent proteins for imaging neuronal activity. Nature, 499, 295-300.
  • Chen, X., et al. (2020). Soma-targeted imaging of neural circuits by ribosome tethering. Neuron, 107(3), 454-469.
  • Dana, H., et al. (2019). High-performance calcium sensors for imaging activity in neuronal populations and microcompartments. Nature Methods, 16, 649-657.
  • Deneux, T., et al. (2016). Accurate spike estimation from noisy calcium signals via supervised learning. Nature Communications, 7, 12190.
  • Dombeck, D. A., et al. (2007). Imaging large-scale neural activity with cellular resolution in awake, mobile mice. Neuron, 56(1), 43-57.
  • Friedrich, J., Zhou, P., & Paninski, L. (2017). Fast online deconvolution of calcium imaging data. PLOS Computational Biology, 13(3), e1005423.
  • Giovannucci, A., et al. (2019). CaImAn: An open source tool for scalable calcium imaging data analysis. eLife, 8, e38173.
  • Lerner, T. N., et al. (2015). Intact-brain analyses reveal distinct information carried by SNc dopamine subcircuits. Cell, 162(3), 635-647.
  • Lu, J., et al. (2018). MIN1PIPE: A miniscope 1-photon-based calcium imaging signal extraction pipeline. Cell Reports, 23(12), 3673-3684.
  • Mukamel, E. A., et al. (2009). Automated analysis of cellular signals from large-scale calcium imaging data. Neuron, 63(6), 747-760.
  • Pachitariu, M., et al. (2017). Suite2p: beyond 10,000 neurons with standard two-photon microscopy. bioRxiv, 061507.
  • Peron, S. P., et al. (2015). A cellular resolution map of barrel cortex activity during tactile behavior. Neuron, 86(3), 783-799.
  • Pnevmatikakis, E. A., et al. (2016). Simultaneous denoising, deconvolution, and demixing of calcium imaging data. Neuron, 89(2), 285-299.
  • Pnevmatikakis, E. A., & Giovannucci, A. (2017). NoRMCorre: An online algorithm for piecewise rigid motion correction of calcium imaging data. Journal of Neuroscience Methods, 291, 83-94.
  • Rupprecht, P., et al. (2021). A database and deep learning toolbox for noise-optimized, generalized spike inference from calcium imaging. Nature Neuroscience, 24, 1324-1337.
  • Stringer, C., et al. (2021). Cellpose: a generalist algorithm for cellular segmentation. Nature Methods, 18, 100-106.
  • Vogelstein, J. T., et al. (2010). Fast nonnegative deconvolution for spike train inference from population calcium imaging. Journal of Neurophysiology, 104(6), 3691-3704.
  • Zhang, Y., et al. (2023). Fast and sensitive GCaMP calcium indicators for imaging neural populations. Nature, 615, 884-891.
  • Zhou, P., et al. (2018). Efficient and accurate extraction of in vivo calcium signals from microendoscopic video data. eLife, 7, e28728.

See references/pipeline-details.md for tool comparisons and references/indicator-parameters.md for indicator kinetics tables.

Файлы в комплекте

Модель читает эти файлы по мере необходимости, пока навык загружен. Они доступны только для чтения и никогда не выполняются.

Часто задаваемые вопросы

Что делает навык ИИ Calcium Imaging Analysis Guide?

Domain-validated pipeline guidance for calcium imaging data analysis: motion correction, ROI extraction, neuropil correction, spike inference, and quality control

Зачем использовать Calcium Imaging Analysis Guide в TypingMind?

Потому что вы устанавливаете навык один раз и используете его с любой моделью. Calcium Imaging Analysis Guide — это обычный текст в формате Markdown, а не код для конкретного поставщика, поэтому один и тот же навык работает с GPT-5, Claude, Gemini, Grok или локальной моделью. Вы можете менять модель прямо во время чата, и навык продолжит работать. TypingMind использует ваши собственные ключи API, поэтому вы платите поставщикам напрямую, а не оформляете подписку с оплатой за каждое место. Ваши навыки и чаты остаются в вашем собственном хранилище.

Как установить Calcium Imaging Analysis Guide в TypingMind?

В TypingMind откройте «Плагины → Навыки → Установить из GitHub» и вставьте https://github.com/NeuroAIHub/BrainPilot/tree/main/packages/skills/skills/09_Cellular_Molecular_Neuroscience/calcium-imaging-analysis-guide. TypingMind прочитает файл SKILL.md, включит сопутствующие файлы в пакет и установит навык, который можно включать отдельно для каждого чата.

Какие модели ИИ могут использовать Calcium Imaging Analysis Guide?

Любая модель, которую вы подключите в TypingMind. Навыки ИИ — это обычные инструкции в формате Markdown, а не код для конкретного поставщика, поэтому GPT, Claude, Gemini, Grok и локальные модели могут загружать этот навык, когда запрос ему соответствует.

Со сколькими моделями ИИ можно использовать Calcium Imaging Analysis Guide?

С любым количеством. В TypingMind вы можете использовать Calcium Imaging Analysis Guide с любой моделью, которая поддерживает навыки, в том числе с GPT, Claude, Gemini, Grok, DeepSeek, Mistral и Llama. Для этого вы используете собственные ключи API.

Бесплатен ли навык ИИ Calcium Imaging Analysis Guide?

Да. Навык опубликован на GitHub по лицензии AGPL-3.0. Издатель — NeuroAIHub. Вы платите только своему поставщику ИИ за использованные токены.

Что такое навыки ИИ?

Навык ИИ — это набор инструкций, которыми модель ИИ может пользоваться каждый раз, когда ей нужно выполнить конкретную задачу. Он соответствует открытому формату Agent Skills: файл SKILL.md с названием и описанием, а также любые скрипты, шаблоны или справочные файлы, которые могут понадобиться модели. Модель читает инструкции, только когда ваш запрос соответствует навыку, поэтому установленный навык ничего не стоит, пока не используется.

Чем навыки ИИ отличаются от плагинов и серверов MCP?

Плагин или сервер MCP даёт модели новые инструменты, которые она может вызывать: при вызове где-то выполняется код и возвращает результат. Навык ИИ, напротив, даёт модели знания и описывает порядок действий: как подойти к задаче, какие шаги выполнить и каким должен быть хороший результат. Навыки — это обычный текст в формате Markdown, поэтому им не нужны сервер, ключ API или среда выполнения, и они работают с любой моделью.

Все
Логотип NousResearch

Inference Sh Cli

NousResearch
ОрганизацияПопулярный

Запускайте более 150 приложений с ИИ (для изображений, видео и LLM) через CLI inference.sh.

53.5K
250.4K
Файлы: 4
Открыть
Логотип firecrawl

Firecrawl Build Search

firecrawl
ОрганизацияПопулярный

Интегрируйте Firecrawl `/search` в код продукта и рабочие процессы агентов. Используйте этот навык, если приложению нужно найти материалы перед извлечением, функция начинается с поискового запроса, а не с URL, или системе нужно…

9.8K
181.6K
Инструкции
Открыть
Логотип firecrawl

Firecrawl Build

firecrawl
ОрганизацияПопулярный

Интегрируйте Firecrawl в код приложения, если продукту, агенту или рабочему процессу нужны веб-данные: поиск, актуальные результаты, скрейпинг страниц, извлечение структурированных данных или взаимодействие с браузером…

9.8K
181.6K
Файлы: 6
Открыть
Логотип Shubhamsaboo

Advisor Orchestrator Worker

Shubhamsaboo
СообществоПопулярный

Используйте, если задача слишком велика для одного прохода модели, требует параллельного исследования или генерации результатов по множеству подзадач (например, изучения дюжины конкурентов) или пользователь просит скоординировать работу нескольких…

20.4K
138.7K
Файлы: 4
Открыть

Создайте своё рабочее пространство с ИИ прямо сейчас

Подпишитесь на нашу рассылку, чтобы узнавать о новых функциях и предстоящих розыгрышах 👇