@brainpilot/skills 0.0.11 → 0.0.12

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.
Files changed (392) hide show
  1. package/package.json +1 -1
  2. package/skills/01_Meta-Skills/workflow-skill-creator/SKILL.md +288 -0
  3. package/skills/01_Meta-Skills/workflow-skill-creator/references/cli_script_template.py +217 -0
  4. package/skills/06_fMRI_Neuroimaging/netneurotools-guide/SKILL.md +212 -0
  5. package/skills/06_fMRI_Neuroimaging/netneurotools-guide/references/datasets.md +252 -0
  6. package/skills/06_fMRI_Neuroimaging/netneurotools-guide/references/interface-plotting.md +238 -0
  7. package/skills/06_fMRI_Neuroimaging/netneurotools-guide/references/metrics.md +236 -0
  8. package/skills/06_fMRI_Neuroimaging/netneurotools-guide/references/networks.md +273 -0
  9. package/skills/06_fMRI_Neuroimaging/netneurotools-guide/references/spatial-modularity.md +291 -0
  10. package/skills/06_fMRI_Neuroimaging/netneurotools-guide/references/stats.md +290 -0
  11. package/skills/09_Cellular_Molecular_Neuroscience/alphafold-database-fetch-and-analyze/SKILL.md +116 -0
  12. package/skills/09_Cellular_Molecular_Neuroscience/alphafold-database-fetch-and-analyze/references/citation.bib +58 -0
  13. package/skills/09_Cellular_Molecular_Neuroscience/alphafold-database-fetch-and-analyze/scripts/analyze_pae.py +212 -0
  14. package/skills/09_Cellular_Molecular_Neuroscience/alphafold-database-fetch-and-analyze/scripts/analyze_plddt.py +125 -0
  15. package/skills/09_Cellular_Molecular_Neuroscience/alphafold-database-fetch-and-analyze/scripts/fetch_structure.py +168 -0
  16. package/skills/09_Cellular_Molecular_Neuroscience/gtex-database/SKILL.md +176 -0
  17. package/skills/09_Cellular_Molecular_Neuroscience/gtex-database/references/citation.bib +14 -0
  18. package/skills/09_Cellular_Molecular_Neuroscience/gtex-database/scripts/gtex_cli.py +281 -0
  19. package/skills/09_Cellular_Molecular_Neuroscience/human-protein-atlas-database/SKILL.md +181 -0
  20. package/skills/09_Cellular_Molecular_Neuroscience/human-protein-atlas-database/references/citation.bib +14 -0
  21. package/skills/09_Cellular_Molecular_Neuroscience/human-protein-atlas-database/references/search-api.md +137 -0
  22. package/skills/09_Cellular_Molecular_Neuroscience/human-protein-atlas-database/scripts/hpa_cli.py +263 -0
  23. package/skills/09_Cellular_Molecular_Neuroscience/pdb-database/SKILL.md +169 -0
  24. package/skills/09_Cellular_Molecular_Neuroscience/pdb-database/references/citation.bib +15 -0
  25. package/skills/09_Cellular_Molecular_Neuroscience/pdb-database/scripts/download_coordinate_files.py +113 -0
  26. package/skills/09_Cellular_Molecular_Neuroscience/pdb-database/scripts/fetch_pdb_metadata.py +70 -0
  27. package/skills/09_Cellular_Molecular_Neuroscience/pdb-database/scripts/fetch_schema.py +251 -0
  28. package/skills/09_Cellular_Molecular_Neuroscience/pdb-database/scripts/search_pdb.py +187 -0
  29. package/skills/09_Cellular_Molecular_Neuroscience/pymol/SKILL.md +146 -0
  30. package/skills/09_Cellular_Molecular_Neuroscience/pymol/references/PYMOL_REFERENCE.md +160 -0
  31. package/skills/09_Cellular_Molecular_Neuroscience/pymol/references/RECIPES.md +348 -0
  32. package/skills/09_Cellular_Molecular_Neuroscience/pymol/references/citation.bib +6 -0
  33. package/skills/17_Literature_Databases/literature-search-arxiv/SKILL.md +120 -0
  34. package/skills/17_Literature_Databases/literature-search-arxiv/references/citation.bib +18 -0
  35. package/skills/17_Literature_Databases/literature-search-arxiv/references/query_syntax.md +34 -0
  36. package/skills/17_Literature_Databases/literature-search-arxiv/scripts/download_paper.py +116 -0
  37. package/skills/17_Literature_Databases/literature-search-arxiv/scripts/download_paper_source.py +98 -0
  38. package/skills/17_Literature_Databases/literature-search-arxiv/scripts/search_arxiv.py +174 -0
  39. package/skills/17_Literature_Databases/literature-search-biorxiv/SKILL.md +169 -0
  40. package/skills/17_Literature_Databases/literature-search-biorxiv/references/citation.bib +12 -0
  41. package/skills/17_Literature_Databases/literature-search-biorxiv/scripts/search_by_dates.py +297 -0
  42. package/skills/17_Literature_Databases/literature-search-biorxiv/scripts/search_by_doi.py +72 -0
  43. package/skills/17_Literature_Databases/literature-search-europepmc/SKILL.md +229 -0
  44. package/skills/17_Literature_Databases/literature-search-europepmc/references/citation.bib +15 -0
  45. package/skills/17_Literature_Databases/literature-search-europepmc/scripts/europepmc_api.py +345 -0
  46. package/skills/17_Literature_Databases/literature-search-openalex/SKILL.md +169 -0
  47. package/skills/17_Literature_Databases/literature-search-openalex/references/authors.md +78 -0
  48. package/skills/17_Literature_Databases/literature-search-openalex/references/citation.bib +8 -0
  49. package/skills/17_Literature_Databases/literature-search-openalex/references/geo_and_language.md +37 -0
  50. package/skills/17_Literature_Databases/literature-search-openalex/references/institutions.md +64 -0
  51. package/skills/17_Literature_Databases/literature-search-openalex/references/publishers_funders.md +42 -0
  52. package/skills/17_Literature_Databases/literature-search-openalex/references/sources.md +79 -0
  53. package/skills/17_Literature_Databases/literature-search-openalex/references/taxonomy.md +52 -0
  54. package/skills/17_Literature_Databases/literature-search-openalex/references/topics.md +29 -0
  55. package/skills/17_Literature_Databases/literature-search-openalex/references/type_values.md +65 -0
  56. package/skills/17_Literature_Databases/literature-search-openalex/references/works.md +304 -0
  57. package/skills/17_Literature_Databases/literature-search-openalex/scripts/openalex_cli.py +633 -0
  58. package/skills/17_Literature_Databases/pubmed-database/SKILL.md +185 -0
  59. package/skills/17_Literature_Databases/pubmed-database/references/advanced-linking.md +128 -0
  60. package/skills/17_Literature_Databases/pubmed-database/references/advanced-search.md +98 -0
  61. package/skills/17_Literature_Databases/pubmed-database/references/bulk-workflows.md +88 -0
  62. package/skills/17_Literature_Databases/pubmed-database/references/citation-matching.md +155 -0
  63. package/skills/17_Literature_Databases/pubmed-database/references/citation.bib +15 -0
  64. package/skills/17_Literature_Databases/pubmed-database/references/cross-database-linking.md +93 -0
  65. package/skills/17_Literature_Databases/pubmed-database/references/fetch-and-resolve.md +125 -0
  66. package/skills/17_Literature_Databases/pubmed-database/references/search-and-discovery.md +106 -0
  67. package/skills/17_Literature_Databases/pubmed-database/references/utilities.md +42 -0
  68. package/skills/17_Literature_Databases/pubmed-database/scripts/pubmed_api.py +715 -0
  69. package/skills/18_Genetics_Genomics/alphagenome-single-variant-analysis/SKILL.md +251 -0
  70. package/skills/18_Genetics_Genomics/alphagenome-single-variant-analysis/pyproject.toml +15 -0
  71. package/skills/18_Genetics_Genomics/alphagenome-single-variant-analysis/references/citation.bib +12 -0
  72. package/skills/18_Genetics_Genomics/alphagenome-single-variant-analysis/scripts/analyze_ism.py +334 -0
  73. package/skills/18_Genetics_Genomics/alphagenome-single-variant-analysis/scripts/generate_ontology_mapping.py +170 -0
  74. package/skills/18_Genetics_Genomics/alphagenome-single-variant-analysis/scripts/interpret_splicing.py +305 -0
  75. package/skills/18_Genetics_Genomics/alphagenome-single-variant-analysis/scripts/lookup_gene_info.py +337 -0
  76. package/skills/18_Genetics_Genomics/alphagenome-single-variant-analysis/scripts/resolve_ontology_terms.py +155 -0
  77. package/skills/18_Genetics_Genomics/alphagenome-single-variant-analysis/scripts/visualize_genome_tracks.py +402 -0
  78. package/skills/18_Genetics_Genomics/alphagenome-single-variant-analysis/scripts/visualize_variant_effects.py +1198 -0
  79. package/skills/18_Genetics_Genomics/clinvar-database/SKILL.md +370 -0
  80. package/skills/18_Genetics_Genomics/clinvar-database/references/citation.bib +23 -0
  81. package/skills/18_Genetics_Genomics/clinvar-database/scripts/clinvar_api.py +711 -0
  82. package/skills/18_Genetics_Genomics/dbsnp-database/SKILL.md +350 -0
  83. package/skills/18_Genetics_Genomics/dbsnp-database/references/api-notes.md +88 -0
  84. package/skills/18_Genetics_Genomics/dbsnp-database/references/citation.bib +12 -0
  85. package/skills/18_Genetics_Genomics/dbsnp-database/scripts/dbsnp_cli.py +625 -0
  86. package/skills/18_Genetics_Genomics/gnomad-database/SKILL.md +73 -0
  87. package/skills/18_Genetics_Genomics/gnomad-database/references/citation.bib +14 -0
  88. package/skills/18_Genetics_Genomics/gnomad-database/scripts/get_gene_constraint.py +90 -0
  89. package/skills/18_Genetics_Genomics/gnomad-database/scripts/get_variant_frequency.py +181 -0
  90. package/skills/18_Genetics_Genomics/gnomad-database/scripts/search_variants.py +207 -0
  91. package/skills/19_Pharmacology/chembl-database/SKILL.md +283 -0
  92. package/skills/19_Pharmacology/chembl-database/references/api_endpoints.md +97 -0
  93. package/skills/19_Pharmacology/chembl-database/references/citation.bib +30 -0
  94. package/skills/19_Pharmacology/chembl-database/scripts/chembl_api.py +657 -0
  95. package/skills/19_Pharmacology/clinical-trials-database/SKILL.md +378 -0
  96. package/skills/19_Pharmacology/clinical-trials-database/references/citation.bib +11 -0
  97. package/skills/19_Pharmacology/clinical-trials-database/references/clinical_trials_api.md +187 -0
  98. package/skills/19_Pharmacology/clinical-trials-database/references/studies_schema.md +143 -0
  99. package/skills/19_Pharmacology/clinical-trials-database/scripts/clinical_trials_api.py +373 -0
  100. package/skills/19_Pharmacology/openfda-database/SKILL.md +225 -0
  101. package/skills/19_Pharmacology/openfda-database/references/api_endpoints.md +207 -0
  102. package/skills/19_Pharmacology/openfda-database/references/citation.bib +15 -0
  103. package/skills/19_Pharmacology/openfda-database/references/recipes.md +150 -0
  104. package/skills/19_Pharmacology/openfda-database/scripts/openfda_query.py +505 -0
  105. package/skills/19_Pharmacology/opentargets-database/SKILL.md +198 -0
  106. package/skills/19_Pharmacology/opentargets-database/references/OpenTargets_GraphQL_Guide.md +216 -0
  107. package/skills/19_Pharmacology/opentargets-database/references/citation.bib +15 -0
  108. package/skills/19_Pharmacology/opentargets-database/scripts/query_opentargets.py +533 -0
  109. package/skills/19_Pharmacology/pubchem-database/SKILL.md +164 -0
  110. package/skills/19_Pharmacology/pubchem-database/references/citation.bib +15 -0
  111. package/skills/19_Pharmacology/pubchem-database/references/endpoints.md +71 -0
  112. package/skills/19_Pharmacology/pubchem-database/references/workflows.md +32 -0
  113. package/skills/19_Pharmacology/pubchem-database/scripts/pubchem_api.py +327 -0
  114. package/skills/20_Infrastructure/uv/SKILL.md +30 -0
  115. package/skills/01_Meta-Skills/academic-research-hub/SKILL.md +0 -108
  116. package/skills/01_Meta-Skills/academic-research-hub/scripts/requirements.txt +0 -17
  117. package/skills/01_Meta-Skills/academic-research-hub/scripts/research.py +0 -781
  118. package/skills/01_Meta-Skills/beautiful-log/SKILL.md +0 -64
  119. package/skills/01_Meta-Skills/beautiful-log/scripts/beautiful_log.py +0 -274
  120. package/skills/01_Meta-Skills/ethoclaw-daily-paper/SKILL.md +0 -130
  121. package/skills/01_Meta-Skills/ethoclaw-daily-paper/assets/config.template.yaml +0 -54
  122. package/skills/01_Meta-Skills/ethoclaw-daily-paper/assets/top5_digest_template.md +0 -5
  123. package/skills/01_Meta-Skills/ethoclaw-daily-paper/scripts/build_top5_digest.py +0 -300
  124. package/skills/01_Meta-Skills/ethoclaw-daily-paper/scripts/common.py +0 -137
  125. package/skills/01_Meta-Skills/ethoclaw-daily-paper/scripts/merge_results.py +0 -106
  126. package/skills/01_Meta-Skills/ethoclaw-daily-paper/scripts/run_pipeline.py +0 -177
  127. package/skills/01_Meta-Skills/ethoclaw-daily-paper/scripts/search_arxiv.py +0 -162
  128. package/skills/01_Meta-Skills/ethoclaw-daily-paper/scripts/search_pubmed.py +0 -202
  129. package/skills/01_Meta-Skills/ethoclaw-normalize-tabular/SKILL.md +0 -173
  130. package/skills/01_Meta-Skills/ethoclaw-normalize-tabular/scripts/normalize_data.py +0 -874
  131. package/skills/01_Meta-Skills/ethoclaw-pdf-research/SKILL.md +0 -134
  132. package/skills/01_Meta-Skills/ethoclaw-pdf-research/references/confirmation-prompts.md +0 -31
  133. package/skills/01_Meta-Skills/ethoclaw-pdf-research/references/output-patterns.md +0 -45
  134. package/skills/01_Meta-Skills/ethoclaw-pdf-research/scripts/build_markdown_deliverables.py +0 -41
  135. package/skills/01_Meta-Skills/ethoclaw-pdf-research/scripts/build_research_log.py +0 -84
  136. package/skills/01_Meta-Skills/ethoclaw-pdf-research/scripts/build_summary_md.py +0 -63
  137. package/skills/01_Meta-Skills/ethoclaw-pdf-research/scripts/extract_pdf_bundle.py +0 -140
  138. package/skills/01_Meta-Skills/experiment-controller/SKILL.md +0 -140
  139. package/skills/01_Meta-Skills/knowledge-graph-builder/SKILL.md +0 -366
  140. package/skills/01_Meta-Skills/knowledge-graph-builder/scripts/entity_resolution.py +0 -120
  141. package/skills/01_Meta-Skills/knowledge-graph-builder/scripts/extraction_prompt_template.txt +0 -19
  142. package/skills/01_Meta-Skills/knowledge-graph-builder/scripts/graph_query.py +0 -106
  143. package/skills/01_Meta-Skills/knowledge-graph-builder/scripts/hypothesis_cli_reference.py +0 -42
  144. package/skills/01_Meta-Skills/knowledge-graph-builder/scripts/new_data_source_template.py +0 -116
  145. package/skills/01_Meta-Skills/knowledge-graph-builder/scripts/requirements.txt +0 -15
  146. package/skills/01_Meta-Skills/method-design/SKILL.md +0 -61
  147. package/skills/01_Meta-Skills/multi-search-engine/SKILL.md +0 -119
  148. package/skills/01_Meta-Skills/research-idea/SKILL.md +0 -65
  149. package/skills/05_EEG_ERP/eeg-skill/SKILL.md +0 -197
  150. package/skills/05_EEG_ERP/meg-skill/SKILL.md +0 -188
  151. package/skills/05_EEG_ERP/meg-skill/scripts/time_frequency.py +0 -223
  152. package/skills/05_EEG_ERP/mne-eeg-tool/SKILL.md +0 -165
  153. package/skills/05_EEG_ERP/mne-eeg-tool/scripts/eeg_pipeline_reference.py +0 -231
  154. package/skills/05_EEG_ERP/seed-iv-skill/SKILL.md +0 -184
  155. package/skills/05_EEG_ERP/seed-iv-skill/scripts/classify_seed_iv.py +0 -154
  156. package/skills/05_EEG_ERP/seed-iv-skill/scripts/extract_seed_iv_features.py +0 -190
  157. package/skills/05_EEG_ERP/seed-iv-skill/scripts/validate_seed_iv.py +0 -102
  158. package/skills/05_EEG_ERP/seed-vig-skill/SKILL.md +0 -182
  159. package/skills/05_EEG_ERP/seed-vig-skill/scripts/classify_seed_vig.py +0 -165
  160. package/skills/05_EEG_ERP/seed-vig-skill/scripts/extract_seed_vig_features.py +0 -185
  161. package/skills/05_EEG_ERP/seed-vig-skill/scripts/validate_seed_vig.py +0 -88
  162. package/skills/06_fMRI_Neuroimaging/abcd-skill/SKILL.md +0 -308
  163. package/skills/06_fMRI_Neuroimaging/abcd-skill/scripts/abcd_qc_summary.py +0 -449
  164. package/skills/06_fMRI_Neuroimaging/abcd-skill/scripts/extract_abcd_phenotype.py +0 -292
  165. package/skills/06_fMRI_Neuroimaging/abcd-skill/scripts/reorganize_abcd.py +0 -387
  166. package/skills/06_fMRI_Neuroimaging/abide-skill/SKILL.md +0 -302
  167. package/skills/06_fMRI_Neuroimaging/abide-skill/scripts/abide_qc_summary.py +0 -317
  168. package/skills/06_fMRI_Neuroimaging/abide-skill/scripts/extract_abide_phenotype.py +0 -267
  169. package/skills/06_fMRI_Neuroimaging/abide-skill/scripts/reorganize_abide.py +0 -387
  170. package/skills/06_fMRI_Neuroimaging/adhd200-skill/SKILL.md +0 -244
  171. package/skills/06_fMRI_Neuroimaging/adhd200-skill/scripts/adhd200_qc_summary.py +0 -98
  172. package/skills/06_fMRI_Neuroimaging/adhd200-skill/scripts/extract_adhd200_phenotype.py +0 -134
  173. package/skills/06_fMRI_Neuroimaging/adhd200-skill/scripts/reorganize_adhd200.py +0 -206
  174. package/skills/06_fMRI_Neuroimaging/adni-skill/SKILL.md +0 -358
  175. package/skills/06_fMRI_Neuroimaging/adni-skill/scripts/generate_adni_task_files.py +0 -1305
  176. package/skills/06_fMRI_Neuroimaging/adni-skill/scripts/generate_vqa_from_tasks.py +0 -766
  177. package/skills/06_fMRI_Neuroimaging/adni-skill/scripts/reorganize_adni.py +0 -491
  178. package/skills/06_fMRI_Neuroimaging/aibl-skill/SKILL.md +0 -295
  179. package/skills/06_fMRI_Neuroimaging/aibl-skill/scripts/aibl_qc_summary.py +0 -260
  180. package/skills/06_fMRI_Neuroimaging/aibl-skill/scripts/extract_aibl_phenotype.py +0 -365
  181. package/skills/06_fMRI_Neuroimaging/aibl-skill/scripts/reorganize_aibl.py +0 -394
  182. package/skills/06_fMRI_Neuroimaging/aomic-skill/SKILL.md +0 -292
  183. package/skills/06_fMRI_Neuroimaging/aomic-skill/scripts/aomic_qc_summary.py +0 -258
  184. package/skills/06_fMRI_Neuroimaging/aomic-skill/scripts/extract_aomic_phenotype.py +0 -284
  185. package/skills/06_fMRI_Neuroimaging/aomic-skill/scripts/reorganize_aomic.py +0 -322
  186. package/skills/06_fMRI_Neuroimaging/asl-skill/SKILL.md +0 -168
  187. package/skills/06_fMRI_Neuroimaging/asl-skill/scripts/compute_cbf.py +0 -224
  188. package/skills/06_fMRI_Neuroimaging/bids-organizer/SKILL.md +0 -241
  189. package/skills/06_fMRI_Neuroimaging/bold5000-skill/SKILL.md +0 -186
  190. package/skills/06_fMRI_Neuroimaging/bold5000-skill/scripts/bold5000_qc_summary.py +0 -96
  191. package/skills/06_fMRI_Neuroimaging/bold5000-skill/scripts/extract_bold5000_stimulus.py +0 -125
  192. package/skills/06_fMRI_Neuroimaging/bold5000-skill/scripts/reorganize_bold5000.py +0 -102
  193. package/skills/06_fMRI_Neuroimaging/camcan-skill/SKILL.md +0 -213
  194. package/skills/06_fMRI_Neuroimaging/camcan-skill/scripts/camcan_qc_summary.py +0 -131
  195. package/skills/06_fMRI_Neuroimaging/camcan-skill/scripts/extract_camcan_phenotype.py +0 -145
  196. package/skills/06_fMRI_Neuroimaging/camcan-skill/scripts/validate_camcan.py +0 -141
  197. package/skills/06_fMRI_Neuroimaging/cobre-skill/SKILL.md +0 -201
  198. package/skills/06_fMRI_Neuroimaging/cobre-skill/scripts/cobre_qc_summary.py +0 -95
  199. package/skills/06_fMRI_Neuroimaging/cobre-skill/scripts/extract_cobre_phenotype.py +0 -104
  200. package/skills/06_fMRI_Neuroimaging/cobre-skill/scripts/reorganize_cobre.py +0 -140
  201. package/skills/06_fMRI_Neuroimaging/conn-tool/SKILL.md +0 -180
  202. package/skills/06_fMRI_Neuroimaging/dcm2nii/SKILL.md +0 -189
  203. package/skills/06_fMRI_Neuroimaging/dmt-har-med-skill/SKILL.md +0 -183
  204. package/skills/06_fMRI_Neuroimaging/dmt-har-med-skill/scripts/dmt_har_med_qc_summary.py +0 -96
  205. package/skills/06_fMRI_Neuroimaging/dmt-har-med-skill/scripts/extract_dmt_har_med_phenotype.py +0 -121
  206. package/skills/06_fMRI_Neuroimaging/dmt-har-med-skill/scripts/reorganize_dmt_har_med.py +0 -125
  207. package/skills/06_fMRI_Neuroimaging/dwi-skill/SKILL.md +0 -359
  208. package/skills/06_fMRI_Neuroimaging/fmri-skill/SKILL.md +0 -371
  209. package/skills/06_fMRI_Neuroimaging/fmriprep-tool/SKILL.md +0 -228
  210. package/skills/06_fMRI_Neuroimaging/freesurfer-tool/SKILL.md +0 -286
  211. package/skills/06_fMRI_Neuroimaging/freesurfer-tool/scripts/freesurfer_processor.py +0 -145
  212. package/skills/06_fMRI_Neuroimaging/fsl-tool/SKILL.md +0 -208
  213. package/skills/06_fMRI_Neuroimaging/hbn-skill/SKILL.md +0 -271
  214. package/skills/06_fMRI_Neuroimaging/hbn-skill/scripts/extract_hbn_phenotype.py +0 -107
  215. package/skills/06_fMRI_Neuroimaging/hbn-skill/scripts/hbn_qc_summary.py +0 -96
  216. package/skills/06_fMRI_Neuroimaging/hbn-skill/scripts/reorganize_hbn.py +0 -150
  217. package/skills/06_fMRI_Neuroimaging/hcpa-skill/SKILL.md +0 -210
  218. package/skills/06_fMRI_Neuroimaging/hcpa-skill/scripts/extract_hcpa_phenotype.py +0 -146
  219. package/skills/06_fMRI_Neuroimaging/hcpa-skill/scripts/hcpa_qc_summary.py +0 -120
  220. package/skills/06_fMRI_Neuroimaging/hcpa-skill/scripts/reorganize_hcpa.py +0 -155
  221. package/skills/06_fMRI_Neuroimaging/hcpd-skill/SKILL.md +0 -210
  222. package/skills/06_fMRI_Neuroimaging/hcpd-skill/scripts/extract_hcpd_phenotype.py +0 -148
  223. package/skills/06_fMRI_Neuroimaging/hcpd-skill/scripts/hcpd_qc_summary.py +0 -125
  224. package/skills/06_fMRI_Neuroimaging/hcpd-skill/scripts/reorganize_hcpd.py +0 -146
  225. package/skills/06_fMRI_Neuroimaging/hcpep-skill/SKILL.md +0 -215
  226. package/skills/06_fMRI_Neuroimaging/hcpep-skill/scripts/extract_hcpep_phenotype.py +0 -157
  227. package/skills/06_fMRI_Neuroimaging/hcpep-skill/scripts/hcpep_qc_summary.py +0 -143
  228. package/skills/06_fMRI_Neuroimaging/hcpep-skill/scripts/reorganize_hcpep.py +0 -146
  229. package/skills/06_fMRI_Neuroimaging/hcppipeline-tool/SKILL.md +0 -217
  230. package/skills/06_fMRI_Neuroimaging/hcpya-skill/SKILL.md +0 -214
  231. package/skills/06_fMRI_Neuroimaging/hcpya-skill/scripts/extract_hcpya_phenotype.py +0 -190
  232. package/skills/06_fMRI_Neuroimaging/hcpya-skill/scripts/hcpya_qc_summary.py +0 -152
  233. package/skills/06_fMRI_Neuroimaging/hcpya-skill/scripts/reorganize_hcpya.py +0 -203
  234. package/skills/06_fMRI_Neuroimaging/ixi-skill/SKILL.md +0 -198
  235. package/skills/06_fMRI_Neuroimaging/ixi-skill/scripts/ixi_qc_summary.py +0 -137
  236. package/skills/06_fMRI_Neuroimaging/ixi-skill/scripts/reorganize_ixi.py +0 -190
  237. package/skills/06_fMRI_Neuroimaging/mnd-skill/SKILL.md +0 -191
  238. package/skills/06_fMRI_Neuroimaging/mnd-skill/scripts/extract_mnd_phenotype.py +0 -143
  239. package/skills/06_fMRI_Neuroimaging/mnd-skill/scripts/mnd_qc_summary.py +0 -120
  240. package/skills/06_fMRI_Neuroimaging/mnd-skill/scripts/validate_mnd.py +0 -107
  241. package/skills/06_fMRI_Neuroimaging/mschallenge-skill/SKILL.md +0 -203
  242. package/skills/06_fMRI_Neuroimaging/mschallenge-skill/scripts/analyze_lesions.py +0 -119
  243. package/skills/06_fMRI_Neuroimaging/mschallenge-skill/scripts/longitudinal_lesion.py +0 -148
  244. package/skills/06_fMRI_Neuroimaging/mschallenge-skill/scripts/mschallenge_qc_summary.py +0 -132
  245. package/skills/06_fMRI_Neuroimaging/mschallenge-skill/scripts/validate_mschallenge.py +0 -116
  246. package/skills/06_fMRI_Neuroimaging/nibabel-skill/SKILL.md +0 -184
  247. package/skills/06_fMRI_Neuroimaging/nibabel-skill/scripts/atlas_coordinate_reference.py +0 -61
  248. package/skills/06_fMRI_Neuroimaging/nibabel-skill/scripts/freesurfer_io_reference.py +0 -34
  249. package/skills/06_fMRI_Neuroimaging/nibabel-skill/scripts/nifti_inspection_reference.py +0 -35
  250. package/skills/06_fMRI_Neuroimaging/nifd-skill/SKILL.md +0 -205
  251. package/skills/06_fMRI_Neuroimaging/nifd-skill/scripts/extract_nifd_phenotype.py +0 -132
  252. package/skills/06_fMRI_Neuroimaging/nifd-skill/scripts/nifd_qc_summary.py +0 -111
  253. package/skills/06_fMRI_Neuroimaging/nifd-skill/scripts/validate_nifd.py +0 -111
  254. package/skills/06_fMRI_Neuroimaging/nii2dcm/SKILL.md +0 -143
  255. package/skills/06_fMRI_Neuroimaging/nilearn-tool/SKILL.md +0 -266
  256. package/skills/06_fMRI_Neuroimaging/nilearn-tool/scripts/connectome_reference.py +0 -65
  257. package/skills/06_fMRI_Neuroimaging/nilearn-tool/scripts/denoise_timeseries_reference.py +0 -58
  258. package/skills/06_fMRI_Neuroimaging/nilearn-tool/scripts/hierarchical_parcellation_reference.py +0 -53
  259. package/skills/06_fMRI_Neuroimaging/nilearn-tool/scripts/kmeans_parcellation_reference.py +0 -53
  260. package/skills/06_fMRI_Neuroimaging/nilearn-tool/scripts/preprocess_bold_reference.py +0 -76
  261. package/skills/06_fMRI_Neuroimaging/nilearn-tool/scripts/rest_dictlearning_reference.py +0 -56
  262. package/skills/06_fMRI_Neuroimaging/nilearn-tool/scripts/rest_ica_reference.py +0 -59
  263. package/skills/06_fMRI_Neuroimaging/nilearn-tool/scripts/second_level_glm_reference.py +0 -58
  264. package/skills/06_fMRI_Neuroimaging/nilearn-tool/scripts/spacenet_classifier_reference.py +0 -59
  265. package/skills/06_fMRI_Neuroimaging/nilearn-tool/scripts/svm_classifier_reference.py +0 -60
  266. package/skills/06_fMRI_Neuroimaging/nilearn-tool/scripts/task_glm_reference.py +0 -63
  267. package/skills/06_fMRI_Neuroimaging/nilearn-tool/scripts/zalff_summary_reference.py +0 -109
  268. package/skills/06_fMRI_Neuroimaging/nsd-skill/SKILL.md +0 -210
  269. package/skills/06_fMRI_Neuroimaging/nsd-skill/scripts/extract_nsd_stimulus.py +0 -171
  270. package/skills/06_fMRI_Neuroimaging/nsd-skill/scripts/nsd_qc_summary.py +0 -142
  271. package/skills/06_fMRI_Neuroimaging/nsd-skill/scripts/validate_nsd.py +0 -142
  272. package/skills/06_fMRI_Neuroimaging/oasis-skill/SKILL.md +0 -205
  273. package/skills/06_fMRI_Neuroimaging/oasis-skill/scripts/extract_oasis_phenotype.py +0 -126
  274. package/skills/06_fMRI_Neuroimaging/oasis-skill/scripts/oasis_qc_summary.py +0 -115
  275. package/skills/06_fMRI_Neuroimaging/oasis-skill/scripts/validate_oasis.py +0 -119
  276. package/skills/06_fMRI_Neuroimaging/pet-skill/SKILL.md +0 -173
  277. package/skills/06_fMRI_Neuroimaging/pet-skill/scripts/compute_suvr.py +0 -202
  278. package/skills/06_fMRI_Neuroimaging/pnc-skill/SKILL.md +0 -206
  279. package/skills/06_fMRI_Neuroimaging/pnc-skill/scripts/extract_pnc_phenotype.py +0 -136
  280. package/skills/06_fMRI_Neuroimaging/pnc-skill/scripts/pnc_qc_summary.py +0 -116
  281. package/skills/06_fMRI_Neuroimaging/pnc-skill/scripts/validate_pnc.py +0 -120
  282. package/skills/06_fMRI_Neuroimaging/ppmi-skill/SKILL.md +0 -209
  283. package/skills/06_fMRI_Neuroimaging/ppmi-skill/scripts/extract_ppmi_phenotype.py +0 -138
  284. package/skills/06_fMRI_Neuroimaging/ppmi-skill/scripts/ppmi_qc_summary.py +0 -111
  285. package/skills/06_fMRI_Neuroimaging/ppmi-skill/scripts/validate_ppmi.py +0 -117
  286. package/skills/06_fMRI_Neuroimaging/qsiprep-tool/SKILL.md +0 -320
  287. package/skills/06_fMRI_Neuroimaging/rest-mneta-mdd-skill/SKILL.md +0 -215
  288. package/skills/06_fMRI_Neuroimaging/rest-mneta-mdd-skill/scripts/extract_rest_mdd_phenotype.py +0 -132
  289. package/skills/06_fMRI_Neuroimaging/rest-mneta-mdd-skill/scripts/harmonize_sites.py +0 -152
  290. package/skills/06_fMRI_Neuroimaging/rest-mneta-mdd-skill/scripts/rest_mdd_qc_summary.py +0 -124
  291. package/skills/06_fMRI_Neuroimaging/rest-mneta-mdd-skill/scripts/validate_rest_mdd.py +0 -103
  292. package/skills/06_fMRI_Neuroimaging/smri-skill/SKILL.md +0 -302
  293. package/skills/06_fMRI_Neuroimaging/tcp-skill/SKILL.md +0 -204
  294. package/skills/06_fMRI_Neuroimaging/tcp-skill/scripts/extract_tcp_phenotype.py +0 -139
  295. package/skills/06_fMRI_Neuroimaging/tcp-skill/scripts/tcp_qc_summary.py +0 -111
  296. package/skills/06_fMRI_Neuroimaging/tcp-skill/scripts/validate_tcp.py +0 -99
  297. package/skills/06_fMRI_Neuroimaging/ucla-cnp-skill/SKILL.md +0 -217
  298. package/skills/06_fMRI_Neuroimaging/ucla-cnp-skill/scripts/extract_ucla_cnp_phenotype.py +0 -145
  299. package/skills/06_fMRI_Neuroimaging/ucla-cnp-skill/scripts/ucla_cnp_qc_summary.py +0 -111
  300. package/skills/06_fMRI_Neuroimaging/ucla-cnp-skill/scripts/validate_ucla_cnp.py +0 -113
  301. package/skills/06_fMRI_Neuroimaging/ukb-skill/SKILL.md +0 -310
  302. package/skills/06_fMRI_Neuroimaging/ukb-skill/scripts/build_ukb_survival.py +0 -210
  303. package/skills/06_fMRI_Neuroimaging/ukb-skill/scripts/extract_ukb_cases.py +0 -308
  304. package/skills/06_fMRI_Neuroimaging/ukb-skill/scripts/extract_ukb_phenotype.py +0 -232
  305. package/skills/06_fMRI_Neuroimaging/ukb-skill/scripts/ukb_qc_summary.py +0 -158
  306. package/skills/06_fMRI_Neuroimaging/wmh-segmentation/SKILL.md +0 -133
  307. package/skills/07_Computational_Modeling/detrending/SKILL.md +0 -118
  308. package/skills/07_Computational_Modeling/dictlearning/SKILL.md +0 -122
  309. package/skills/07_Computational_Modeling/filtering/SKILL.md +0 -121
  310. package/skills/07_Computational_Modeling/glm/SKILL.md +0 -153
  311. package/skills/07_Computational_Modeling/hierarchical/SKILL.md +0 -121
  312. package/skills/07_Computational_Modeling/ica/SKILL.md +0 -122
  313. package/skills/07_Computational_Modeling/kmeans/SKILL.md +0 -119
  314. package/skills/07_Computational_Modeling/run_models/SKILL.md +0 -427
  315. package/skills/07_Computational_Modeling/spacenet/SKILL.md +0 -122
  316. package/skills/07_Computational_Modeling/svm/SKILL.md +0 -120
  317. package/skills/08_Computational_Neuroscience/brain_gnn/SKILL.md +0 -183
  318. package/skills/08_Computational_Neuroscience/dipy-tool/SKILL.md +0 -239
  319. package/skills/08_Computational_Neuroscience/dipy-tool/scripts/dti_metrics_reference.py +0 -70
  320. package/skills/08_Computational_Neuroscience/dipy-tool/scripts/load_and_mask_reference.py +0 -76
  321. package/skills/08_Computational_Neuroscience/dipy-tool/scripts/roi_stats_reference.py +0 -59
  322. package/skills/08_Computational_Neuroscience/fm_app/SKILL.md +0 -195
  323. package/skills/08_Computational_Neuroscience/neurostorm/SKILL.md +0 -151
  324. package/skills/13_Visualization/brain-visualization/SKILL.md +0 -191
  325. package/skills/13_Visualization/brain-visualization/scripts/connectome_reference.py +0 -108
  326. package/skills/13_Visualization/brain-visualization/scripts/freesurfer_ply_reference.py +0 -54
  327. package/skills/13_Visualization/brain-visualization/scripts/zalff_summary_reference.py +0 -116
  328. package/skills/13_Visualization/ethoclaw-paper-figure-layout/SKILL.md +0 -78
  329. package/skills/13_Visualization/ethoclaw-paper-figure-layout/assets/naturecomm_figures.tex +0 -74
  330. package/skills/13_Visualization/ethoclaw-paper-figure-layout/scripts/layout_results_foldered.py +0 -579
  331. package/skills/14_Writing/overleaf-skill/SKILL.md +0 -184
  332. package/skills/14_Writing/overleaf-skill/scripts/install.sh +0 -30
  333. package/skills/14_Writing/paper-writing/SKILL.md +0 -146
  334. package/skills/14_Writing/paper-writing/scripts/data_statement_templates.py +0 -164
  335. package/skills/14_Writing/paper-writing/scripts/figure_templates.py +0 -315
  336. package/skills/14_Writing/paper-writing/scripts/nature_figure_style.py +0 -214
  337. package/skills/14_Writing/paper-writing/scripts/section_phrasebank.py +0 -246
  338. package/skills/16_Animal_Behavior/ethoclaw-analysis-report/SKILL.md +0 -274
  339. package/skills/16_Animal_Behavior/ethoclaw-analysis-report/assets/report_template_en.html +0 -112
  340. package/skills/16_Animal_Behavior/ethoclaw-analysis-report/assets/report_template_en.md +0 -21
  341. package/skills/16_Animal_Behavior/ethoclaw-analysis-report/assets/section_templates/cluster-section.md +0 -5
  342. package/skills/16_Animal_Behavior/ethoclaw-analysis-report/assets/section_templates/heatmap-section.md +0 -5
  343. package/skills/16_Animal_Behavior/ethoclaw-analysis-report/assets/section_templates/integrated-interpretation.md +0 -3
  344. package/skills/16_Animal_Behavior/ethoclaw-analysis-report/assets/section_templates/overview.md +0 -3
  345. package/skills/16_Animal_Behavior/ethoclaw-analysis-report/assets/section_templates/project-summary.md +0 -3
  346. package/skills/16_Animal_Behavior/ethoclaw-analysis-report/assets/section_templates/radar-section.md +0 -5
  347. package/skills/16_Animal_Behavior/ethoclaw-analysis-report/assets/section_templates/raw-trajectory.md +0 -3
  348. package/skills/16_Animal_Behavior/ethoclaw-analysis-report/assets/section_templates/sample-check.md +0 -3
  349. package/skills/16_Animal_Behavior/ethoclaw-analysis-report/assets/section_templates/single-subject-section.md +0 -3
  350. package/skills/16_Animal_Behavior/ethoclaw-analysis-report/assets/section_templates/stats-section.md +0 -5
  351. package/skills/16_Animal_Behavior/ethoclaw-analysis-report/references/experiment-types/epm.md +0 -52
  352. package/skills/16_Animal_Behavior/ethoclaw-analysis-report/references/experiment-types/fst.md +0 -37
  353. package/skills/16_Animal_Behavior/ethoclaw-analysis-report/references/experiment-types/nor.md +0 -39
  354. package/skills/16_Animal_Behavior/ethoclaw-analysis-report/references/experiment-types/oft.md +0 -43
  355. package/skills/16_Animal_Behavior/ethoclaw-analysis-report/references/experiment-types/tcst.md +0 -45
  356. package/skills/16_Animal_Behavior/ethoclaw-analysis-report/references/experiment-types/tst.md +0 -36
  357. package/skills/16_Animal_Behavior/ethoclaw-analysis-report/references/input-types.md +0 -59
  358. package/skills/16_Animal_Behavior/ethoclaw-analysis-report/references/interpretation-guardrails.md +0 -45
  359. package/skills/16_Animal_Behavior/ethoclaw-analysis-report/references/metadata-schema.md +0 -57
  360. package/skills/16_Animal_Behavior/ethoclaw-analysis-report/references/report-sections.md +0 -86
  361. package/skills/16_Animal_Behavior/ethoclaw-analysis-report/references/section-selection-rules.md +0 -169
  362. package/skills/16_Animal_Behavior/ethoclaw-analysis-report/scripts/build_report_manifest.py +0 -27
  363. package/skills/16_Animal_Behavior/ethoclaw-analysis-report/scripts/render_report.py +0 -34
  364. package/skills/16_Animal_Behavior/ethoclaw-analysis-report/scripts/report_utils.py +0 -1121
  365. package/skills/16_Animal_Behavior/ethoclaw-animal-grounding/SKILL.md +0 -390
  366. package/skills/16_Animal_Behavior/ethoclaw-animal-grounding/reference_code.py +0 -98
  367. package/skills/16_Animal_Behavior/ethoclaw-animal-pose-estimation/SKILL.md +0 -336
  368. package/skills/16_Animal_Behavior/ethoclaw-kinematic-parameter-generator/README.md +0 -21
  369. package/skills/16_Animal_Behavior/ethoclaw-kinematic-parameter-generator/SKILL.md +0 -41
  370. package/skills/16_Animal_Behavior/ethoclaw-kinematic-parameter-generator/batch_kinematic_generator.py +0 -663
  371. package/skills/16_Animal_Behavior/ethoclaw-kinematic-parameter-generator/config.json +0 -19
  372. package/skills/16_Animal_Behavior/ethoclaw-kinematic-parameter-generator/generate_kinematic_parameter.py +0 -401
  373. package/skills/16_Animal_Behavior/ethoclaw-kinematic-parameter-generator/kinematic_generator.py +0 -265
  374. package/skills/16_Animal_Behavior/ethoclaw-multiparameter-clustermap-generate/SKILL.md +0 -72
  375. package/skills/16_Animal_Behavior/ethoclaw-multiparameter-clustermap-generate/references/config.example.toml +0 -56
  376. package/skills/16_Animal_Behavior/ethoclaw-multiparameter-clustermap-generate/scripts/cluster_all_params.py +0 -232
  377. package/skills/16_Animal_Behavior/ethoclaw-multiparameter-clustermap-generate/scripts/cluster_all_params_from_config.py +0 -236
  378. package/skills/16_Animal_Behavior/ethoclaw-multiparameter-radar-generate/SKILL.md +0 -68
  379. package/skills/16_Animal_Behavior/ethoclaw-multiparameter-radar-generate/references/notes.md +0 -5
  380. package/skills/16_Animal_Behavior/ethoclaw-multiparameter-radar-generate/scripts/plot_h5_radar.py +0 -513
  381. package/skills/16_Animal_Behavior/ethoclaw-multiparameter-violin-stats-generate/SKILL.md +0 -52
  382. package/skills/16_Animal_Behavior/ethoclaw-multiparameter-violin-stats-generate/config.toml +0 -81
  383. package/skills/16_Animal_Behavior/ethoclaw-multiparameter-violin-stats-generate/references/stats-rule.md +0 -18
  384. package/skills/16_Animal_Behavior/ethoclaw-multiparameter-violin-stats-generate/scripts/h5_inspect.py +0 -79
  385. package/skills/16_Animal_Behavior/ethoclaw-multiparameter-violin-stats-generate/scripts/h5_violin_batch.py +0 -624
  386. package/skills/16_Animal_Behavior/ethoclaw-multiparameter-violin-stats-generate/scripts/h5_violin_stats.py +0 -438
  387. package/skills/16_Animal_Behavior/ethoclaw-trajectory-velocity-heatmap-generate/SKILL.md +0 -280
  388. package/skills/16_Animal_Behavior/ethoclaw-trajectory-velocity-heatmap-generate/core_scripts/heatmap_trajectory.py +0 -790
  389. package/skills/16_Animal_Behavior/ethoclaw-trajectory-velocity-heatmap-generate/core_scripts/heatmap_velocity.py +0 -855
  390. package/skills/16_Animal_Behavior/ethoclaw-trajectory-velocity-heatmap-generate/reference_data/reference_2d.csv +0 -101
  391. package/skills/16_Animal_Behavior/ethoclaw-trajectory-velocity-heatmap-generate/reference_data/reference_2d.h5 +0 -0
  392. package/skills/16_Animal_Behavior/ethoclaw-trajectory-velocity-heatmap-generate/reference_data/reference_data_readme.md +0 -126
@@ -1,59 +0,0 @@
1
- from __future__ import annotations
2
-
3
- import argparse
4
- from pathlib import Path
5
-
6
- import nibabel as nib
7
- import numpy as np
8
- import pandas as pd
9
-
10
-
11
- def roi_stats(metric_path: Path, roi_path: Path, label_path: Path | None, out_csv: Path, min_voxels: int) -> None:
12
- metric = nib.load(str(metric_path)).get_fdata()
13
- roi = nib.load(str(roi_path)).get_fdata().astype(int)
14
-
15
- labels = None
16
- if label_path is not None:
17
- labels = [line.strip() for line in label_path.read_text(encoding="utf-8", errors="ignore").splitlines() if line.strip()]
18
-
19
- rows = []
20
- for label_id in np.unique(roi):
21
- if label_id == 0:
22
- continue
23
- values = metric[roi == label_id]
24
- values = values[np.isfinite(values)]
25
- if values.size < min_voxels:
26
- continue
27
-
28
- rows.append(
29
- {
30
- "label": int(label_id),
31
- "label_name": labels[int(label_id) - 1] if labels is not None and int(label_id) - 1 < len(labels) else "",
32
- "n_vox": int(values.size),
33
- "mean": float(values.mean()),
34
- "median": float(np.median(values)),
35
- "std": float(values.std(ddof=1)) if values.size > 1 else 0.0,
36
- "p05": float(np.percentile(values, 5)),
37
- "p95": float(np.percentile(values, 95)),
38
- }
39
- )
40
-
41
- pd.DataFrame(rows).sort_values("label").to_csv(out_csv, index=False)
42
-
43
-
44
- def main() -> None:
45
- parser = argparse.ArgumentParser(description="Reference DIPY snippet for atlas-based ROI statistics on tensor metrics.")
46
- parser.add_argument("--metric", type=Path, required=True, help="Input metric NIfTI such as FA.nii.gz.")
47
- parser.add_argument("--roi", type=Path, required=True, help="Atlas or ROI label NIfTI in the same space as the metric.")
48
- parser.add_argument("--output", type=Path, required=True, help="Output CSV path.")
49
- parser.add_argument("--labels", type=Path, default=None, help="Optional atlas label text file.")
50
- parser.add_argument("--min-voxels", type=int, default=10, help="Minimum voxel count for a region to be reported.")
51
- args = parser.parse_args()
52
-
53
- args.output.parent.mkdir(parents=True, exist_ok=True)
54
- roi_stats(args.metric, args.roi, args.labels, args.output, args.min_voxels)
55
- print(f"Saved ROI statistics to: {args.output}")
56
-
57
-
58
- if __name__ == "__main__":
59
- main()
@@ -1,195 +0,0 @@
1
- ---
2
- name: fm_app
3
- description: "Use this model doc whenever the user wants to run FM-APP for phenotype prediction using fMRI ROI features and optional sMRI features. This document provides model-level usage and delegates preprocessing to fmri-skill and smri-skill."
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
- - run_models
11
- ---
12
- # FM-APP Model Doc
13
-
14
- ## Overview
15
- FM-APP is a multi-stage framework for phenotype prediction via fMRI to sMRI knowledge transfer.
16
-
17
- - Paper: He Z, Li W, Liu Y, et al. FM-APP, IEEE TMI, 2024, 44(10): 4010-4022
18
- - Official code: https://github.com/ZhibinHe/FM-APP
19
- - Primary input: fMRI ROI connectivity features
20
- - Additional input: sMRI ROI structural features (required in Stage 2)
21
- - Primary output: multi-phenotype prediction and zero-shot phenotype reconstruction
22
-
23
- In NeuroClaw, this is model-level guidance. Upstream preparation should be delegated to:
24
- - `fmri-skill` for fMRI preprocessing and ROI extraction
25
- - `smri-skill` for structural ROI feature extraction
26
- - `hcpya-skill` if HCP Young Adult download/orchestration is needed
27
-
28
- **Research use only.**
29
-
30
- ---
31
-
32
- ## Quick Start (From git clone)
33
-
34
- ### 1) Clone repository
35
- ```bash
36
- git clone https://github.com/ZhibinHe/FM-APP.git
37
- cd FM-APP
38
- ```
39
-
40
- ### 2) Create environment and install dependencies
41
- ```bash
42
- python -m venv .venv
43
- source .venv/bin/activate
44
- pip install -r requirements.txt
45
- ```
46
-
47
- If using GPU, install CUDA-compatible PyTorch and graph-related packages first.
48
-
49
- ### 3) Prepare required data
50
- Before training, ensure these are ready:
51
- - fMRI ROI/connectivity features from `fmri-skill`
52
- - sMRI ROI structural features from `smri-skill` (for Stage 2)
53
- - phenotype CSV files and text feature tensors in `data/`
54
-
55
- ### 4) Run staged pipeline
56
- ```bash
57
- # Stage 0: data preparation (example scripts)
58
- python 00-create-folder_hcp_4fmri.py
59
- python 01-fetch_data_hcp_4fmri.py
60
- python 02-process_data_hcp_4fmri.py
61
-
62
- # Stage 1: fMRI model training
63
- python 101-main_stage1_fmri_HCP.py
64
-
65
- # Stage 2: fMRI-T1w alignment
66
- python 102-main_stage2_fmri_t1w_HCP.py
67
-
68
- # Stage 3: decoder and zero-shot inference
69
- python 103-main_stage3_t1w_HCP.py
70
- ```
71
-
72
- ---
73
-
74
- ## Pipeline Definition
75
-
76
- | Stage | Script pattern | Purpose | Core output |
77
- |---|---|---|---|
78
- | Stage 0 | `00-*`, `01-*`, `02-*` | Data folder setup, ROI connectivity extraction, HDF5 packaging | `raw/*.h5`, processed inputs |
79
- | Stage 1 | `101-main_stage1_fmri_HCP.py` | fMRI feature extraction and phenotype regression | `model/stage1_*.pth`, `model/stage1_dataset_*.pt` |
80
- | Stage 2 | `102-main_stage2_fmri_t1w_HCP.py` | fMRI-T1w feature alignment (Sinkhorn-RPM) | `model/stage2_*.pth` |
81
- | Stage 3 | `103-main_stage3_t1w_HCP.py` | masked decoder training and zero-shot phenotype inference | stage-3 checkpoints and inference outputs |
82
-
83
- Run order must be: Stage 0 -> Stage 1 -> Stage 2 -> Stage 3.
84
-
85
- ---
86
-
87
- ## Stage Inputs and Outputs
88
-
89
- ### Stage 0 (Data Preparation)
90
- Required inputs:
91
- - subject lists and dataset files (HCP/HCPA)
92
- - phenotype CSV files under `data/`
93
- - pre-encoded text feature tensors (`*.pt`)
94
-
95
- Main outputs:
96
- - per-subject connectivity features (corr/pcorr)
97
- - HDF5 packaged samples for model training
98
-
99
- ### Stage 1 (fMRI Training)
100
- Required inputs:
101
- - Stage 0 packaged features
102
- - phenotype text features
103
-
104
- Main outputs:
105
- - best checkpoint: `model/stage1_fmri_best_*.pth`
106
- - stage1 feature package: `model/stage1_dataset_*.pt`
107
-
108
- ### Stage 2 (fMRI-sMRI Alignment)
109
- Required inputs:
110
- - frozen Stage 1 model/features
111
- - sMRI ROI features (e.g., 333x9 per subject)
112
-
113
- Main outputs:
114
- - best checkpoint: `model/stage2_fmri_to_t1w_best_*.pth`
115
-
116
- ### Stage 3 (Decoder and Zero-shot)
117
- Required inputs:
118
- - Stage 1 fused features and regression weights
119
- - masks / phenotype supervision setup
120
-
121
- Main outputs:
122
- - decoder checkpoints
123
- - reconstructed masked phenotype representations
124
-
125
- ---
126
-
127
- ## Typical Configuration Notes
128
-
129
- - Atlas: Gordon333 (333 ROIs)
130
- - Stage 1 typical settings: Adam, lr=0.0005, batch size=8, long-epoch training
131
- - Stage 2 includes Sinkhorn matching; runtime is usually higher than Stage 1
132
- - Stage 3 supports zero-shot phenotype inference using masked reconstruction
133
-
134
- ---
135
-
136
- ## Recommended Directory Layout
137
-
138
- ```text
139
- FM-APP/
140
- data/
141
- HCP_train_phenotype.csv
142
- HCP_test_phenotype.csv
143
- HCP_all_phenotype.csv
144
- HCPA_train_phenotype.csv
145
- HCPA_test_phenotype.csv
146
- phenotype_text_feature_tr.pt
147
- phenotype_text_feature_te.pt
148
- HCPA_phenotype_text_feature_tr.pt
149
- HCPA_phenotype_text_feature_te.pt
150
- raw/
151
- *.h5
152
- model/
153
- stage1_*.pth
154
- stage2_*.pth
155
- stage1_dataset_*.pt
156
- net/
157
- imports/
158
- loss_function/
159
- util/
160
- requirements.txt
161
- ```
162
-
163
- ---
164
-
165
- ## NeuroClaw Delegation Rules
166
-
167
- - fMRI preprocessing and ROI extraction: `fmri-skill`
168
- - sMRI feature extraction: `smri-skill`
169
- - HCP data orchestration: `hcpya-skill` (or `hcpa-skill` / `hcpd-skill` / `hcpep-skill` for other HCP variants)
170
- - dependency management: `dependency-planner` + `conda-env-manager`
171
- - command execution: `claw-shell`
172
-
173
- No execution before explicit plan confirmation.
174
-
175
- ---
176
-
177
- ## Limitations and Notes
178
-
179
- - CUDA-capable GPU is strongly recommended for training.
180
- - Stage 2 depends on valid Stage 1 artifacts and sMRI features.
181
- - Stage 3 depends on `stage1_dataset_*.pt` and proper masking setup.
182
- - Keep train/val/test split strict to avoid leakage.
183
- - Verify phenotype column counts and subject ID alignment before Stage 1.
184
-
185
- ---
186
-
187
- ## Reference
188
-
189
- - He Z, Li W, Liu Y, et al. FM-APP: Foundation model for any phenotype prediction via fMRI to sMRI knowledge transfer. IEEE Transactions on Medical Imaging, 2024, 44(10): 4010-4022.
190
- - Official repository: https://github.com/ZhibinHe/FM-APP
191
- - NeuroSTORM HCP download scripts: https://github.com/CUHK-AIM-Group/NeuroSTORM/tree/main/scripts/dataset_download
192
-
193
- Created At: 2026-03-28 20:03 HKT
194
- Last Updated At: 2026-03-28 20:03 HKT
195
- Author: chengwang96
@@ -1,151 +0,0 @@
1
- ---
2
- name: neurostorm
3
- description: "Use this skill whenever the user wants to preprocess fMRI data, pretrain or fine-tune NeuroSTORM, run inference, or benchmark on fMRI tasks (age/gender prediction, phenotype prediction, disease diagnosis, fMRI retrieval, task fMRI state classification). Triggers include: 'fMRI', 'NeuroSTORM', 'fMRI preprocessing', 'fMRI foundation model', 'brain imaging', 'HCP', 'ABCD', 'UKB', 'ADHD200', 'COBRE', 'UCLA', 'NSD', 'BOLD5000', 'disease diagnosis from fMRI', 'pretrain fMRI model', 'fine-tune fMRI', or any request involving .nii/.nii.gz fMRI volume files."
4
- license: MIT
5
- layer: base
6
- skill_type: model
7
- dependencies:
8
- - fmri-skill
9
- - smri-skill
10
- - run_models
11
- ---
12
- # NeuroSTORM Skill
13
- ## Overview
14
- `neurostorm-skill` covers all workflows for the **NeuroSTORM fMRI foundation model**: data downloading, preprocessing, pre-training, fine-tuning, and inference.
15
- **Supported tasks:**
16
- | ID | Task |
17
- |----|------|
18
- | 1 | Age & Gender Prediction |
19
- | 2 | Phenotype Prediction |
20
- | 3 | Disease Diagnosis |
21
- | 4 | fMRI Retrieval |
22
- | 5 | Task fMRI State Classification |
23
- **Supported datasets:** HCP1200, ABCD, UKB, Cobre, ADHD200, HCPA, HCPD, UCLA, HCPEP, HCPTASK, GOD, NSD, BOLD5000
24
- ---
25
-
26
- ## Installation
27
- ```bash
28
- # 1. Create conda environment
29
- conda create -n neurostorm python=3.11
30
- conda activate neurostorm
31
- # 2. Install PyTorch (CUDA 12.8 example)
32
- pip install torch==2.7.1 torchvision==0.22.1 torchaudio==2.7.1 \
33
- --index-url https://download.pytorch.org/whl/cu128
34
- # 3. Install remaining dependencies
35
- pip install tensorboard tensorboardX tqdm ipdb nvitop monai \
36
- pytorch-lightning==1.9.4 neptune nibabel nilearn numpy
37
- # 4. (Optional) Install Mamba SSM for NeuroSTORM backbone
38
- git clone https://github.com/Dao-AILab/causal-conv1d.git && cd causal-conv1d
39
- TORCH_CUDA_ARCH_LIST="12.0" pip install --no-build-isolation -e .
40
- git clone https://github.com/state-spaces/mamba.git && cd mamba
41
- TORCH_CUDA_ARCH_LIST="12.0" pip install --no-build-isolation -e .
42
- ```
43
- Alternatively, use the provided Docker image:
44
- ```bash
45
- docker build -t neurostorm:latest .
46
- docker run --gpus all -it --rm \
47
- -v $(pwd):/workspace \
48
- -v /path/to/data:/workspace/data \
49
- --shm-size=8g neurostorm:latest
50
- ```
51
- ---
52
- ## Workflows
53
-
54
- ### 1. Data Preprocessing
55
- **Input:** Raw fMRI volumes in MNI152 space (`.nii` / `.nii.gz`)
56
- **Output:** Per-frame `.pt` tensor files ready for model input
57
- ```bash
58
- # Brain extraction (requires FSL)
59
- bash datasets/brain_extraction.sh /path/to/raw /path/to/extracted
60
- # Convert to 4D volume tensors (background removal, resampling, Z-normalization)
61
- python datasets/preprocessing_volume.py \
62
- --dataset_name hcp \
63
- --load_root ./data/hcp \
64
- --save_root ./processed_data/hcp \
65
- --num_processes 8
66
- # (Optional) Convert to 2D ROI time series or functional correlation matrix
67
- python datasets/generate_roi_data_from_nii.py \
68
- --atlas_names aal3 cc200 \
69
- --dataset_names hcp \
70
- --output_dir ./processed_data \
71
- --num_processes 8
72
- ```
73
- ---
74
-
75
- ### 2. Pre-training
76
- **Input:** Preprocessed `.pt` volume files
77
- **Output:** Pre-trained model checkpoint (`.ckpt`)
78
- ```bash
79
- # MAE-based pre-training on HCP-YA
80
- python main.py \
81
- --pretraining \
82
- --use_mae \
83
- --model neurostorm \
84
- --dataset_name HCP1200 \
85
- --image_path ./processed_data/hcp \
86
- --mask_ratio 0.5 \
87
- --batch_size 8 \
88
- --learning_rate 1e-4 \
89
- --max_epochs 100 \
90
- --loggername tensorboard \
91
- --project_name pt_neurostorm_mae
92
- ```
93
- See `scripts/hcp_pretrain/` for ready-made pre-training scripts.
94
- ---
95
-
96
- ### 3. Fine-tuning
97
- **Input:** Preprocessed `.pt` files + pre-trained checkpoint
98
- **Output:** Fine-tuned checkpoint (`.ckpt`) + TensorBoard logs
99
- ```bash
100
- # Example: gender classification on HCP-YA
101
- python main.py \
102
- --model neurostorm \
103
- --dataset_name HCP1200 \
104
- --image_path ./processed_data/hcp \
105
- --load_model_path ./pretrained_models/neurostorm_mae.ckpt \
106
- --downstream_task_id 1 \
107
- --downstream_task_type classification \
108
- --task_name sex \
109
- --batch_size 12 \
110
- --learning_rate 5e-5 \
111
- --max_epochs 30 \
112
- --loggername tensorboard \
113
- --project_name ft_neurostorm_gender
114
- ```
115
- See `scripts/hcp_downstream/` and other `*_downstream/` folders for task-specific scripts.
116
- ---
117
-
118
- ### 4. Inference / Demo
119
- **Input:** HCP-YA dataset + fine-tuned checkpoint
120
- **Output:** Prediction results printed to stdout
121
- ```bash
122
- # Quick demo (age, gender, phenotype)
123
- sh scripts/run_demo.sh
124
- # Or directly:
125
- python demo.py \
126
- --ckpt_path /path/to/gender.ckpt \
127
- --task gender \
128
- --image_path /path/to/HCP1200 \
129
- --devices 1 \
130
- --precision 32
131
- ```
132
- ---
133
-
134
- ## Input / Output Summary
135
- | Stage | Input | Output |
136
- |-------|-------|--------|
137
- | Preprocessing | `.nii` / `.nii.gz` volumes in MNI152 space | Per-frame `.pt` tensors |
138
- | Pre-training | Preprocessed `.pt` files | Model checkpoint `.ckpt` |
139
- | Fine-tuning | `.pt` files + pre-trained `.ckpt` | Fine-tuned `.ckpt` + logs |
140
- | Inference | `.pt` files + fine-tuned `.ckpt` | Predictions (stdout / CSV) |
141
- ---
142
-
143
- ## Reference
144
- - Paper: *Towards a General-Purpose Foundation Model for fMRI Analysis* (Nature Biomedical Engineering, 2026)
145
- - Project: https://cuhk-aim-group.github.io/NeuroSTORM/
146
- - GitHub: https://github.com/CUHK-AIM-Group/NeuroSTORM
147
- ---
148
-
149
- Created At: 2026-04-02 00:23 HKT
150
- Last Updated At: 2026-04-02 00:23 HKT
151
- Author: chengwang96
@@ -1,191 +0,0 @@
1
- ---
2
- name: brain-visualization
3
- description: "Use this skill whenever the user wants to visualize neuroimaging analysis results, including 3D brain connectivity networks, atlas-based regional activation summaries, or FreeSurfer cortical surface meshes with anatomical colors. Triggers include: 'brain visualization', 'visualize connectome', '3D brain network', 'zALFF visualization', 'brain activation map', 'FreeSurfer PLY export', 'surface mesh rendering', or any request to turn neuroimaging outputs into interpretable figures or 3D models."
4
- license: MIT License (NeuroClaw custom skill - freely modifiable within the project)
5
- layer: base
6
- skill_type: tool
7
- dependencies:
8
- - nibabel-skill
9
- - nilearn-tool
10
- ---
11
- # Brain Visualization
12
-
13
- ## Overview
14
-
15
- `brain-visualization` is the NeuroClaw skill for turning processed neuroimaging outputs into publication-friendly figures and 3D assets.
16
-
17
- It focuses on three common visualization tasks drawn from the methods demonstrated in the referenced rs-fMRI tutorial:
18
- - 3D brain connectivity visualization from atlas coordinates and ROI-to-ROI connectivity matrices
19
- - atlas-based brain region activation ranking and coordinate export from zALFF-like volumetric maps
20
- - FreeSurfer cortical surface export to colored PLY meshes for downstream 3D rendering
21
-
22
- This skill is intended for analysis outputs that already exist. It does not replace preprocessing or statistical modeling skills such as `fmri-skill`, `nilearn-tool`, `freesurfer-tool`, or `fsl-tool`.
23
-
24
- ## Agent Reference Rule
25
-
26
- When implementing or adapting visualization workflows, the agent should first consult the curated reference snippets in `skills/brain-visualization/scripts/` instead of copying directly from the tutorial scripts with hard-coded paths.
27
-
28
- Reference snippets available:
29
- - `scripts/connectome_reference.py` -> atlas coordinate extraction + strongest-edge connectome plotting
30
- - `scripts/zalff_summary_reference.py` -> MNI resampling + zALFF regional summary + coordinate export
31
- - `scripts/freesurfer_ply_reference.py` -> FreeSurfer surface + annotation to colored PLY export
32
-
33
- These snippets are distilled from `rs-fMRI-Pipeline-Tutorial/` and are intended as the preferred starting point for new agent-generated code in this skill.
34
-
35
- ## Quick Reference
36
-
37
- | Task | What needs to be visualized | Typical input | Expected output |
38
- |------|-----------------------------|---------------|-----------------|
39
- | 3D connectome figure | strongest ROI-to-ROI connections on a template brain | atlas NIfTI + connectivity matrix (`.npy` / `.csv`) + template T1 | static network figure (`.png`) |
40
- | Regional activation summary | top active atlas regions with MNI coordinates | BOLD-derived zALFF or similar volumetric map + atlas + labels | ranked CSV table + coordinate table |
41
- | FreeSurfer surface export | anatomical cortical mesh with region colors | `lh.pial` / `rh.pial` + `.annot` files | colored mesh (`.ply`) |
42
- | Publication-ready snapshots | compact figures for reports or manuscripts | any of the above | PNG figures and tabular summaries |
43
-
44
- ## Core Visualization Patterns
45
-
46
- ### 1. 3D Brain Network Visualization
47
-
48
- Recommended when the user has a connectivity matrix and wants an interpretable whole-brain figure.
49
-
50
- Typical approach:
51
- - Load an atlas image such as AAL3 and derive ROI coordinates with Nilearn.
52
- - Load a symmetric functional connectivity matrix.
53
- - Zero the diagonal and keep only the strongest edges for readability.
54
- - Plot the network on a standard-space template using `nilearn.plotting.plot_connectome`.
55
-
56
- Typical Python stack:
57
- - `numpy`
58
- - `nibabel`
59
- - `matplotlib`
60
- - `nilearn`
61
-
62
- Example command pattern:
63
-
64
- ```bash
65
- python skills/brain-visualization/scripts/connectome_reference.py \
66
- --atlas path/to/AAL3v1.nii \
67
- --template path/to/mni_icbm152_t1_tal_nlin_sym_09a.nii \
68
- --matrix path/to/fc_matrix.npy \
69
- --output outputs/3D_brain_network.png
70
- ```
71
-
72
- Recommended outputs:
73
- - `3D_brain_network_AAL166_strongest.png`
74
-
75
- ### 2. Atlas-Based Regional Activation Summary
76
-
77
- Recommended when the user wants a ranked list of active regions rather than only a voxelwise map.
78
-
79
- Typical approach:
80
- - Resample BOLD-derived data into MNI space.
81
- - Compute ALFF or zALFF-like summary statistics.
82
- - Use `NiftiLabelsMasker` to extract atlas-level regional values.
83
- - Rank regions and export the top regions with MNI coordinates.
84
-
85
- Typical Python stack:
86
- - `numpy`
87
- - `pandas`
88
- - `nibabel`
89
- - `nilearn`
90
-
91
- Example command pattern:
92
-
93
- ```bash
94
- python skills/brain-visualization/scripts/zalff_summary_reference.py \
95
- --bold path/to/rest_bold.nii.gz \
96
- --atlas path/to/AAL3v1.nii \
97
- --labels path/to/AAL3v1.nii.txt \
98
- --mask path/to/mni_mask.nii.gz \
99
- --output-dir outputs/active_brain_results
100
- ```
101
-
102
- Recommended outputs:
103
- - `TOP10_active_regions.csv`
104
- - `top10_coordinates.csv`
105
- - `all_brain_regions_activity.csv`
106
-
107
- ### 3. FreeSurfer Colored Surface Export
108
-
109
- Recommended when the user needs a mesh that can be opened in Blender, MeshLab, or downstream 3D pipelines.
110
-
111
- Typical approach:
112
- - Read FreeSurfer geometry from `lh.pial` / `rh.pial`.
113
- - Read anatomical labels from `lh.aparc.annot` / `rh.aparc.annot`.
114
- - Map vertex labels to RGB colors from the annotation color table.
115
- - Export ASCII PLY with per-vertex color fields.
116
-
117
- Typical Python stack:
118
- - `nibabel`
119
- - `numpy`
120
-
121
- Example command pattern:
122
-
123
- ```bash
124
- python skills/brain-visualization/scripts/freesurfer_ply_reference.py \
125
- --surf path/to/lh.pial \
126
- --annot path/to/lh.aparc.annot \
127
- --output outputs/lh_colored.ply
128
- ```
129
-
130
- Recommended outputs:
131
- - left hemisphere colored mesh (`.ply`)
132
- - right hemisphere colored mesh (`.ply`)
133
-
134
- ## Installation
135
-
136
- Install the common visualization dependencies in the existing `neuroclaw` environment:
137
-
138
- ```bash
139
- conda activate neuroclaw
140
- conda install -n neuroclaw -c conda-forge numpy pandas nibabel nilearn matplotlib networkx -y
141
- ```
142
-
143
- Optional packages depending on workflow:
144
-
145
- ```bash
146
- conda install -n neuroclaw -c conda-forge scipy seaborn plotly -y
147
- ```
148
-
149
- If FreeSurfer surface export is needed, ensure FreeSurfer outputs already exist and `nibabel` can access the surface and annotation files.
150
-
151
- ## When to Call This Skill
152
-
153
- - The user has already produced a connectivity matrix and wants a 3D connectome figure.
154
- - The user needs atlas-level summaries of resting-state activation metrics such as zALFF.
155
- - The user wants to export FreeSurfer cortical surfaces into colored 3D meshes.
156
- - The user is preparing figures or supplementary materials for papers, presentations, or reports.
157
-
158
- ## Complementary / Related Skills
159
-
160
- - `fmri-skill` -> preprocessing and fMRI workflow planning
161
- - `nilearn-tool` -> ROI extraction, connectivity computation, seed maps, GLM support
162
- - `freesurfer-tool` -> anatomical reconstruction and parcellation generation
163
- - `paper-writing` -> convert generated figures/tables into manuscript assets
164
-
165
- ## Important Notes & Limitations
166
-
167
- - This skill is for visualization and result packaging, not raw image preprocessing.
168
- - Connectivity figures should usually threshold or sparsify edges; plotting full dense matrices produces unreadable figures.
169
- - Atlas labels, atlas volume, and connectivity matrix dimensions must match.
170
- - MNI-space summary workflows assume the volume has already been aligned or resampled appropriately.
171
- - FreeSurfer colored PLY export depends on valid `.annot` files; missing or mismatched annotations will degrade vertex coloring.
172
-
173
- ## Reference
174
-
175
- This skill is adapted from the visualization ideas and example workflows in:
176
- - rs-fMRI-Pipeline-Tutorial: https://github.com/Karcen/rs-fMRI-Pipeline-Tutorial
177
-
178
- Key referenced methods in the local tutorial copy:
179
- - 3D brain network plotting with AAL atlas and Nilearn
180
- - MNI152 zALFF regional activation ranking
181
- - FreeSurfer colored cortical surface export to PLY
182
-
183
- Curated reference snippets in this skill:
184
- - `skills/brain-visualization/scripts/connectome_reference.py`
185
- - `skills/brain-visualization/scripts/zalff_summary_reference.py`
186
- - `skills/brain-visualization/scripts/freesurfer_ply_reference.py`
187
-
188
- ---
189
- Created At: 2026-04-14 00:15 HKT
190
- Last Updated At: 2026-04-14 00:40 HKT
191
- Author: chengwang96