@brainpilot/skills 0.0.6 → 0.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -2
- package/skills/01_Meta-Skills/academic-research-hub/SKILL.md +108 -0
- package/skills/01_Meta-Skills/academic-research-hub/scripts/requirements.txt +17 -0
- package/skills/01_Meta-Skills/academic-research-hub/scripts/research.py +781 -0
- package/skills/01_Meta-Skills/beautiful-log/SKILL.md +64 -0
- package/skills/01_Meta-Skills/beautiful-log/scripts/beautiful_log.py +274 -0
- package/skills/01_Meta-Skills/ethoclaw-daily-paper/SKILL.md +130 -0
- package/skills/01_Meta-Skills/ethoclaw-daily-paper/assets/config.template.yaml +54 -0
- package/skills/01_Meta-Skills/ethoclaw-daily-paper/assets/top5_digest_template.md +5 -0
- package/skills/01_Meta-Skills/ethoclaw-daily-paper/scripts/build_top5_digest.py +300 -0
- package/skills/01_Meta-Skills/ethoclaw-daily-paper/scripts/common.py +137 -0
- package/skills/01_Meta-Skills/ethoclaw-daily-paper/scripts/merge_results.py +106 -0
- package/skills/01_Meta-Skills/ethoclaw-daily-paper/scripts/run_pipeline.py +177 -0
- package/skills/01_Meta-Skills/ethoclaw-daily-paper/scripts/search_arxiv.py +162 -0
- package/skills/01_Meta-Skills/ethoclaw-daily-paper/scripts/search_pubmed.py +202 -0
- package/skills/01_Meta-Skills/ethoclaw-normalize-tabular/SKILL.md +173 -0
- package/skills/01_Meta-Skills/ethoclaw-normalize-tabular/scripts/normalize_data.py +874 -0
- package/skills/01_Meta-Skills/ethoclaw-pdf-research/SKILL.md +134 -0
- package/skills/01_Meta-Skills/ethoclaw-pdf-research/references/confirmation-prompts.md +31 -0
- package/skills/01_Meta-Skills/ethoclaw-pdf-research/references/output-patterns.md +45 -0
- package/skills/01_Meta-Skills/ethoclaw-pdf-research/scripts/build_markdown_deliverables.py +41 -0
- package/skills/01_Meta-Skills/ethoclaw-pdf-research/scripts/build_research_log.py +84 -0
- package/skills/01_Meta-Skills/ethoclaw-pdf-research/scripts/build_summary_md.py +63 -0
- package/skills/01_Meta-Skills/ethoclaw-pdf-research/scripts/extract_pdf_bundle.py +140 -0
- package/skills/01_Meta-Skills/experiment-controller/SKILL.md +140 -0
- package/skills/01_Meta-Skills/knowledge-graph-builder/SKILL.md +366 -0
- package/skills/01_Meta-Skills/knowledge-graph-builder/scripts/entity_resolution.py +120 -0
- package/skills/01_Meta-Skills/knowledge-graph-builder/scripts/extraction_prompt_template.txt +19 -0
- package/skills/01_Meta-Skills/knowledge-graph-builder/scripts/graph_query.py +106 -0
- package/skills/01_Meta-Skills/knowledge-graph-builder/scripts/hypothesis_cli_reference.py +42 -0
- package/skills/01_Meta-Skills/knowledge-graph-builder/scripts/new_data_source_template.py +116 -0
- package/skills/01_Meta-Skills/knowledge-graph-builder/scripts/requirements.txt +15 -0
- package/skills/01_Meta-Skills/method-design/SKILL.md +61 -0
- package/skills/01_Meta-Skills/multi-search-engine/SKILL.md +119 -0
- package/skills/01_Meta-Skills/research-idea/SKILL.md +65 -0
- package/skills/05_EEG_ERP/eeg-skill/SKILL.md +197 -0
- package/skills/05_EEG_ERP/meg-skill/SKILL.md +188 -0
- package/skills/05_EEG_ERP/meg-skill/scripts/time_frequency.py +223 -0
- package/skills/05_EEG_ERP/mne-eeg-tool/SKILL.md +165 -0
- package/skills/05_EEG_ERP/mne-eeg-tool/scripts/eeg_pipeline_reference.py +231 -0
- package/skills/05_EEG_ERP/seed-iv-skill/SKILL.md +184 -0
- package/skills/05_EEG_ERP/seed-iv-skill/scripts/classify_seed_iv.py +154 -0
- package/skills/05_EEG_ERP/seed-iv-skill/scripts/extract_seed_iv_features.py +190 -0
- package/skills/05_EEG_ERP/seed-iv-skill/scripts/validate_seed_iv.py +102 -0
- package/skills/05_EEG_ERP/seed-vig-skill/SKILL.md +182 -0
- package/skills/05_EEG_ERP/seed-vig-skill/scripts/classify_seed_vig.py +165 -0
- package/skills/05_EEG_ERP/seed-vig-skill/scripts/extract_seed_vig_features.py +185 -0
- package/skills/05_EEG_ERP/seed-vig-skill/scripts/validate_seed_vig.py +88 -0
- package/skills/06_fMRI_Neuroimaging/abcd-skill/SKILL.md +308 -0
- package/skills/06_fMRI_Neuroimaging/abcd-skill/scripts/abcd_qc_summary.py +449 -0
- package/skills/06_fMRI_Neuroimaging/abcd-skill/scripts/extract_abcd_phenotype.py +292 -0
- package/skills/06_fMRI_Neuroimaging/abcd-skill/scripts/reorganize_abcd.py +387 -0
- package/skills/06_fMRI_Neuroimaging/abide-skill/SKILL.md +302 -0
- package/skills/06_fMRI_Neuroimaging/abide-skill/scripts/abide_qc_summary.py +317 -0
- package/skills/06_fMRI_Neuroimaging/abide-skill/scripts/extract_abide_phenotype.py +267 -0
- package/skills/06_fMRI_Neuroimaging/abide-skill/scripts/reorganize_abide.py +387 -0
- package/skills/06_fMRI_Neuroimaging/adhd200-skill/SKILL.md +244 -0
- package/skills/06_fMRI_Neuroimaging/adhd200-skill/scripts/adhd200_qc_summary.py +98 -0
- package/skills/06_fMRI_Neuroimaging/adhd200-skill/scripts/extract_adhd200_phenotype.py +134 -0
- package/skills/06_fMRI_Neuroimaging/adhd200-skill/scripts/reorganize_adhd200.py +206 -0
- package/skills/06_fMRI_Neuroimaging/adni-skill/SKILL.md +358 -0
- package/skills/06_fMRI_Neuroimaging/adni-skill/scripts/generate_adni_task_files.py +1305 -0
- package/skills/06_fMRI_Neuroimaging/adni-skill/scripts/generate_vqa_from_tasks.py +766 -0
- package/skills/06_fMRI_Neuroimaging/adni-skill/scripts/reorganize_adni.py +491 -0
- package/skills/06_fMRI_Neuroimaging/aibl-skill/SKILL.md +295 -0
- package/skills/06_fMRI_Neuroimaging/aibl-skill/scripts/aibl_qc_summary.py +260 -0
- package/skills/06_fMRI_Neuroimaging/aibl-skill/scripts/extract_aibl_phenotype.py +365 -0
- package/skills/06_fMRI_Neuroimaging/aibl-skill/scripts/reorganize_aibl.py +394 -0
- package/skills/06_fMRI_Neuroimaging/aomic-skill/SKILL.md +292 -0
- package/skills/06_fMRI_Neuroimaging/aomic-skill/scripts/aomic_qc_summary.py +258 -0
- package/skills/06_fMRI_Neuroimaging/aomic-skill/scripts/extract_aomic_phenotype.py +284 -0
- package/skills/06_fMRI_Neuroimaging/aomic-skill/scripts/reorganize_aomic.py +322 -0
- package/skills/06_fMRI_Neuroimaging/asl-skill/SKILL.md +168 -0
- package/skills/06_fMRI_Neuroimaging/asl-skill/scripts/compute_cbf.py +224 -0
- package/skills/06_fMRI_Neuroimaging/bids-organizer/SKILL.md +241 -0
- package/skills/06_fMRI_Neuroimaging/bold5000-skill/SKILL.md +186 -0
- package/skills/06_fMRI_Neuroimaging/bold5000-skill/scripts/bold5000_qc_summary.py +96 -0
- package/skills/06_fMRI_Neuroimaging/bold5000-skill/scripts/extract_bold5000_stimulus.py +125 -0
- package/skills/06_fMRI_Neuroimaging/bold5000-skill/scripts/reorganize_bold5000.py +102 -0
- package/skills/06_fMRI_Neuroimaging/camcan-skill/SKILL.md +213 -0
- package/skills/06_fMRI_Neuroimaging/camcan-skill/scripts/camcan_qc_summary.py +131 -0
- package/skills/06_fMRI_Neuroimaging/camcan-skill/scripts/extract_camcan_phenotype.py +145 -0
- package/skills/06_fMRI_Neuroimaging/camcan-skill/scripts/validate_camcan.py +141 -0
- package/skills/06_fMRI_Neuroimaging/cobre-skill/SKILL.md +201 -0
- package/skills/06_fMRI_Neuroimaging/cobre-skill/scripts/cobre_qc_summary.py +95 -0
- package/skills/06_fMRI_Neuroimaging/cobre-skill/scripts/extract_cobre_phenotype.py +104 -0
- package/skills/06_fMRI_Neuroimaging/cobre-skill/scripts/reorganize_cobre.py +140 -0
- package/skills/06_fMRI_Neuroimaging/conn-tool/SKILL.md +180 -0
- package/skills/06_fMRI_Neuroimaging/dcm2nii/SKILL.md +189 -0
- package/skills/06_fMRI_Neuroimaging/dmt-har-med-skill/SKILL.md +183 -0
- package/skills/06_fMRI_Neuroimaging/dmt-har-med-skill/scripts/dmt_har_med_qc_summary.py +96 -0
- package/skills/06_fMRI_Neuroimaging/dmt-har-med-skill/scripts/extract_dmt_har_med_phenotype.py +121 -0
- package/skills/06_fMRI_Neuroimaging/dmt-har-med-skill/scripts/reorganize_dmt_har_med.py +125 -0
- package/skills/06_fMRI_Neuroimaging/dwi-skill/SKILL.md +359 -0
- package/skills/06_fMRI_Neuroimaging/fmri-skill/SKILL.md +371 -0
- package/skills/06_fMRI_Neuroimaging/fmriprep-tool/SKILL.md +228 -0
- package/skills/06_fMRI_Neuroimaging/freesurfer-tool/SKILL.md +286 -0
- package/skills/06_fMRI_Neuroimaging/freesurfer-tool/scripts/freesurfer_processor.py +145 -0
- package/skills/06_fMRI_Neuroimaging/fsl-tool/SKILL.md +208 -0
- package/skills/06_fMRI_Neuroimaging/hbn-skill/SKILL.md +271 -0
- package/skills/06_fMRI_Neuroimaging/hbn-skill/scripts/extract_hbn_phenotype.py +107 -0
- package/skills/06_fMRI_Neuroimaging/hbn-skill/scripts/hbn_qc_summary.py +96 -0
- package/skills/06_fMRI_Neuroimaging/hbn-skill/scripts/reorganize_hbn.py +150 -0
- package/skills/06_fMRI_Neuroimaging/hcpa-skill/SKILL.md +210 -0
- package/skills/06_fMRI_Neuroimaging/hcpa-skill/scripts/extract_hcpa_phenotype.py +146 -0
- package/skills/06_fMRI_Neuroimaging/hcpa-skill/scripts/hcpa_qc_summary.py +120 -0
- package/skills/06_fMRI_Neuroimaging/hcpa-skill/scripts/reorganize_hcpa.py +155 -0
- package/skills/06_fMRI_Neuroimaging/hcpd-skill/SKILL.md +210 -0
- package/skills/06_fMRI_Neuroimaging/hcpd-skill/scripts/extract_hcpd_phenotype.py +148 -0
- package/skills/06_fMRI_Neuroimaging/hcpd-skill/scripts/hcpd_qc_summary.py +125 -0
- package/skills/06_fMRI_Neuroimaging/hcpd-skill/scripts/reorganize_hcpd.py +146 -0
- package/skills/06_fMRI_Neuroimaging/hcpep-skill/SKILL.md +215 -0
- package/skills/06_fMRI_Neuroimaging/hcpep-skill/scripts/extract_hcpep_phenotype.py +157 -0
- package/skills/06_fMRI_Neuroimaging/hcpep-skill/scripts/hcpep_qc_summary.py +143 -0
- package/skills/06_fMRI_Neuroimaging/hcpep-skill/scripts/reorganize_hcpep.py +146 -0
- package/skills/06_fMRI_Neuroimaging/hcppipeline-tool/SKILL.md +217 -0
- package/skills/06_fMRI_Neuroimaging/hcpya-skill/SKILL.md +214 -0
- package/skills/06_fMRI_Neuroimaging/hcpya-skill/scripts/extract_hcpya_phenotype.py +190 -0
- package/skills/06_fMRI_Neuroimaging/hcpya-skill/scripts/hcpya_qc_summary.py +152 -0
- package/skills/06_fMRI_Neuroimaging/hcpya-skill/scripts/reorganize_hcpya.py +203 -0
- package/skills/06_fMRI_Neuroimaging/ixi-skill/SKILL.md +198 -0
- package/skills/06_fMRI_Neuroimaging/ixi-skill/scripts/ixi_qc_summary.py +137 -0
- package/skills/06_fMRI_Neuroimaging/ixi-skill/scripts/reorganize_ixi.py +190 -0
- package/skills/06_fMRI_Neuroimaging/mnd-skill/SKILL.md +191 -0
- package/skills/06_fMRI_Neuroimaging/mnd-skill/scripts/extract_mnd_phenotype.py +143 -0
- package/skills/06_fMRI_Neuroimaging/mnd-skill/scripts/mnd_qc_summary.py +120 -0
- package/skills/06_fMRI_Neuroimaging/mnd-skill/scripts/validate_mnd.py +107 -0
- package/skills/06_fMRI_Neuroimaging/mschallenge-skill/SKILL.md +203 -0
- package/skills/06_fMRI_Neuroimaging/mschallenge-skill/scripts/analyze_lesions.py +119 -0
- package/skills/06_fMRI_Neuroimaging/mschallenge-skill/scripts/longitudinal_lesion.py +148 -0
- package/skills/06_fMRI_Neuroimaging/mschallenge-skill/scripts/mschallenge_qc_summary.py +132 -0
- package/skills/06_fMRI_Neuroimaging/mschallenge-skill/scripts/validate_mschallenge.py +116 -0
- package/skills/06_fMRI_Neuroimaging/nibabel-skill/SKILL.md +184 -0
- package/skills/06_fMRI_Neuroimaging/nibabel-skill/scripts/atlas_coordinate_reference.py +61 -0
- package/skills/06_fMRI_Neuroimaging/nibabel-skill/scripts/freesurfer_io_reference.py +34 -0
- package/skills/06_fMRI_Neuroimaging/nibabel-skill/scripts/nifti_inspection_reference.py +35 -0
- package/skills/06_fMRI_Neuroimaging/nifd-skill/SKILL.md +205 -0
- package/skills/06_fMRI_Neuroimaging/nifd-skill/scripts/extract_nifd_phenotype.py +132 -0
- package/skills/06_fMRI_Neuroimaging/nifd-skill/scripts/nifd_qc_summary.py +111 -0
- package/skills/06_fMRI_Neuroimaging/nifd-skill/scripts/validate_nifd.py +111 -0
- package/skills/06_fMRI_Neuroimaging/nii2dcm/SKILL.md +143 -0
- package/skills/06_fMRI_Neuroimaging/nilearn-tool/SKILL.md +266 -0
- package/skills/06_fMRI_Neuroimaging/nilearn-tool/scripts/connectome_reference.py +65 -0
- package/skills/06_fMRI_Neuroimaging/nilearn-tool/scripts/denoise_timeseries_reference.py +58 -0
- package/skills/06_fMRI_Neuroimaging/nilearn-tool/scripts/hierarchical_parcellation_reference.py +53 -0
- package/skills/06_fMRI_Neuroimaging/nilearn-tool/scripts/kmeans_parcellation_reference.py +53 -0
- package/skills/06_fMRI_Neuroimaging/nilearn-tool/scripts/preprocess_bold_reference.py +76 -0
- package/skills/06_fMRI_Neuroimaging/nilearn-tool/scripts/rest_dictlearning_reference.py +56 -0
- package/skills/06_fMRI_Neuroimaging/nilearn-tool/scripts/rest_ica_reference.py +59 -0
- package/skills/06_fMRI_Neuroimaging/nilearn-tool/scripts/second_level_glm_reference.py +58 -0
- package/skills/06_fMRI_Neuroimaging/nilearn-tool/scripts/spacenet_classifier_reference.py +59 -0
- package/skills/06_fMRI_Neuroimaging/nilearn-tool/scripts/svm_classifier_reference.py +60 -0
- package/skills/06_fMRI_Neuroimaging/nilearn-tool/scripts/task_glm_reference.py +63 -0
- package/skills/06_fMRI_Neuroimaging/nilearn-tool/scripts/zalff_summary_reference.py +109 -0
- package/skills/06_fMRI_Neuroimaging/nsd-skill/SKILL.md +210 -0
- package/skills/06_fMRI_Neuroimaging/nsd-skill/scripts/extract_nsd_stimulus.py +171 -0
- package/skills/06_fMRI_Neuroimaging/nsd-skill/scripts/nsd_qc_summary.py +142 -0
- package/skills/06_fMRI_Neuroimaging/nsd-skill/scripts/validate_nsd.py +142 -0
- package/skills/06_fMRI_Neuroimaging/oasis-skill/SKILL.md +205 -0
- package/skills/06_fMRI_Neuroimaging/oasis-skill/scripts/extract_oasis_phenotype.py +126 -0
- package/skills/06_fMRI_Neuroimaging/oasis-skill/scripts/oasis_qc_summary.py +115 -0
- package/skills/06_fMRI_Neuroimaging/oasis-skill/scripts/validate_oasis.py +119 -0
- package/skills/06_fMRI_Neuroimaging/pet-skill/SKILL.md +173 -0
- package/skills/06_fMRI_Neuroimaging/pet-skill/scripts/compute_suvr.py +202 -0
- package/skills/06_fMRI_Neuroimaging/pnc-skill/SKILL.md +206 -0
- package/skills/06_fMRI_Neuroimaging/pnc-skill/scripts/extract_pnc_phenotype.py +136 -0
- package/skills/06_fMRI_Neuroimaging/pnc-skill/scripts/pnc_qc_summary.py +116 -0
- package/skills/06_fMRI_Neuroimaging/pnc-skill/scripts/validate_pnc.py +120 -0
- package/skills/06_fMRI_Neuroimaging/ppmi-skill/SKILL.md +209 -0
- package/skills/06_fMRI_Neuroimaging/ppmi-skill/scripts/extract_ppmi_phenotype.py +138 -0
- package/skills/06_fMRI_Neuroimaging/ppmi-skill/scripts/ppmi_qc_summary.py +111 -0
- package/skills/06_fMRI_Neuroimaging/ppmi-skill/scripts/validate_ppmi.py +117 -0
- package/skills/06_fMRI_Neuroimaging/qsiprep-tool/SKILL.md +320 -0
- package/skills/06_fMRI_Neuroimaging/rest-mneta-mdd-skill/SKILL.md +215 -0
- package/skills/06_fMRI_Neuroimaging/rest-mneta-mdd-skill/scripts/extract_rest_mdd_phenotype.py +132 -0
- package/skills/06_fMRI_Neuroimaging/rest-mneta-mdd-skill/scripts/harmonize_sites.py +152 -0
- package/skills/06_fMRI_Neuroimaging/rest-mneta-mdd-skill/scripts/rest_mdd_qc_summary.py +124 -0
- package/skills/06_fMRI_Neuroimaging/rest-mneta-mdd-skill/scripts/validate_rest_mdd.py +103 -0
- package/skills/06_fMRI_Neuroimaging/smri-skill/SKILL.md +302 -0
- package/skills/06_fMRI_Neuroimaging/tcp-skill/SKILL.md +204 -0
- package/skills/06_fMRI_Neuroimaging/tcp-skill/scripts/extract_tcp_phenotype.py +139 -0
- package/skills/06_fMRI_Neuroimaging/tcp-skill/scripts/tcp_qc_summary.py +111 -0
- package/skills/06_fMRI_Neuroimaging/tcp-skill/scripts/validate_tcp.py +99 -0
- package/skills/06_fMRI_Neuroimaging/ucla-cnp-skill/SKILL.md +217 -0
- package/skills/06_fMRI_Neuroimaging/ucla-cnp-skill/scripts/extract_ucla_cnp_phenotype.py +145 -0
- package/skills/06_fMRI_Neuroimaging/ucla-cnp-skill/scripts/ucla_cnp_qc_summary.py +111 -0
- package/skills/06_fMRI_Neuroimaging/ucla-cnp-skill/scripts/validate_ucla_cnp.py +113 -0
- package/skills/06_fMRI_Neuroimaging/ukb-skill/SKILL.md +310 -0
- package/skills/06_fMRI_Neuroimaging/ukb-skill/scripts/build_ukb_survival.py +210 -0
- package/skills/06_fMRI_Neuroimaging/ukb-skill/scripts/extract_ukb_cases.py +308 -0
- package/skills/06_fMRI_Neuroimaging/ukb-skill/scripts/extract_ukb_phenotype.py +232 -0
- package/skills/06_fMRI_Neuroimaging/ukb-skill/scripts/ukb_qc_summary.py +158 -0
- package/skills/06_fMRI_Neuroimaging/wmh-segmentation/SKILL.md +133 -0
- package/skills/07_Computational_Modeling/detrending/SKILL.md +118 -0
- package/skills/07_Computational_Modeling/dictlearning/SKILL.md +122 -0
- package/skills/07_Computational_Modeling/filtering/SKILL.md +121 -0
- package/skills/07_Computational_Modeling/glm/SKILL.md +153 -0
- package/skills/07_Computational_Modeling/hierarchical/SKILL.md +121 -0
- package/skills/07_Computational_Modeling/ica/SKILL.md +122 -0
- package/skills/07_Computational_Modeling/kmeans/SKILL.md +119 -0
- package/skills/07_Computational_Modeling/run_models/SKILL.md +427 -0
- package/skills/07_Computational_Modeling/spacenet/SKILL.md +122 -0
- package/skills/07_Computational_Modeling/svm/SKILL.md +120 -0
- package/skills/08_Computational_Neuroscience/brain_gnn/SKILL.md +183 -0
- package/skills/08_Computational_Neuroscience/dipy-tool/SKILL.md +239 -0
- package/skills/08_Computational_Neuroscience/dipy-tool/scripts/dti_metrics_reference.py +70 -0
- package/skills/08_Computational_Neuroscience/dipy-tool/scripts/load_and_mask_reference.py +76 -0
- package/skills/08_Computational_Neuroscience/dipy-tool/scripts/roi_stats_reference.py +59 -0
- package/skills/08_Computational_Neuroscience/fm_app/SKILL.md +195 -0
- package/skills/08_Computational_Neuroscience/neurostorm/SKILL.md +151 -0
- package/skills/13_Visualization/brain-visualization/SKILL.md +191 -0
- package/skills/13_Visualization/brain-visualization/scripts/connectome_reference.py +108 -0
- package/skills/13_Visualization/brain-visualization/scripts/freesurfer_ply_reference.py +54 -0
- package/skills/13_Visualization/brain-visualization/scripts/zalff_summary_reference.py +116 -0
- package/skills/13_Visualization/ethoclaw-paper-figure-layout/SKILL.md +78 -0
- package/skills/13_Visualization/ethoclaw-paper-figure-layout/assets/naturecomm_figures.tex +74 -0
- package/skills/13_Visualization/ethoclaw-paper-figure-layout/scripts/layout_results_foldered.py +579 -0
- package/skills/14_Writing/overleaf-skill/SKILL.md +184 -0
- package/skills/14_Writing/overleaf-skill/scripts/install.sh +30 -0
- package/skills/14_Writing/paper-writing/SKILL.md +146 -0
- package/skills/14_Writing/paper-writing/scripts/data_statement_templates.py +164 -0
- package/skills/14_Writing/paper-writing/scripts/figure_templates.py +315 -0
- package/skills/14_Writing/paper-writing/scripts/nature_figure_style.py +214 -0
- package/skills/14_Writing/paper-writing/scripts/section_phrasebank.py +246 -0
- package/skills/16_Animal_Behavior/deeplabcut/SKILL.md +154 -0
- package/skills/16_Animal_Behavior/deeplabcut/references/3d-pose.md +89 -0
- package/skills/16_Animal_Behavior/deeplabcut/references/maDLC.md +123 -0
- package/skills/16_Animal_Behavior/deeplabcut/references/modelzoo.md +98 -0
- package/skills/16_Animal_Behavior/deeplabcut/references/standard-pipeline.md +165 -0
- package/skills/16_Animal_Behavior/deeplabcut/references/utilities.md +146 -0
- package/skills/16_Animal_Behavior/ethoclaw-analysis-report/SKILL.md +274 -0
- package/skills/16_Animal_Behavior/ethoclaw-analysis-report/assets/report_template_en.html +112 -0
- package/skills/16_Animal_Behavior/ethoclaw-analysis-report/assets/report_template_en.md +21 -0
- package/skills/16_Animal_Behavior/ethoclaw-analysis-report/assets/section_templates/cluster-section.md +5 -0
- package/skills/16_Animal_Behavior/ethoclaw-analysis-report/assets/section_templates/heatmap-section.md +5 -0
- package/skills/16_Animal_Behavior/ethoclaw-analysis-report/assets/section_templates/integrated-interpretation.md +3 -0
- package/skills/16_Animal_Behavior/ethoclaw-analysis-report/assets/section_templates/overview.md +3 -0
- package/skills/16_Animal_Behavior/ethoclaw-analysis-report/assets/section_templates/project-summary.md +3 -0
- package/skills/16_Animal_Behavior/ethoclaw-analysis-report/assets/section_templates/radar-section.md +5 -0
- package/skills/16_Animal_Behavior/ethoclaw-analysis-report/assets/section_templates/raw-trajectory.md +3 -0
- package/skills/16_Animal_Behavior/ethoclaw-analysis-report/assets/section_templates/sample-check.md +3 -0
- package/skills/16_Animal_Behavior/ethoclaw-analysis-report/assets/section_templates/single-subject-section.md +3 -0
- package/skills/16_Animal_Behavior/ethoclaw-analysis-report/assets/section_templates/stats-section.md +5 -0
- package/skills/16_Animal_Behavior/ethoclaw-analysis-report/references/experiment-types/epm.md +52 -0
- package/skills/16_Animal_Behavior/ethoclaw-analysis-report/references/experiment-types/fst.md +37 -0
- package/skills/16_Animal_Behavior/ethoclaw-analysis-report/references/experiment-types/nor.md +39 -0
- package/skills/16_Animal_Behavior/ethoclaw-analysis-report/references/experiment-types/oft.md +43 -0
- package/skills/16_Animal_Behavior/ethoclaw-analysis-report/references/experiment-types/tcst.md +45 -0
- package/skills/16_Animal_Behavior/ethoclaw-analysis-report/references/experiment-types/tst.md +36 -0
- package/skills/16_Animal_Behavior/ethoclaw-analysis-report/references/input-types.md +59 -0
- package/skills/16_Animal_Behavior/ethoclaw-analysis-report/references/interpretation-guardrails.md +45 -0
- package/skills/16_Animal_Behavior/ethoclaw-analysis-report/references/metadata-schema.md +57 -0
- package/skills/16_Animal_Behavior/ethoclaw-analysis-report/references/report-sections.md +86 -0
- package/skills/16_Animal_Behavior/ethoclaw-analysis-report/references/section-selection-rules.md +169 -0
- package/skills/16_Animal_Behavior/ethoclaw-analysis-report/scripts/build_report_manifest.py +27 -0
- package/skills/16_Animal_Behavior/ethoclaw-analysis-report/scripts/render_report.py +34 -0
- package/skills/16_Animal_Behavior/ethoclaw-analysis-report/scripts/report_utils.py +1121 -0
- package/skills/16_Animal_Behavior/ethoclaw-animal-grounding/SKILL.md +390 -0
- package/skills/16_Animal_Behavior/ethoclaw-animal-grounding/reference_code.py +98 -0
- package/skills/16_Animal_Behavior/ethoclaw-animal-pose-estimation/SKILL.md +336 -0
- package/skills/16_Animal_Behavior/ethoclaw-kinematic-parameter-generator/README.md +21 -0
- package/skills/16_Animal_Behavior/ethoclaw-kinematic-parameter-generator/SKILL.md +41 -0
- package/skills/16_Animal_Behavior/ethoclaw-kinematic-parameter-generator/batch_kinematic_generator.py +663 -0
- package/skills/16_Animal_Behavior/ethoclaw-kinematic-parameter-generator/config.json +19 -0
- package/skills/16_Animal_Behavior/ethoclaw-kinematic-parameter-generator/generate_kinematic_parameter.py +401 -0
- package/skills/16_Animal_Behavior/ethoclaw-kinematic-parameter-generator/kinematic_generator.py +265 -0
- package/skills/16_Animal_Behavior/ethoclaw-multiparameter-clustermap-generate/SKILL.md +72 -0
- package/skills/16_Animal_Behavior/ethoclaw-multiparameter-clustermap-generate/references/config.example.toml +56 -0
- package/skills/16_Animal_Behavior/ethoclaw-multiparameter-clustermap-generate/scripts/cluster_all_params.py +232 -0
- package/skills/16_Animal_Behavior/ethoclaw-multiparameter-clustermap-generate/scripts/cluster_all_params_from_config.py +236 -0
- package/skills/16_Animal_Behavior/ethoclaw-multiparameter-radar-generate/SKILL.md +68 -0
- package/skills/16_Animal_Behavior/ethoclaw-multiparameter-radar-generate/references/notes.md +5 -0
- package/skills/16_Animal_Behavior/ethoclaw-multiparameter-radar-generate/scripts/plot_h5_radar.py +513 -0
- package/skills/16_Animal_Behavior/ethoclaw-multiparameter-violin-stats-generate/SKILL.md +52 -0
- package/skills/16_Animal_Behavior/ethoclaw-multiparameter-violin-stats-generate/config.toml +81 -0
- package/skills/16_Animal_Behavior/ethoclaw-multiparameter-violin-stats-generate/references/stats-rule.md +18 -0
- package/skills/16_Animal_Behavior/ethoclaw-multiparameter-violin-stats-generate/scripts/h5_inspect.py +79 -0
- package/skills/16_Animal_Behavior/ethoclaw-multiparameter-violin-stats-generate/scripts/h5_violin_batch.py +624 -0
- package/skills/16_Animal_Behavior/ethoclaw-multiparameter-violin-stats-generate/scripts/h5_violin_stats.py +438 -0
- package/skills/16_Animal_Behavior/ethoclaw-trajectory-velocity-heatmap-generate/SKILL.md +280 -0
- package/skills/16_Animal_Behavior/ethoclaw-trajectory-velocity-heatmap-generate/core_scripts/heatmap_trajectory.py +790 -0
- package/skills/16_Animal_Behavior/ethoclaw-trajectory-velocity-heatmap-generate/core_scripts/heatmap_velocity.py +855 -0
- package/skills/16_Animal_Behavior/ethoclaw-trajectory-velocity-heatmap-generate/reference_data/reference_2d.csv +101 -0
- package/skills/16_Animal_Behavior/ethoclaw-trajectory-velocity-heatmap-generate/reference_data/reference_2d.h5 +0 -0
- package/skills/16_Animal_Behavior/ethoclaw-trajectory-velocity-heatmap-generate/reference_data/reference_data_readme.md +126 -0
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: kmeans
|
|
3
|
+
description: "Use this model doc whenever the user wants to perform brain parcellation using K-means. This is a non-deep-learning unsupervised route focused on parcel discovery, voxel or vertex grouping, and atlas-like region generation from neuroimaging features."
|
|
4
|
+
license: MIT License (NeuroClaw custom skill - freely modifiable within the project)
|
|
5
|
+
layer: base
|
|
6
|
+
skill_type: model
|
|
7
|
+
dependencies:
|
|
8
|
+
- fmri-skill
|
|
9
|
+
- smri-skill
|
|
10
|
+
- nilearn-tool
|
|
11
|
+
- run_models
|
|
12
|
+
---
|
|
13
|
+
# K-means Model Doc
|
|
14
|
+
|
|
15
|
+
## Overview
|
|
16
|
+
K-means is a classical non-deep-learning method for data-driven brain parcellation.
|
|
17
|
+
|
|
18
|
+
- Model family: non-deep-learning unsupervised clustering method
|
|
19
|
+
- Typical objectives:
|
|
20
|
+
- partition voxels, vertices, or ROI features into data-driven brain parcels
|
|
21
|
+
- build subject-level or group-level parcellations from functional or structural similarity
|
|
22
|
+
- export parcel labels and cluster summaries
|
|
23
|
+
- Primary input: preprocessed neuroimaging features, optional mask
|
|
24
|
+
- Primary output: parcel label map, cluster summaries, optional centroid outputs
|
|
25
|
+
|
|
26
|
+
In NeuroClaw, this document is model-level guidance for K-means-based brain parcellation workflows rather than supervised prediction.
|
|
27
|
+
|
|
28
|
+
Upstream preparation should usually be delegated to:
|
|
29
|
+
- `fmri-skill` for rs-fMRI or task-fMRI feature preparation when parcellation is function-driven
|
|
30
|
+
- `smri-skill` for structural feature preparation when parcellation is anatomy-driven
|
|
31
|
+
- `nilearn-tool` for concrete masking, feature matrix preparation, and K-means-based parcel export
|
|
32
|
+
|
|
33
|
+
**Research use only.**
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
## Quick Start
|
|
38
|
+
|
|
39
|
+
### 1) Prepare parcellation inputs
|
|
40
|
+
Expected inputs:
|
|
41
|
+
- preprocessed feature matrix or image list
|
|
42
|
+
- optional brain mask
|
|
43
|
+
- optional subject list or cohort manifest
|
|
44
|
+
- target parcel number or clustering granularity
|
|
45
|
+
|
|
46
|
+
If these are not ready, delegate preprocessing to `fmri-skill` or `smri-skill` first.
|
|
47
|
+
|
|
48
|
+
### 2) K-means route
|
|
49
|
+
Representative operations:
|
|
50
|
+
- prepare voxel-wise, vertex-wise, or ROI-wise feature matrix
|
|
51
|
+
- choose target number of parcels
|
|
52
|
+
- fit K-means to assign each spatial unit to a parcel
|
|
53
|
+
- export parcel label map and centroid summaries
|
|
54
|
+
|
|
55
|
+
Example execution route:
|
|
56
|
+
```bash
|
|
57
|
+
# delegated through claw-shell after features are prepared
|
|
58
|
+
python skills/nilearn-tool/scripts/kmeans_parcellation_reference.py \
|
|
59
|
+
--input-list path/to/image_list.txt \
|
|
60
|
+
--mask path/to/group_mask.nii.gz \
|
|
61
|
+
--n-clusters 200 \
|
|
62
|
+
--output-dir run_models_output/kmeans
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
---
|
|
66
|
+
|
|
67
|
+
## Input / Output Contract
|
|
68
|
+
|
|
69
|
+
### Required inputs
|
|
70
|
+
- feature matrix or aligned neuroimaging image list
|
|
71
|
+
- requested clustering target such as parcel count
|
|
72
|
+
|
|
73
|
+
### Optional inputs
|
|
74
|
+
- mask image
|
|
75
|
+
- subject grouping or cohort definition
|
|
76
|
+
- initialization parameters
|
|
77
|
+
|
|
78
|
+
### Produced outputs
|
|
79
|
+
- parcel label image or table
|
|
80
|
+
- cluster size summary
|
|
81
|
+
- optional cluster centroids or representative signals
|
|
82
|
+
|
|
83
|
+
---
|
|
84
|
+
|
|
85
|
+
## Recommended Delegation
|
|
86
|
+
|
|
87
|
+
- imaging preprocessing and feature preparation -> `fmri-skill` and/or `smri-skill`
|
|
88
|
+
- concrete implementation of K-means -> `nilearn-tool`
|
|
89
|
+
- shell execution and logging -> `claw-shell`
|
|
90
|
+
|
|
91
|
+
No execution before explicit plan confirmation.
|
|
92
|
+
|
|
93
|
+
---
|
|
94
|
+
|
|
95
|
+
## When to Use K-means
|
|
96
|
+
|
|
97
|
+
- The user wants data-driven brain region partitioning rather than using a predefined atlas.
|
|
98
|
+
- The goal is to derive parcel labels for downstream connectivity, decoding, or visualization.
|
|
99
|
+
- A classical unsupervised clustering baseline is preferred over deep learning.
|
|
100
|
+
- The user wants fixed parcel count with simple optimization.
|
|
101
|
+
|
|
102
|
+
---
|
|
103
|
+
|
|
104
|
+
## Limitations and Notes
|
|
105
|
+
|
|
106
|
+
- Clustering quality depends strongly on preprocessing, feature definition, and spatial normalization.
|
|
107
|
+
- K-means is sensitive to initialization and requires a fixed cluster count.
|
|
108
|
+
- Data-driven parcellations may vary across cohorts and may not align directly with standard atlases.
|
|
109
|
+
|
|
110
|
+
---
|
|
111
|
+
|
|
112
|
+
## Reference
|
|
113
|
+
|
|
114
|
+
- Thirion B, Varoquaux G, Dohmatob E, Poline JB. Which fMRI clustering gives good brain parcellations?
|
|
115
|
+
- Nilearn regions and parcellations documentation: https://nilearn.github.io/stable/connectivity/region_extraction.html
|
|
116
|
+
|
|
117
|
+
Created At: 2026-04-14 00:37 HKT
|
|
118
|
+
Last Updated At: 2026-04-14 00:45 HKT
|
|
119
|
+
Author: chengwang96
|
|
@@ -0,0 +1,427 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: run_models
|
|
3
|
+
description: "Use this skill whenever the user wants to run phenotype-prediction models, browse model cards, map model inputs/outputs, or choose an execution route for fMRI/sMRI based models. This is a model-entry orchestration skill: it routes requests to model-specific docs and delegates preprocessing to modality skills."
|
|
4
|
+
license: MIT License (NeuroClaw custom skill - freely modifiable within the project)
|
|
5
|
+
layer: subagent
|
|
6
|
+
skill_type: model
|
|
7
|
+
dependencies:
|
|
8
|
+
- fmri-skill
|
|
9
|
+
- smri-skill
|
|
10
|
+
---
|
|
11
|
+
# Run Models Skill (Model Entry Layer)
|
|
12
|
+
|
|
13
|
+
## Overview
|
|
14
|
+
`run_models` is the NeuroClaw entry skill for model-level inference workflows.
|
|
15
|
+
|
|
16
|
+
This skill is responsible for:
|
|
17
|
+
- Maintaining a model registry (name, paper, source code, input/output, doc file path)
|
|
18
|
+
- Selecting the correct model skill under `skills/<model-name>/SKILL.md`
|
|
19
|
+
- Coordinating required data preparation before model execution
|
|
20
|
+
- Delegating modality preprocessing to `fmri-skill` and `smri-skill`
|
|
21
|
+
|
|
22
|
+
It supports both:
|
|
23
|
+
- deep learning model routes for phenotype prediction
|
|
24
|
+
- non-deep-learning statistical / unsupervised / classical machine-learning routes such as first-level and second-level task-fMRI GLM, resting-state ICA, resting-state DictLearning, disease classification with SVM, disease classification with SpaceNet, brain parcellation with K-means, brain parcellation with Hierarchical clustering, temporal filtering, and detrending
|
|
25
|
+
|
|
26
|
+
This skill does not hardcode detailed install/run commands for each model. Those details are stored in model-specific markdown files.
|
|
27
|
+
|
|
28
|
+
**Research use only.**
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
## Core Workflow (Never Bypassed)
|
|
33
|
+
1. Identify requested model and task (classification/regression phenotype prediction).
|
|
34
|
+
2. Locate the corresponding model skill under `skills/<model-name>/SKILL.md`.
|
|
35
|
+
3. Verify required inputs (ROI features, optional sMRI features).
|
|
36
|
+
4. If inputs are not ready, delegate preprocessing to modality skills:
|
|
37
|
+
- `fmri-skill` for ROI extraction from fMRI
|
|
38
|
+
- `smri-skill` when model additionally requires structural features
|
|
39
|
+
5. Generate a numbered execution plan and wait for explicit user confirmation (`YES` / `execute` / `proceed`).
|
|
40
|
+
6. On confirmation, execute via `claw-shell` following model doc instructions.
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
## Model Registry (Current)
|
|
45
|
+
|
|
46
|
+
| Model | Paper | Code | Input | Output | Model Doc |
|
|
47
|
+
|---|---|---|---|---|---|
|
|
48
|
+
| BrainGNN | Li et al., 2020, *Braingnn: Interpretable brain graph neural network for fmri analysis* | https://github.com/xxlya/BrainGNN_Pytorch/tree/main | fMRI ROI features (graph/node-level ROI representation) | Phenotype prediction (classification/regression) + interpretable graph indicators | `skills/brain_gnn/SKILL.md` |
|
|
49
|
+
| FM-APP | He et al., 2024, *FM-APP: Foundation model for any phenotype prediction via fMRI to sMRI knowledge transfer* | https://github.com/ZhibinHe/FM-APP | fMRI ROI features + sMRI features | Phenotype prediction (any-phenotype setting) | `skills/fm_app/SKILL.md` |
|
|
50
|
+
| NeuroStorm | NeuroClaw model entry for storm-related phenotype prediction workflows | see `skills/neurostorm/SKILL.md` | Multi-modal neuroimaging features as specified in the model doc | Phenotype prediction / downstream inference as specified in the model doc | `skills/neurostorm/SKILL.md` |
|
|
51
|
+
| GLM | Classical first-level and second-level task-fMRI general linear model | Nilearn / SPM-style implementation route | Preprocessed task fMRI, events, optional confounds, and optional subject-level contrast maps for group inference | Task activation contrasts, group z maps, and statistical inference outputs | `skills/glm/SKILL.md` |
|
|
52
|
+
| ICA | Classical resting-state network decomposition method | Nilearn decomposition implementation route | Preprocessed resting-state fMRI, optional mask, optional confounds | Intrinsic connectivity component maps, subject time series, optional connectomes | `skills/ica/SKILL.md` |
|
|
53
|
+
| DictLearning | Classical sparse resting-state network decomposition method | Nilearn decomposition implementation route | Preprocessed resting-state fMRI, optional mask, optional confounds | Sparse component maps, subject time series, optional connectomes | `skills/dictlearning/SKILL.md` |
|
|
54
|
+
| SVM | Classical disease classification method for neuroimaging | Nilearn / scikit-learn style decoding route | Preprocessed ROI features, labels, optional covariates | Predicted labels, decision scores, CV metrics | `skills/svm/SKILL.md` |
|
|
55
|
+
| SpaceNet | Classical voxel-wise disease classification method for neuroimaging | Nilearn decoding implementation route | Aligned voxel maps, labels, optional covariates, optional mask | Predicted labels, decision scores, CV metrics, coefficient maps | `skills/spacenet/SKILL.md` |
|
|
56
|
+
| K-means | Classical brain parcellation method for neuroimaging | Nilearn / clustering-based parcellation route | Preprocessed feature maps or image lists, optional mask, requested parcel count | Parcel labels, cluster summaries, optional centroid outputs | `skills/kmeans/SKILL.md` |
|
|
57
|
+
| Hierarchical | Classical hierarchical brain parcellation method for neuroimaging | Nilearn / clustering-based parcellation route | Preprocessed feature maps or image lists, optional mask, requested parcel count | Parcel labels, cluster summaries, optional dendrogram outputs | `skills/hierarchical/SKILL.md` |
|
|
58
|
+
| Filtering | Classical signal denoising method for neuroimaging time series | Nilearn / preprocessing route | Preprocessed BOLD image or time series, TR, optional confounds, optional mask | Denoised BOLD, cleaned time series, optional QC summaries | `skills/filtering/SKILL.md` |
|
|
59
|
+
| Detrending | Classical signal denoising method for neuroimaging time series | Nilearn / preprocessing route | Preprocessed BOLD image or time series, TR, optional confounds, optional mask | Cleaned BOLD, cleaned time series, optional QC summaries | `skills/detrending/SKILL.md` |
|
|
60
|
+
|
|
61
|
+
### Citation Notes
|
|
62
|
+
- BrainGNN:
|
|
63
|
+
- Li X, Zhou Y, Dvornek N, Zhang M, Gao S, Zhuang J, Scheinost D, Staib L, Ventola P, Duncan J. 2020.
|
|
64
|
+
- FM-APP:
|
|
65
|
+
- He Z, Li W, Liu Y, et al. FM-APP. IEEE TMI, 2024, 44(10): 4010-4022.
|
|
66
|
+
- NeuroStorm:
|
|
67
|
+
- See `skills/neurostorm/SKILL.md` for the current model card, citation, and execution details.
|
|
68
|
+
- GLM:
|
|
69
|
+
- Classical first-level and second-level general linear model for task-evoked activation analysis and group-level inference; see `skills/glm/SKILL.md`.
|
|
70
|
+
- ICA:
|
|
71
|
+
- Classical resting-state network decomposition route based on independent component analysis; see `skills/ica/SKILL.md`.
|
|
72
|
+
- DictLearning:
|
|
73
|
+
- Classical sparse resting-state network decomposition route; see `skills/dictlearning/SKILL.md`.
|
|
74
|
+
- SVM:
|
|
75
|
+
- Classical disease classification route for ROI-level or tabular decoding; see `skills/svm/SKILL.md`.
|
|
76
|
+
- SpaceNet:
|
|
77
|
+
- Classical voxel-wise disease classification route with sparse coefficient maps; see `skills/spacenet/SKILL.md`.
|
|
78
|
+
- K-means:
|
|
79
|
+
- Classical brain parcellation route for fixed-K parcel discovery; see `skills/kmeans/SKILL.md`.
|
|
80
|
+
- Hierarchical:
|
|
81
|
+
- Classical brain parcellation route for multi-scale parcel discovery; see `skills/hierarchical/SKILL.md`.
|
|
82
|
+
- Filtering:
|
|
83
|
+
- Classical signal denoising route for temporal filtering; see `skills/filtering/SKILL.md`.
|
|
84
|
+
- Detrending:
|
|
85
|
+
- Classical signal denoising route for temporal drift removal; see `skills/detrending/SKILL.md`.
|
|
86
|
+
|
|
87
|
+
## Harness-Aware Model Registration (Declarative + Testing + Drift Detection)
|
|
88
|
+
|
|
89
|
+
### Model Specification Format (Extended)
|
|
90
|
+
Every model integrated into run_models **must** include a **model specification file** in JSON format alongside its Markdown documentation:
|
|
91
|
+
|
|
92
|
+
**File**: `skills/{model_name}/{model_name}_spec.json`
|
|
93
|
+
|
|
94
|
+
```json
|
|
95
|
+
{
|
|
96
|
+
"model_name": "brain_gnn",
|
|
97
|
+
"version": "1.0.0",
|
|
98
|
+
"paper": "Li et al., 2020",
|
|
99
|
+
"code_repo": "https://github.com/xxlya/BrainGNN_Pytorch",
|
|
100
|
+
"required_dependencies": {
|
|
101
|
+
"torch": ">=1.9.0,<2.1.0",
|
|
102
|
+
"numpy": ">=1.21.0",
|
|
103
|
+
"scipy": ">=1.7.0",
|
|
104
|
+
"networkx": ">=2.6.0"
|
|
105
|
+
},
|
|
106
|
+
"input_spec": {
|
|
107
|
+
"modality": "fMRI",
|
|
108
|
+
"format": "ROI time-series (N_nodes, T_timepoints)",
|
|
109
|
+
"expected_shape": [116, null],
|
|
110
|
+
"value_range": [-5.0, 5.0],
|
|
111
|
+
"required_preprocessing": ["z-score normalization"]
|
|
112
|
+
},
|
|
113
|
+
"output_spec": {
|
|
114
|
+
"type": "classification|regression",
|
|
115
|
+
"classes": null,
|
|
116
|
+
"value_range": null
|
|
117
|
+
},
|
|
118
|
+
"validation_checksums": {
|
|
119
|
+
"weights_sha256": "abc123...",
|
|
120
|
+
"test_data_sha256": "def456..."
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
### Test Suite Requirements
|
|
126
|
+
Every model **must** include an automated test suite covering:
|
|
127
|
+
|
|
128
|
+
1. **Input validation**: verify input dimensions, data types, value ranges
|
|
129
|
+
2. **Determinism check**: seed control + verify identical outputs with same seed (tolerance: 1e-6)
|
|
130
|
+
3. **Performance regression**: compare inference speed and memory usage against baseline
|
|
131
|
+
4. **Output coherence**: verify outputs lie within expected value range, no NaN/Inf values
|
|
132
|
+
5. **Backward compatibility**: test model against previous version checksum (if available)
|
|
133
|
+
|
|
134
|
+
**Test execution**:
|
|
135
|
+
```bash
|
|
136
|
+
python -m pytest run_models/tests/test_{model_name}.py -v --harness-report
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
Output: `run_models_test_report_{model_name}_{timestamp}.json` with pass/fail status and metrics
|
|
140
|
+
|
|
141
|
+
### Drift Detection Protocol
|
|
142
|
+
Monitor production/inference results for concept drift (distribution shift in data or model behavior):
|
|
143
|
+
|
|
144
|
+
**Automated monitoring per 100 inferences**:
|
|
145
|
+
- **Input distribution shift** (KL divergence against reference data): flag if deviation > 0.1
|
|
146
|
+
- **Output distribution shift** (prediction probability / regression output quantiles): flag if shift detected
|
|
147
|
+
- **Latency drift** (average inference time): alert if >20% increase
|
|
148
|
+
- **Failure rate monitoring** (predictions with NaN/Inf / out-of-range): flag if >1% failures
|
|
149
|
+
|
|
150
|
+
**Logging output**: `run_models_drift_log.json` (append-only, timestamped entries)
|
|
151
|
+
|
|
152
|
+
Example entry:
|
|
153
|
+
```json
|
|
154
|
+
{
|
|
155
|
+
"timestamp": "2026-04-05T14:32:00Z",
|
|
156
|
+
"model": "brain_gnn",
|
|
157
|
+
"inference_count": 100,
|
|
158
|
+
"input_kl_divergence": 0.045,
|
|
159
|
+
"output_mean_shift": 0.002,
|
|
160
|
+
"latency_ms": 45.2,
|
|
161
|
+
"failure_rate": 0.0,
|
|
162
|
+
"status": "healthy"
|
|
163
|
+
}
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
**Alert thresholds**:
|
|
167
|
+
- KL divergence > 0.1 → generate warning
|
|
168
|
+
- Output shift > 5% std dev → investigation recommended
|
|
169
|
+
- Latency drift > 20% → check computational resource bottleneck
|
|
170
|
+
- Failure rate > 1% → stop inference, require manual review
|
|
171
|
+
|
|
172
|
+
### Model Card Template (Minimum Required Metadata)
|
|
173
|
+
Each model must include a model card in `skills/{model_name}/SKILL.md` documenting:
|
|
174
|
+
|
|
175
|
+
```markdown
|
|
176
|
+
## Model Card: {model_name}
|
|
177
|
+
|
|
178
|
+
### Model Details
|
|
179
|
+
- **Model name**: {name}
|
|
180
|
+
- **Version**: {X.Y.Z}
|
|
181
|
+
- **Date**: {YYYY-MM-DD}
|
|
182
|
+
- **Source repository**: {repo_url}
|
|
183
|
+
- **Paper**: {citation}
|
|
184
|
+
|
|
185
|
+
### Intended Use
|
|
186
|
+
- **Primary use case**: [e.g., fMRI-based phenotype classification]
|
|
187
|
+
- **Input modalities**: [fMRI, sMRI, etc.]
|
|
188
|
+
- **Supported tasks**: [classification, regression, interpretability]
|
|
189
|
+
|
|
190
|
+
### Known Limitations
|
|
191
|
+
- [e.g., "Trained on N subjects aged 18-65; generalization to pediatric/geriatric populations not validated"]
|
|
192
|
+
- [e.g., "Sensitive to head motion artifacts; recommend ICA-FIX preprocessing"]
|
|
193
|
+
|
|
194
|
+
### Validation Results
|
|
195
|
+
- **Test set performance**: [accuracy/AUC/RMSE with confidence intervals]
|
|
196
|
+
- **Cross-site validation**: [performance on held-out sites, if applicable]
|
|
197
|
+
- **Robustness checks**: [drift detection history, adversarial perturbation results]
|
|
198
|
+
|
|
199
|
+
### Dependencies & Versioning
|
|
200
|
+
- **Required libraries**: [see {model_name}_spec.json]
|
|
201
|
+
- **Hash (model weights)**: {SHA256}
|
|
202
|
+
- **Last verified**: {date}
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
---
|
|
206
|
+
|
|
207
|
+
## Delegation Rules
|
|
208
|
+
|
|
209
|
+
### BrainGNN Route
|
|
210
|
+
- Required modality preprocessing: `fmri-skill`
|
|
211
|
+
- Typical upstream outputs expected: ROI matrices/time-series converted to model-required feature tensors
|
|
212
|
+
|
|
213
|
+
### FM-APP Route
|
|
214
|
+
- Required modality preprocessing: `fmri-skill` + `smri-skill`
|
|
215
|
+
- Typical upstream outputs expected: fMRI ROI features plus structural MRI-derived features
|
|
216
|
+
|
|
217
|
+
### NeuroStorm Route
|
|
218
|
+
- Required modality preprocessing: follow the model doc in `skills/neurostorm/SKILL.md`
|
|
219
|
+
- Typical upstream outputs expected: inputs and features specified by the NeuroStorm model card
|
|
220
|
+
|
|
221
|
+
### GLM Route
|
|
222
|
+
- Required modality preprocessing: `fmri-skill`
|
|
223
|
+
- Concrete model/tool execution: `nilearn-tool`
|
|
224
|
+
- Typical upstream outputs expected:
|
|
225
|
+
- first-level GLM: preprocessed task fMRI, events, optional confounds, named contrasts
|
|
226
|
+
- second-level GLM: subject-level contrast maps, group design matrix, group contrast definition
|
|
227
|
+
|
|
228
|
+
### ICA Route
|
|
229
|
+
- Required modality preprocessing: `fmri-skill`
|
|
230
|
+
- Concrete model/tool execution: `nilearn-tool`
|
|
231
|
+
- Typical upstream outputs expected:
|
|
232
|
+
- preprocessed resting-state fMRI image list
|
|
233
|
+
- optional mask and confounds
|
|
234
|
+
- requested component count
|
|
235
|
+
|
|
236
|
+
### DictLearning Route
|
|
237
|
+
- Required modality preprocessing: `fmri-skill`
|
|
238
|
+
- Concrete model/tool execution: `nilearn-tool`
|
|
239
|
+
- Typical upstream outputs expected:
|
|
240
|
+
- preprocessed resting-state fMRI image list
|
|
241
|
+
- optional mask and confounds
|
|
242
|
+
- requested component count
|
|
243
|
+
|
|
244
|
+
### SVM Route
|
|
245
|
+
- Required modality preprocessing: `fmri-skill` and/or `smri-skill`
|
|
246
|
+
- Concrete model/tool execution: `nilearn-tool`
|
|
247
|
+
- Typical upstream outputs expected:
|
|
248
|
+
- ROI/tabular feature matrix, diagnosis labels, optional covariates
|
|
249
|
+
|
|
250
|
+
### SpaceNet Route
|
|
251
|
+
- Required modality preprocessing: `fmri-skill` and/or `smri-skill`
|
|
252
|
+
- Concrete model/tool execution: `nilearn-tool`
|
|
253
|
+
- Typical upstream outputs expected:
|
|
254
|
+
- aligned subject image list, diagnosis labels, mask image, optional covariates
|
|
255
|
+
|
|
256
|
+
### K-means Route
|
|
257
|
+
- Required modality preprocessing: `fmri-skill` and/or `smri-skill`
|
|
258
|
+
- Concrete model/tool execution: `nilearn-tool`
|
|
259
|
+
- Typical upstream outputs expected:
|
|
260
|
+
- feature matrix or aligned image list for parcel discovery
|
|
261
|
+
- optional mask
|
|
262
|
+
- target parcel count
|
|
263
|
+
|
|
264
|
+
### Hierarchical Route
|
|
265
|
+
- Required modality preprocessing: `fmri-skill` and/or `smri-skill`
|
|
266
|
+
- Concrete model/tool execution: `nilearn-tool`
|
|
267
|
+
- Typical upstream outputs expected:
|
|
268
|
+
- feature matrix or aligned image list for parcel discovery
|
|
269
|
+
- optional mask or similarity structure
|
|
270
|
+
- target parcel count
|
|
271
|
+
|
|
272
|
+
### Filtering Route
|
|
273
|
+
- Required modality preprocessing: `fmri-skill`
|
|
274
|
+
- Concrete model/tool execution: `nilearn-tool`
|
|
275
|
+
- Typical upstream outputs expected:
|
|
276
|
+
- preprocessed BOLD image or extracted time series
|
|
277
|
+
- TR, optional confounds, optional mask
|
|
278
|
+
- optional frequency settings
|
|
279
|
+
|
|
280
|
+
### Detrending Route
|
|
281
|
+
- Required modality preprocessing: `fmri-skill`
|
|
282
|
+
- Concrete model/tool execution: `nilearn-tool`
|
|
283
|
+
- Typical upstream outputs expected:
|
|
284
|
+
- preprocessed BOLD image or extracted time series
|
|
285
|
+
- TR, optional confounds, optional mask
|
|
286
|
+
- detrending request and optional standardization settings
|
|
287
|
+
|
|
288
|
+
### Shared Execution Routing
|
|
289
|
+
- Environment/dependency planning: `dependency-planner` + `conda-env-manager`
|
|
290
|
+
- Actual model run command execution: `claw-shell`
|
|
291
|
+
|
|
292
|
+
---
|
|
293
|
+
|
|
294
|
+
## Input and Output Contract (Entry-Level)
|
|
295
|
+
|
|
296
|
+
### Inputs expected by this skill
|
|
297
|
+
- Model selection (`brain_gnn`, `fm_app`, `neurostorm`, `glm`, `ica`, `dictlearning`, `svm`, `spacenet`, `kmeans`, `hierarchical`, `filtering`, or `detrending`)
|
|
298
|
+
- Data split / subject list
|
|
299
|
+
- Phenotype target definition
|
|
300
|
+
- Optional compute constraints (GPU/CPU, memory, batch size)
|
|
301
|
+
|
|
302
|
+
For GLM routes, the required task definition should be expressed as:
|
|
303
|
+
- task name
|
|
304
|
+
- events file
|
|
305
|
+
- contrast(s) of interest
|
|
306
|
+
- optional group-level analysis scope
|
|
307
|
+
- whether the request is first-level GLM or second-level GLM
|
|
308
|
+
- if second-level GLM: contrast map list and group design matrix
|
|
309
|
+
|
|
310
|
+
For ICA routes, the required decomposition definition should be expressed as:
|
|
311
|
+
- resting-state image list or subject list
|
|
312
|
+
- number of components
|
|
313
|
+
- optional mask and confounds
|
|
314
|
+
|
|
315
|
+
For DictLearning routes, the required decomposition definition should be expressed as:
|
|
316
|
+
- resting-state image list or subject list
|
|
317
|
+
- number of components
|
|
318
|
+
- optional mask and confounds
|
|
319
|
+
|
|
320
|
+
For SVM routes, the required classification definition should be expressed as:
|
|
321
|
+
- diagnosis target / label column
|
|
322
|
+
- feature type (`roi/tabular`)
|
|
323
|
+
- subject list or split definition
|
|
324
|
+
- optional covariates
|
|
325
|
+
|
|
326
|
+
For SpaceNet routes, the required classification definition should be expressed as:
|
|
327
|
+
- diagnosis target / label column
|
|
328
|
+
- feature type (`voxel-wise`)
|
|
329
|
+
- subject list or split definition
|
|
330
|
+
- optional covariates and mask
|
|
331
|
+
|
|
332
|
+
For K-means routes, the required parcellation definition should be expressed as:
|
|
333
|
+
- image list or feature matrix
|
|
334
|
+
- target parcel / cluster count
|
|
335
|
+
- optional mask
|
|
336
|
+
|
|
337
|
+
For Hierarchical routes, the required parcellation definition should be expressed as:
|
|
338
|
+
- image list or feature matrix
|
|
339
|
+
- target parcel / cluster count
|
|
340
|
+
- optional mask, similarity structure, or adjacency constraint
|
|
341
|
+
|
|
342
|
+
For Filtering routes, the required denoising definition should be expressed as:
|
|
343
|
+
- input BOLD image or time series
|
|
344
|
+
- TR
|
|
345
|
+
- optional confounds, mask, and frequency settings
|
|
346
|
+
|
|
347
|
+
For Detrending routes, the required denoising definition should be expressed as:
|
|
348
|
+
- input BOLD image or time series
|
|
349
|
+
- TR
|
|
350
|
+
- optional confounds, mask, and standardization settings
|
|
351
|
+
|
|
352
|
+
### Outputs produced by this skill
|
|
353
|
+
- A confirmed, numbered run plan
|
|
354
|
+
- Pointers to the model-specific instruction file
|
|
355
|
+
- Delegated preprocessing plan for required modalities
|
|
356
|
+
- Structured output location recommendations
|
|
357
|
+
|
|
358
|
+
---
|
|
359
|
+
|
|
360
|
+
## Recommended Output Layout
|
|
361
|
+
All model-running artifacts should be managed under `./run_models_output/`:
|
|
362
|
+
- `run_models_output/preprocessed/`
|
|
363
|
+
- `fmri/` (from `fmri-skill`)
|
|
364
|
+
- `smri/` (from `smri-skill`, if required)
|
|
365
|
+
- `run_models_output/brain_gnn/`
|
|
366
|
+
- `run_models_output/fm_app/`
|
|
367
|
+
- `run_models_output/neurostorm/`
|
|
368
|
+
- `run_models_output/glm/`
|
|
369
|
+
- `run_models_output/ica/`
|
|
370
|
+
- `run_models_output/dictlearning/`
|
|
371
|
+
- `run_models_output/svm/`
|
|
372
|
+
- `run_models_output/spacenet/`
|
|
373
|
+
- `run_models_output/kmeans/`
|
|
374
|
+
- `run_models_output/hierarchical/`
|
|
375
|
+
- `run_models_output/filtering/`
|
|
376
|
+
- `run_models_output/detrending/`
|
|
377
|
+
- `run_models_output/logs/`
|
|
378
|
+
- `run_models_output/reports/`
|
|
379
|
+
|
|
380
|
+
---
|
|
381
|
+
|
|
382
|
+
## Safety and Execution Policy
|
|
383
|
+
- No execution before explicit user confirmation of the numbered plan.
|
|
384
|
+
- All run/install actions must go through `claw-shell`.
|
|
385
|
+
- If model skills are missing in `skills/<model-name>/`, stop and request or create them before execution.
|
|
386
|
+
- Keep train/val/test split and target definition explicit to avoid leakage.
|
|
387
|
+
|
|
388
|
+
---
|
|
389
|
+
|
|
390
|
+
## When to Call This Skill
|
|
391
|
+
- User asks to run BrainGNN or FM-APP.
|
|
392
|
+
- User asks to run NeuroStorm.
|
|
393
|
+
- User asks to run classical task activation analysis with GLM.
|
|
394
|
+
- User asks to run group-level inference with second-level GLM.
|
|
395
|
+
- User asks to perform resting-state network decomposition with ICA.
|
|
396
|
+
- User asks to perform resting-state network decomposition with DictLearning.
|
|
397
|
+
- User asks to perform disease classification with SVM.
|
|
398
|
+
- User asks to perform disease classification with SpaceNet.
|
|
399
|
+
- User asks to perform brain parcellation with K-means.
|
|
400
|
+
- User asks to perform brain parcellation with Hierarchical clustering.
|
|
401
|
+
- User asks to perform signal denoising with filtering.
|
|
402
|
+
- User asks to perform signal denoising with detrending.
|
|
403
|
+
- User asks which phenotype model to use for fMRI/sMRI ROI data.
|
|
404
|
+
- User asks for a unified entry point to model introduction + run routing.
|
|
405
|
+
|
|
406
|
+
---
|
|
407
|
+
|
|
408
|
+
## Complementary / Related Skills
|
|
409
|
+
- `fmri-skill`
|
|
410
|
+
- `smri-skill`
|
|
411
|
+
- `dependency-planner`
|
|
412
|
+
- `conda-env-manager`
|
|
413
|
+
- `claw-shell`
|
|
414
|
+
|
|
415
|
+
---
|
|
416
|
+
|
|
417
|
+
## Reference
|
|
418
|
+
- BrainGNN paper and code:
|
|
419
|
+
- https://github.com/xxlya/BrainGNN_Pytorch/tree/main
|
|
420
|
+
- FM-APP paper and code:
|
|
421
|
+
- https://github.com/ZhibinHe/FM-APP
|
|
422
|
+
- Nilearn GLM documentation:
|
|
423
|
+
- https://nilearn.github.io/stable/glm/index.html
|
|
424
|
+
|
|
425
|
+
Created At: 2026-03-28 20:38 HKT
|
|
426
|
+
Last Updated At: 2026-04-14 00:28 HKT
|
|
427
|
+
Author: chengwang96
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: spacenet
|
|
3
|
+
description: "Use this model doc whenever the user wants to perform disease classification with SpaceNet. This is a non-deep-learning supervised route focused on voxel-wise neuroimaging-based case-control prediction with sparse and interpretable weight maps."
|
|
4
|
+
license: MIT License (NeuroClaw custom skill - freely modifiable within the project)
|
|
5
|
+
layer: base
|
|
6
|
+
skill_type: model
|
|
7
|
+
dependencies:
|
|
8
|
+
- fmri-skill
|
|
9
|
+
- smri-skill
|
|
10
|
+
- nilearn-tool
|
|
11
|
+
- run_models
|
|
12
|
+
---
|
|
13
|
+
# SpaceNet Model Doc
|
|
14
|
+
|
|
15
|
+
## Overview
|
|
16
|
+
SpaceNet is a classical non-deep-learning method for neuroimaging-based disease classification.
|
|
17
|
+
|
|
18
|
+
- Model family: non-deep-learning supervised classification method
|
|
19
|
+
- Typical objectives:
|
|
20
|
+
- classify patient vs control groups from voxel-wise neuroimaging maps
|
|
21
|
+
- build sparse discriminative models in aligned image space
|
|
22
|
+
- export predictive scores, evaluation metrics, and interpretable weight maps
|
|
23
|
+
- Primary input: aligned subject images, labels, optional covariates, optional mask
|
|
24
|
+
- Primary output: class predictions, decision scores, cross-validation metrics, coefficient maps
|
|
25
|
+
|
|
26
|
+
In NeuroClaw, this document is model-level guidance for SpaceNet-based disease classification workflows rather than deep learning phenotype prediction.
|
|
27
|
+
|
|
28
|
+
Upstream preparation should usually be delegated to:
|
|
29
|
+
- `fmri-skill` for fMRI preprocessing and voxel-wise feature preparation
|
|
30
|
+
- `smri-skill` for structural feature extraction when disease classification uses sMRI
|
|
31
|
+
- `nilearn-tool` for concrete SpaceNet fitting and coefficient map export
|
|
32
|
+
|
|
33
|
+
**Research use only.**
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
## Quick Start
|
|
38
|
+
|
|
39
|
+
### 1) Prepare disease classification inputs
|
|
40
|
+
Expected inputs:
|
|
41
|
+
- subject-level labels such as patient / control
|
|
42
|
+
- aligned subject-level voxel maps
|
|
43
|
+
- optional covariates such as age, sex, site
|
|
44
|
+
- optional train / validation / test split definition
|
|
45
|
+
|
|
46
|
+
If features are not ready, delegate preprocessing to `fmri-skill` or `smri-skill` first.
|
|
47
|
+
|
|
48
|
+
### 2) SpaceNet route
|
|
49
|
+
Representative operations:
|
|
50
|
+
- prepare subject-level voxel maps in aligned space
|
|
51
|
+
- fit SpaceNet for sparse discriminative disease classification
|
|
52
|
+
- export predictions and coefficient maps
|
|
53
|
+
- visualize discriminative regions for interpretation
|
|
54
|
+
|
|
55
|
+
Example execution route:
|
|
56
|
+
```bash
|
|
57
|
+
# delegated through claw-shell after voxel maps are prepared
|
|
58
|
+
python skills/nilearn-tool/scripts/spacenet_classifier_reference.py \
|
|
59
|
+
--input-list path/to/image_list.txt \
|
|
60
|
+
--labels path/to/labels.csv \
|
|
61
|
+
--target diagnosis \
|
|
62
|
+
--mask path/to/group_mask.nii.gz \
|
|
63
|
+
--output-dir run_models_output/spacenet
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
---
|
|
67
|
+
|
|
68
|
+
## Input / Output Contract
|
|
69
|
+
|
|
70
|
+
### Required inputs
|
|
71
|
+
- subject-level labels for disease classification
|
|
72
|
+
- aligned neuroimaging image list
|
|
73
|
+
|
|
74
|
+
### Optional inputs
|
|
75
|
+
- confounds or covariates table
|
|
76
|
+
- train / validation / test split file
|
|
77
|
+
- mask image for voxel-wise models
|
|
78
|
+
- hyperparameter settings such as C, l1 ratio, or number of CV folds
|
|
79
|
+
|
|
80
|
+
### Produced outputs
|
|
81
|
+
- predicted labels and decision scores
|
|
82
|
+
- cross-validation metrics such as accuracy, AUC, sensitivity, specificity
|
|
83
|
+
- fitted model artifact or coefficient table
|
|
84
|
+
- coefficient map for interpretation
|
|
85
|
+
|
|
86
|
+
---
|
|
87
|
+
|
|
88
|
+
## Recommended Delegation
|
|
89
|
+
|
|
90
|
+
- imaging preprocessing and feature preparation -> `fmri-skill` and/or `smri-skill`
|
|
91
|
+
- concrete implementation of SpaceNet -> `nilearn-tool`
|
|
92
|
+
- shell execution and logging -> `claw-shell`
|
|
93
|
+
|
|
94
|
+
No execution before explicit plan confirmation.
|
|
95
|
+
|
|
96
|
+
---
|
|
97
|
+
|
|
98
|
+
## When to Use SpaceNet
|
|
99
|
+
|
|
100
|
+
- The user wants classical disease classification instead of a deep learning model.
|
|
101
|
+
- The dataset size is moderate and model interpretability matters.
|
|
102
|
+
- The user wants voxel-wise discriminative maps and sparse spatial regularization.
|
|
103
|
+
- The task is case-control prediction, diagnosis support, or cross-validated disease discrimination.
|
|
104
|
+
|
|
105
|
+
---
|
|
106
|
+
|
|
107
|
+
## Limitations and Notes
|
|
108
|
+
|
|
109
|
+
- SpaceNet requires well-aligned images in a common space and can be computationally heavier than ROI-based methods.
|
|
110
|
+
- Site effects and confounds can dominate disease classification if not controlled properly.
|
|
111
|
+
- Small sample sizes can lead to optimistic estimates unless split strategy is rigorously managed.
|
|
112
|
+
|
|
113
|
+
---
|
|
114
|
+
|
|
115
|
+
## Reference
|
|
116
|
+
|
|
117
|
+
- Varoquaux G, Gramfort A, Poline JB, Thirion B. Brain covariance selection: better individual functional connectivity models using population prior.
|
|
118
|
+
- Nilearn decoding documentation: https://nilearn.github.io/stable/decoding/index.html
|
|
119
|
+
|
|
120
|
+
Created At: 2026-04-14 00:34 HKT
|
|
121
|
+
Last Updated At: 2026-04-14 00:45 HKT
|
|
122
|
+
Author: chengwang96
|