@brainpilot/skills 0.0.6
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/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +28 -0
- package/dist/index.js.map +1 -0
- package/package.json +35 -0
- package/skills/01_Meta-Skills/contribute-skill/SKILL.md +277 -0
- package/skills/01_Meta-Skills/contribute-skills-via-pr/SKILL.md +163 -0
- package/skills/01_Meta-Skills/paper-to-skill/SKILL.md +435 -0
- package/skills/01_Meta-Skills/paper-to-skill/references/extraction-guide.md +286 -0
- package/skills/01_Meta-Skills/paper-to-skill/references/skill-template.md +250 -0
- package/skills/01_Meta-Skills/repo-to-skill/SKILL.md +289 -0
- package/skills/01_Meta-Skills/share-case/SKILL.md +253 -0
- package/skills/01_Meta-Skills/share-usage/README.md +63 -0
- package/skills/01_Meta-Skills/share-usage/SKILL.md +395 -0
- package/skills/01_Meta-Skills/verify-skill/SKILL.md +331 -0
- package/skills/02_Cross-Domain_Foundation/cogsci-power-analysis/SKILL.md +194 -0
- package/skills/02_Cross-Domain_Foundation/cogsci-power-analysis/references/effect-sizes.md +352 -0
- package/skills/02_Cross-Domain_Foundation/cogsci-power-analysis/references/sample-size-guide.md +407 -0
- package/skills/02_Cross-Domain_Foundation/cogsci-statistics/SKILL.md +361 -0
- package/skills/02_Cross-Domain_Foundation/cogsci-statistics/references/common-analyses.md +517 -0
- package/skills/02_Cross-Domain_Foundation/cogsci-visualization/SKILL.md +292 -0
- package/skills/02_Cross-Domain_Foundation/cogsci-visualization/references/plot-recipes.md +709 -0
- package/skills/02_Cross-Domain_Foundation/research-literacy/SKILL.md +286 -0
- package/skills/02_Cross-Domain_Foundation/research-literacy/references/common-assumptions.md +320 -0
- package/skills/02_Cross-Domain_Foundation/research-literacy/references/planning-template.md +143 -0
- package/skills/03_Cognitive_Psychology/alternative-uses-task-designer/SKILL.md +197 -0
- package/skills/03_Cognitive_Psychology/alternative-uses-task-designer/references/instruction-templates.md +60 -0
- package/skills/03_Cognitive_Psychology/cognitive-paradigm-design/SKILL.md +246 -0
- package/skills/03_Cognitive_Psychology/cognitive-paradigm-design/references/classic-paradigms.md +435 -0
- package/skills/03_Cognitive_Psychology/cognitive-paradigm-design/references/design-principles.md +256 -0
- package/skills/03_Cognitive_Psychology/creativity-self-efficacy-mediation/SKILL.md +270 -0
- package/skills/03_Cognitive_Psychology/creativity-self-efficacy-mediation/references/lavaan-templates.md +172 -0
- package/skills/03_Cognitive_Psychology/divergent-thinking-scoring/SKILL.md +238 -0
- package/skills/03_Cognitive_Psychology/divergent-thinking-scoring/references/scoring-rubric.md +143 -0
- package/skills/03_Cognitive_Psychology/drift-diffusion-model/SKILL.md +203 -0
- package/skills/03_Cognitive_Psychology/drift-diffusion-model/references/fitting-guide.md +571 -0
- package/skills/03_Cognitive_Psychology/drift-diffusion-model/references/model-variants.md +427 -0
- package/skills/03_Cognitive_Psychology/evidence-accumulation-selector/SKILL.md +310 -0
- package/skills/03_Cognitive_Psychology/evidence-accumulation-selector/references/ez-diffusion-formulas.md +137 -0
- package/skills/03_Cognitive_Psychology/signal-detection-analysis/SKILL.md +300 -0
- package/skills/03_Cognitive_Psychology/signal-detection-analysis/references/application-guide.md +278 -0
- package/skills/03_Cognitive_Psychology/signal-detection-analysis/references/sdt-formulas.md +318 -0
- package/skills/03_Cognitive_Psychology/visual-search-array-generator/SKILL.md +283 -0
- package/skills/03_Cognitive_Psychology/visual-search-array-generator/references/array-generation-parameters.yaml +111 -0
- package/skills/04_Psycholinguistics/reading-time-analysis/SKILL.md +301 -0
- package/skills/04_Psycholinguistics/reading-time-analysis/references/measure-computation-guide.md +195 -0
- package/skills/04_Psycholinguistics/self-paced-reading-designer/SKILL.md +257 -0
- package/skills/04_Psycholinguistics/self-paced-reading-designer/references/analysis-guide.md +356 -0
- package/skills/04_Psycholinguistics/self-paced-reading-designer/references/region-segmentation.md +266 -0
- package/skills/04_Psycholinguistics/sentence-stimulus-norming/SKILL.md +346 -0
- package/skills/04_Psycholinguistics/sentence-stimulus-norming/references/lexical-databases-guide.md +184 -0
- package/skills/05_EEG_ERP/eeg-paradigm-designer/SKILL.md +226 -0
- package/skills/05_EEG_ERP/eeg-paradigm-designer/references/component-paradigm-map.md +276 -0
- package/skills/05_EEG_ERP/eeg-paradigm-designer/references/timing-parameters.md +244 -0
- package/skills/05_EEG_ERP/eeg-preprocessing-pipeline-guide/SKILL.md +367 -0
- package/skills/05_EEG_ERP/eeg-preprocessing-pipeline-guide/references/parameter-lookup-tables.md +138 -0
- package/skills/05_EEG_ERP/erp-analysis/SKILL.md +185 -0
- package/skills/05_EEG_ERP/erp-analysis/references/erp-components.md +447 -0
- package/skills/05_EEG_ERP/erp-analysis/references/preprocessing-pipeline.md +277 -0
- package/skills/05_EEG_ERP/erp-analysis/references/statistical-approaches.md +351 -0
- package/skills/05_EEG_ERP/mne-python-guide/SKILL.md +174 -0
- package/skills/05_EEG_ERP/mne-python-guide/references/decoding.md +178 -0
- package/skills/05_EEG_ERP/mne-python-guide/references/io_formats.md +160 -0
- package/skills/05_EEG_ERP/mne-python-guide/references/preprocessing.md +259 -0
- package/skills/05_EEG_ERP/mne-python-guide/references/simulation.md +173 -0
- package/skills/05_EEG_ERP/mne-python-guide/references/source_localization.md +234 -0
- package/skills/05_EEG_ERP/mne-python-guide/references/statistics.md +196 -0
- package/skills/05_EEG_ERP/mne-python-guide/references/time_frequency.md +165 -0
- package/skills/05_EEG_ERP/mne-python-guide/references/visualization.md +175 -0
- package/skills/06_fMRI_Neuroimaging/brain-connectivity-modeler/SKILL.md +317 -0
- package/skills/06_fMRI_Neuroimaging/brain-connectivity-modeler/references/method-implementation-guide.md +116 -0
- package/skills/06_fMRI_Neuroimaging/fmri-glm-analysis-guide/SKILL.md +296 -0
- package/skills/06_fMRI_Neuroimaging/fmri-glm-analysis-guide/references/design-matrix-guide.md +214 -0
- package/skills/06_fMRI_Neuroimaging/fmri-glm-analysis-guide/references/statistical-inference.md +288 -0
- package/skills/06_fMRI_Neuroimaging/fmri-preprocessing-pipeline-guide/SKILL.md +274 -0
- package/skills/06_fMRI_Neuroimaging/fmri-preprocessing-pipeline-guide/references/quality-control.md +336 -0
- package/skills/06_fMRI_Neuroimaging/fmri-preprocessing-pipeline-guide/references/step-by-step-pipeline.md +380 -0
- package/skills/06_fMRI_Neuroimaging/fmri-task-design-guide/SKILL.md +264 -0
- package/skills/06_fMRI_Neuroimaging/fmri-task-design-guide/references/design-optimization-examples.md +114 -0
- package/skills/06_fMRI_Neuroimaging/neural-decoding-analysis/SKILL.md +273 -0
- package/skills/06_fMRI_Neuroimaging/neural-decoding-analysis/references/decoding-methods.md +170 -0
- package/skills/06_fMRI_Neuroimaging/neural-decoding-analysis/references/rsa-guide.md +266 -0
- package/skills/06_fMRI_Neuroimaging/pycortex-guide/SKILL.md +123 -0
- package/skills/06_fMRI_Neuroimaging/pycortex-guide/references/database-subjects.md +179 -0
- package/skills/06_fMRI_Neuroimaging/pycortex-guide/references/dataset-types.md +208 -0
- package/skills/06_fMRI_Neuroimaging/pycortex-guide/references/freesurfer-fmriprep.md +162 -0
- package/skills/06_fMRI_Neuroimaging/pycortex-guide/references/mapping-transforms.md +181 -0
- package/skills/06_fMRI_Neuroimaging/pycortex-guide/references/mni-utils.md +207 -0
- package/skills/06_fMRI_Neuroimaging/pycortex-guide/references/surface-analysis.md +219 -0
- package/skills/06_fMRI_Neuroimaging/pycortex-guide/references/visualization.md +251 -0
- package/skills/07_Computational_Modeling/act-r-model-builder/SKILL.md +297 -0
- package/skills/07_Computational_Modeling/act-r-model-builder/references/model-patterns.md +197 -0
- package/skills/07_Computational_Modeling/act-r-model-builder/references/parameter-table.yaml +204 -0
- package/skills/07_Computational_Modeling/bayesian-cognitive-model-builder/SKILL.md +294 -0
- package/skills/07_Computational_Modeling/bayesian-cognitive-model-builder/references/diagnostics-checklist.md +351 -0
- package/skills/07_Computational_Modeling/bayesian-cognitive-model-builder/references/prior-selection-guide.md +241 -0
- package/skills/07_Computational_Modeling/parameter-recovery-checker/SKILL.md +269 -0
- package/skills/07_Computational_Modeling/parameter-recovery-checker/references/recovery-diagnostics.md +207 -0
- package/skills/08_Computational_Neuroscience/brain-connectivity-modeler/SKILL.md +317 -0
- package/skills/08_Computational_Neuroscience/brain-connectivity-modeler/references/method-implementation-guide.md +116 -0
- package/skills/08_Computational_Neuroscience/neural-decoding-analysis/SKILL.md +273 -0
- package/skills/08_Computational_Neuroscience/neural-decoding-analysis/references/decoding-methods.md +170 -0
- package/skills/08_Computational_Neuroscience/neural-decoding-analysis/references/rsa-guide.md +266 -0
- package/skills/08_Computational_Neuroscience/neural-population-analysis-guide/SKILL.md +305 -0
- package/skills/08_Computational_Neuroscience/neural-population-analysis-guide/references/data-requirements.md +60 -0
- package/skills/08_Computational_Neuroscience/neural-population-analysis-guide/references/method-comparison.md +151 -0
- package/skills/08_Computational_Neuroscience/spiking-network-model-builder/SKILL.md +376 -0
- package/skills/08_Computational_Neuroscience/spiking-network-model-builder/references/hh-parameters.md +117 -0
- package/skills/08_Computational_Neuroscience/spiking-network-model-builder/references/network-regimes.md +130 -0
- package/skills/09_Cellular_Molecular_Neuroscience/calcium-imaging-analysis-guide/SKILL.md +258 -0
- package/skills/09_Cellular_Molecular_Neuroscience/calcium-imaging-analysis-guide/references/indicator-parameters.md +242 -0
- package/skills/09_Cellular_Molecular_Neuroscience/calcium-imaging-analysis-guide/references/pipeline-details.md +211 -0
- package/skills/09_Cellular_Molecular_Neuroscience/optogenetics-protocol-designer/SKILL.md +261 -0
- package/skills/09_Cellular_Molecular_Neuroscience/optogenetics-protocol-designer/references/opsin-catalog.md +124 -0
- package/skills/09_Cellular_Molecular_Neuroscience/optogenetics-protocol-designer/references/stimulation-parameters.md +304 -0
- package/skills/10_Clinical_Neuropsychology/lesion-symptom-mapping-guide/SKILL.md +367 -0
- package/skills/10_Clinical_Neuropsychology/lesion-symptom-mapping-guide/references/disconnection-guide.md +152 -0
- package/skills/10_Clinical_Neuropsychology/lesion-symptom-mapping-guide/references/vlsm-pipeline.md +182 -0
- package/skills/10_Clinical_Neuropsychology/neuropsych-battery-selector/SKILL.md +250 -0
- package/skills/10_Clinical_Neuropsychology/neuropsych-battery-selector/references/deficit-profiles.md +302 -0
- package/skills/10_Clinical_Neuropsychology/neuropsych-battery-selector/references/test-catalog.md +304 -0
- package/skills/11_Developmental_Cognition/infant-looking-time-designer/SKILL.md +345 -0
- package/skills/11_Developmental_Cognition/infant-looking-time-designer/references/age-parameters.yaml +186 -0
- package/skills/12_Social_Cognition/tom-task-selector/SKILL.md +379 -0
- package/skills/12_Social_Cognition/tom-task-selector/references/task-database.md +317 -0
- package/skills/13_Visualization/nature-figure/README.md +442 -0
- package/skills/13_Visualization/nature-figure/SKILL.md +60 -0
- package/skills/13_Visualization/nature-figure/assets/chart-atlas/atlas-01-bar-charts.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/chart-atlas/atlas-02-line-trends.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/chart-atlas/atlas-03-heatmaps.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/chart-atlas/atlas-04-scatter-bubble.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/chart-atlas/atlas-05-radar-polar.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/chart-atlas/atlas-06-distributions.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/chart-atlas/atlas-07-forest-interval.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/chart-atlas/atlas-08-area-stacked.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/chart-atlas/atlas-09-image-plates.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/chart-atlas/atlas-10-network-matrix.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/assets/Dispersion_motivation.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/assets/Dispersion_observation.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/assets/Dispersion_observation_distillation.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/assets/ImmunoStruct_contrastive.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/assets/ImmunoStruct_results_CEDAR.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/assets/ImmunoStruct_results_IEDB.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/assets/ImmunoStruct_schematic.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/assets/RNAGenScape_schematic.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_CellSpliceNet/figures/ablation.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_CellSpliceNet/figures/comparison.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_CellSpliceNet/plot_ablation.py +86 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_CellSpliceNet/plot_comparison.py +109 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_Cflows/diffusion_swiss_roll.py +97 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_Cflows/figures/diffusion_swiss_roll.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_Cflows/figures/fig2_comparison_GeneRegulatory.pdf +0 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_Cflows/figures/fig2_comparison_GeneRegulatory.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_Cflows/figures/fig2_comparison_Trajectory.pdf +0 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_Cflows/figures/fig2_comparison_Trajectory.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_Cflows/figures/figX_comparison_Ablation.pdf +0 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_Cflows/figures/figX_comparison_Ablation.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_Cflows/plot_comparison_Ablation.py +64 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_Cflows/plot_comparison_GeneRegulatory.py +74 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_Cflows/plot_comparison_Trajectory.py +74 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_Dispersion/figures/idea.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_Dispersion/figures/illustration.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_Dispersion/plot_idea.py +76 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_Dispersion/plot_illustration.py +404 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_FPGM/figures/freq_prior.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_FPGM/plot_freq_prior.py +146 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_ImmunoStruct/figures/bars_ablation_Cancer.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_ImmunoStruct/figures/bars_ablation_IEDB.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_ImmunoStruct/figures/bars_comparison_Cancer.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_ImmunoStruct/figures/bars_comparison_IEDB.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_ImmunoStruct/plot_bars.py +216 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_ImmunoStruct/raw_data.py +125 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_RNAGenScape/figures/manifold.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_RNAGenScape/figures/manifold_holes.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_RNAGenScape/figures/results_comparison_optimization.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_RNAGenScape/figures/results_comparison_speed.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_RNAGenScape/figures/results_sweep.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_RNAGenScape/plot_comparison.py +228 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_RNAGenScape/plot_hole_manifold.py +82 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_RNAGenScape/plot_manifold.py +61 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_RNAGenScape/plot_sweep.py +77 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_VIGIL/figures/comparison_posttraining.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_VIGIL/figures/comparison_radar.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_VIGIL/plot_comparison_radar.py +173 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_VIGIL/plot_posttraining.py +82 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_brainteaser/figures/brute_force.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_brainteaser/figures/correctness_by_category.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_brainteaser/figures/correctness_by_subcategory.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_brainteaser/figures/rewriting.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_brainteaser/figures/selfcorrection_math.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_brainteaser/plot_brute_force.py +248 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_brainteaser/plot_correctness_by_category.py +132 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_brainteaser/plot_correctness_by_subcategory.py +131 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_brainteaser/plot_rewriting.py +105 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_brainteaser/plot_selfcorrection_math.py +99 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_ophthal_review/figures/composition_heatmap.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_ophthal_review/figures/trend_by_month.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_ophthal_review/plot_composition.py +81 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_ophthal_review/plot_trend.py +125 -0
- package/skills/13_Visualization/nature-figure/assets/gallery/fig1-material-mechanism-rich.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/gallery/fig2-spatial-imaging-rich.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/gallery/fig3-in-vivo-efficacy-rich.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/gallery/fig4-single-cell-systems-rich.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/gallery/fig5-validation-perturbation-rich.png +0 -0
- package/skills/13_Visualization/nature-figure/evals/evals.json +37 -0
- package/skills/13_Visualization/nature-figure/manifest.yaml +57 -0
- package/skills/13_Visualization/nature-figure/references/api.md +428 -0
- package/skills/13_Visualization/nature-figure/references/backend-selection.md +100 -0
- package/skills/13_Visualization/nature-figure/references/chart-types.md +281 -0
- package/skills/13_Visualization/nature-figure/references/common-patterns.md +350 -0
- package/skills/13_Visualization/nature-figure/references/demos.md +65 -0
- package/skills/13_Visualization/nature-figure/references/design-theory.md +436 -0
- package/skills/13_Visualization/nature-figure/references/figure-contract.md +93 -0
- package/skills/13_Visualization/nature-figure/references/nature-2026-observations.md +112 -0
- package/skills/13_Visualization/nature-figure/references/qa-contract.md +119 -0
- package/skills/13_Visualization/nature-figure/references/r-template-index.md +66 -0
- package/skills/13_Visualization/nature-figure/references/r-workflow.md +161 -0
- package/skills/13_Visualization/nature-figure/references/tutorials.md +251 -0
- package/skills/13_Visualization/nature-figure/static/core/contract.md +29 -0
- package/skills/13_Visualization/nature-figure/static/core/stance.md +37 -0
- package/skills/13_Visualization/nature-figure/static/fragments/backend/python.md +37 -0
- package/skills/13_Visualization/nature-figure/static/fragments/backend/r.md +44 -0
- package/skills/14_Writing/markdown-report-writing/SKILL.md +306 -0
- package/skills/14_Writing/markdown-report-writing/references/compatibility-matrix.md +72 -0
- package/skills/14_Writing/markdown-report-writing/references/templates.md +299 -0
- package/skills/15_Others/neuroimaging-power-guide/SKILL.md +324 -0
- package/skills/15_Others/neuroimaging-power-guide/references/effect-size-lookup-tables.md +102 -0
- package/skills/15_Others/neuroimaging-sample-size-calculator/SKILL.md +330 -0
- package/skills/15_Others/neuroimaging-sample-size-calculator/references/worked-examples.md +220 -0
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
# Backend Selection
|
|
2
|
+
|
|
3
|
+
At the start of a figure task, ask the user to choose **Python or R** if they have
|
|
4
|
+
not already specified a backend. This is a blocking gate: stop after asking and wait
|
|
5
|
+
for the user's answer. Do not infer Python just because the task involves simulation,
|
|
6
|
+
NumPy-like data, or custom layout, and do not infer R just because the task is biological
|
|
7
|
+
or omics-adjacent.
|
|
8
|
+
|
|
9
|
+
Use the decision table only in either of these cases:
|
|
10
|
+
|
|
11
|
+
- the user explicitly asks you to recommend or choose the backend;
|
|
12
|
+
- the user provides an unambiguous language-specific workflow or file, such as an `.R`
|
|
13
|
+
script, RDS object, Python notebook, or existing Python plotting code.
|
|
14
|
+
|
|
15
|
+
## Quick decision table
|
|
16
|
+
|
|
17
|
+
| Recommend R when | Recommend Python when |
|
|
18
|
+
|---|---|
|
|
19
|
+
| The user brings R scripts, RData/RDS, Seurat objects, DESeq2/limma outputs, survival models, or ggplot templates | The data pipeline is already Python, NumPy/Pandas arrays, PyTorch/TensorFlow outputs, image arrays, or simulation output |
|
|
20
|
+
| The target plot is `ggplot2`, `patchwork`, `ComplexHeatmap`, `ggtree`, `circlize`, `survminer`, `maftools`, or Seurat/UMAP-heavy | The target plot needs low-level custom layout, Matplotlib patches, image plates, subplot mosaics, or custom drawing primitives |
|
|
21
|
+
| The user provides an R template collection or an existing R plotting workflow | The user wants a self-contained script with matplotlib/seaborn/statsmodels and no R dependency |
|
|
22
|
+
| Heatmap annotations are biologically rich and multi-layered | Image panels and quantitative panels need tight pixel/axis control |
|
|
23
|
+
|
|
24
|
+
If either backend can do the job, honor the user's preference. Do not switch
|
|
25
|
+
backends for aesthetics alone.
|
|
26
|
+
|
|
27
|
+
## Backend exclusivity rule
|
|
28
|
+
|
|
29
|
+
Backend choice is not just a syntax preference; it defines the graphics engine for
|
|
30
|
+
the entire deliverable. Once Python or R has been selected, use that backend for
|
|
31
|
+
all of the following:
|
|
32
|
+
|
|
33
|
+
- plotting scripts;
|
|
34
|
+
- mock/simulated data examples that include plotting;
|
|
35
|
+
- preview PNG/TIFF files;
|
|
36
|
+
- SVG/PDF/TIFF exports;
|
|
37
|
+
- visual QA renders and final layout checks.
|
|
38
|
+
|
|
39
|
+
Do not generate a substitute preview or export with the non-selected backend. For
|
|
40
|
+
example, if the user selected R and `Rscript` is missing, do not use Python/matplotlib
|
|
41
|
+
to approximate the figure. If the user selected Python and `matplotlib` or another
|
|
42
|
+
required Python plotting package is missing, do not use R/ggplot2/ComplexHeatmap to
|
|
43
|
+
approximate the figure. Stop, report the selected-backend blocker, and provide the
|
|
44
|
+
selected-backend script plus install/run instructions or request permission to install
|
|
45
|
+
the selected-backend dependencies.
|
|
46
|
+
|
|
47
|
+
The non-selected language is allowed only for non-visual utility work, such as
|
|
48
|
+
listing files, checking CSV dimensions, decompressing an archive, or converting a
|
|
49
|
+
data file before the selected backend draws the figure. It must not import plotting
|
|
50
|
+
libraries, open graphics devices, save image/vector files, or decide visual layout.
|
|
51
|
+
|
|
52
|
+
## Default stacks
|
|
53
|
+
|
|
54
|
+
### R
|
|
55
|
+
|
|
56
|
+
- Core plotting: `ggplot2`
|
|
57
|
+
- Multi-panel assembly: `patchwork`
|
|
58
|
+
- Heatmaps: `ComplexHeatmap`, `circlize`
|
|
59
|
+
- Direct labels: `ggrepel`
|
|
60
|
+
- Survival/clinical: `survival`, `survminer`, `forestplot`, `ggplot2`
|
|
61
|
+
- Single-cell/omics: `Seurat`, `SingleCellExperiment`, `ComplexHeatmap`, `ggtree`
|
|
62
|
+
- Export: `svglite`, `grDevices::cairo_pdf`, `ragg`
|
|
63
|
+
|
|
64
|
+
### Python
|
|
65
|
+
|
|
66
|
+
- Core plotting: `matplotlib`
|
|
67
|
+
- Statistical plots: `seaborn`
|
|
68
|
+
- Layout: `subplot_mosaic`, `GridSpec`
|
|
69
|
+
- Tables/model output: `pandas`, `numpy`, `statsmodels`
|
|
70
|
+
- Images: `matplotlib.imshow`, `skimage`, `tifffile` when needed
|
|
71
|
+
- Export: `fig.savefig(... .svg/.pdf/.tiff)`, `svg.fonttype='none'`,
|
|
72
|
+
`pdf.fonttype=42`
|
|
73
|
+
|
|
74
|
+
## Mixed workflow rule
|
|
75
|
+
|
|
76
|
+
Use the selected plotting backend for final assembly and all visual output. A mixed
|
|
77
|
+
workflow is reasonable only when the non-selected language performs non-visual data
|
|
78
|
+
preparation and the selected backend assembles the figure. In that case:
|
|
79
|
+
|
|
80
|
+
1. Export clean source data as CSV/TSV with stable column names.
|
|
81
|
+
2. Assemble the final figure in the selected backend.
|
|
82
|
+
3. Keep the source-data file next to the plotting script.
|
|
83
|
+
4. Do not stitch, preview, QA-render, or export final image/vector outputs from the
|
|
84
|
+
non-selected backend unless the user explicitly changes the selected backend.
|
|
85
|
+
|
|
86
|
+
## Recommendation language
|
|
87
|
+
|
|
88
|
+
Use direct language:
|
|
89
|
+
|
|
90
|
+
```text
|
|
91
|
+
For this figure I recommend R because the main burden is ComplexHeatmap-style
|
|
92
|
+
omics annotation and patchwork assembly. I will still keep the export contract
|
|
93
|
+
SVG/PDF/TIFF with editable text.
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
```text
|
|
97
|
+
For this figure I recommend Python because the key panel is a custom image plate
|
|
98
|
+
with quantitative overlays and a subplot_mosaic layout. Matplotlib gives tighter
|
|
99
|
+
control over the raster and vector layers.
|
|
100
|
+
```
|
|
@@ -0,0 +1,281 @@
|
|
|
1
|
+
# Chart Types — Nature Figure Making
|
|
2
|
+
|
|
3
|
+
Specialized chart patterns beyond basic bars and trends.
|
|
4
|
+
Each section includes the key code pattern extracted from production scripts.
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## Radar / Polar Chart
|
|
9
|
+
|
|
10
|
+
Used when comparing multiple methods across many benchmarks simultaneously.
|
|
11
|
+
|
|
12
|
+
```python
|
|
13
|
+
import numpy as np
|
|
14
|
+
import matplotlib.pyplot as plt
|
|
15
|
+
|
|
16
|
+
def plot_radar(methods, colors, subtask_names, value_matrix,
|
|
17
|
+
benchmark_radii, display_range=(45, 90)):
|
|
18
|
+
"""
|
|
19
|
+
Parameters
|
|
20
|
+
----------
|
|
21
|
+
methods : list[str] — one curve per method
|
|
22
|
+
colors : list[str]
|
|
23
|
+
subtask_names : list[str] — one spoke per subtask (may contain '\\n')
|
|
24
|
+
value_matrix : np.ndarray — shape (n_subtasks, n_methods)
|
|
25
|
+
benchmark_radii: dict — {benchmark_name: [tick1, tick2, ...]} for normalization
|
|
26
|
+
display_range : (r_min, r_max) — polar radial display window
|
|
27
|
+
"""
|
|
28
|
+
r_lo, r_hi = display_range
|
|
29
|
+
n_subtasks = len(subtask_names)
|
|
30
|
+
n_methods = len(methods)
|
|
31
|
+
|
|
32
|
+
fig = plt.figure(figsize=(12, 10))
|
|
33
|
+
ax = fig.add_subplot(111, projection='polar')
|
|
34
|
+
|
|
35
|
+
# Evenly spaced angles, clockwise from top
|
|
36
|
+
angles = np.linspace(2 * np.pi, 0, n_subtasks, endpoint=False)
|
|
37
|
+
angles_closed = np.append(angles, angles[0])
|
|
38
|
+
|
|
39
|
+
def _normalize(val, bench):
|
|
40
|
+
radii_list = benchmark_radii.get(bench, [0, 100])
|
|
41
|
+
span = max(radii_list) - min(radii_list)
|
|
42
|
+
if span <= 0:
|
|
43
|
+
return (r_lo + r_hi) / 2
|
|
44
|
+
frac = np.clip((val - min(radii_list)) / span, 0, 1)
|
|
45
|
+
return r_lo + (r_hi - r_lo) * frac
|
|
46
|
+
|
|
47
|
+
subtask_benchmarks = [s.split('\\n', 1)[-1] if '\\n' in s else s
|
|
48
|
+
for s in subtask_names]
|
|
49
|
+
|
|
50
|
+
# Draw data polygons
|
|
51
|
+
for m in range(n_methods):
|
|
52
|
+
norm_vals = np.array([_normalize(value_matrix[i, m], subtask_benchmarks[i])
|
|
53
|
+
for i in range(n_subtasks)])
|
|
54
|
+
closed = np.append(norm_vals, norm_vals[0])
|
|
55
|
+
ax.plot(angles_closed, closed, color=colors[m], lw=2, label=methods[m])
|
|
56
|
+
ax.fill(angles_closed, closed, color=colors[m], alpha=0.05)
|
|
57
|
+
ax.scatter(angles, norm_vals, color=colors[m], s=18, zorder=5)
|
|
58
|
+
|
|
59
|
+
# Style
|
|
60
|
+
ax.set_ylim(r_lo, r_hi)
|
|
61
|
+
ax.set_theta_zero_location('N')
|
|
62
|
+
for spine in ax.spines.values():
|
|
63
|
+
spine.set_visible(False)
|
|
64
|
+
ax.grid(False)
|
|
65
|
+
|
|
66
|
+
# Outer boundary ring
|
|
67
|
+
ax.plot(angles_closed, np.full_like(angles_closed, r_hi),
|
|
68
|
+
color='k', lw=0.8, zorder=4)
|
|
69
|
+
|
|
70
|
+
# Radial spokes
|
|
71
|
+
for a in angles:
|
|
72
|
+
ax.plot([a, a], [r_lo, r_hi], color='gray', lw=0.5, zorder=4)
|
|
73
|
+
|
|
74
|
+
# Benchmark-level contour polygons
|
|
75
|
+
max_levels = max(len(v) for v in benchmark_radii.values())
|
|
76
|
+
for k in range(max_levels):
|
|
77
|
+
disp = np.array([_normalize(benchmark_radii.get(b, [0,100])[
|
|
78
|
+
min(k, len(benchmark_radii.get(b,[0,100]))-1)], b)
|
|
79
|
+
for b in subtask_benchmarks])
|
|
80
|
+
ax.plot(angles_closed, np.append(disp, disp[0]),
|
|
81
|
+
color='k', lw=0.6, zorder=4)
|
|
82
|
+
|
|
83
|
+
ax.set_yticks([r_hi])
|
|
84
|
+
ax.set_yticklabels([])
|
|
85
|
+
ax.set_xticks(angles)
|
|
86
|
+
ax.set_xticklabels([])
|
|
87
|
+
|
|
88
|
+
# Spoke labels (outside outer ring)
|
|
89
|
+
for angle, label in zip(angles, subtask_names):
|
|
90
|
+
r_label = r_hi + 8 + 10 * abs(np.sin(angle))
|
|
91
|
+
ax.text(angle, r_label, label, fontsize=14,
|
|
92
|
+
ha='center', va='center',
|
|
93
|
+
transform=ax.transData, clip_on=False)
|
|
94
|
+
|
|
95
|
+
ax.legend(loc='upper right', bbox_to_anchor=(1.40, 0.05),
|
|
96
|
+
fontsize=15, frameon=False)
|
|
97
|
+
return fig, ax
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
**Key settings:**
|
|
101
|
+
- `ax.set_theta_zero_location('N')` — top-start convention
|
|
102
|
+
- Remove all default spines/grid; draw custom spokes + contour polygons manually
|
|
103
|
+
- Normalize each spoke independently using per-benchmark tick lists
|
|
104
|
+
- Legend placed **outside** the plot at `bbox_to_anchor=(1.40, 0.05)`
|
|
105
|
+
|
|
106
|
+
---
|
|
107
|
+
|
|
108
|
+
## 3D Sphere / Conceptual Illustration
|
|
109
|
+
|
|
110
|
+
Used for geometric conceptual diagrams (e.g., embedding space visualization).
|
|
111
|
+
|
|
112
|
+
```python
|
|
113
|
+
import numpy as np
|
|
114
|
+
import matplotlib.pyplot as plt
|
|
115
|
+
|
|
116
|
+
def draw_shaded_sphere(ax, light_dir=(-0.5, 0.5, 0.8),
|
|
117
|
+
resolution=512, alpha=1.0,
|
|
118
|
+
extent=(-1, 1, -1, 1)):
|
|
119
|
+
"""Draw a 2D shaded disk that mimics a 3D sphere using ray-casting."""
|
|
120
|
+
xs = np.linspace(extent[0], extent[1], resolution)
|
|
121
|
+
ys = np.linspace(extent[2], extent[3], resolution)
|
|
122
|
+
x, y = np.meshgrid(xs, ys)
|
|
123
|
+
r2 = x**2 + y**2
|
|
124
|
+
mask = r2 <= 1.0
|
|
125
|
+
|
|
126
|
+
z = np.zeros_like(x)
|
|
127
|
+
z[mask] = np.sqrt(1.0 - r2[mask])
|
|
128
|
+
|
|
129
|
+
# Surface normals
|
|
130
|
+
nx, ny, nz = x.copy(), y.copy(), z.copy()
|
|
131
|
+
nrm = np.sqrt(nx**2 + ny**2 + nz**2) + 1e-6
|
|
132
|
+
nx, ny, nz = nx/nrm, ny/nrm, nz/nrm
|
|
133
|
+
|
|
134
|
+
# Lambertian shading
|
|
135
|
+
ld = np.array(light_dir, dtype=float)
|
|
136
|
+
ld /= np.linalg.norm(ld)
|
|
137
|
+
intensity = np.maximum(0, nx*ld[0] + ny*ld[1] + nz*ld[2])
|
|
138
|
+
|
|
139
|
+
img = np.ones_like(x)
|
|
140
|
+
img[mask] = np.clip(0.2 + 0.9 * intensity[mask], 0, 1)
|
|
141
|
+
|
|
142
|
+
ax.imshow(img, cmap='gray',
|
|
143
|
+
extent=list(extent),
|
|
144
|
+
vmin=0, vmax=1, alpha=alpha)
|
|
145
|
+
ax.set_axis_off()
|
|
146
|
+
return ax
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
def plot_3d_scatter_with_arrows(ax, points, grad_vectors,
|
|
150
|
+
point_color='#0c2458', arrow_color='#b64342'):
|
|
151
|
+
"""3D scatter plot with gradient arrow annotations."""
|
|
152
|
+
from mpl_toolkits.mplot3d import proj3d
|
|
153
|
+
from matplotlib.patches import FancyArrowPatch
|
|
154
|
+
|
|
155
|
+
class Arrow3D(FancyArrowPatch):
|
|
156
|
+
def __init__(self, xs, ys, zs, *args, **kwargs):
|
|
157
|
+
super().__init__((0,0), (0,0), *args, **kwargs)
|
|
158
|
+
self._verts3d = xs, ys, zs
|
|
159
|
+
def do_3d_projection(self, renderer=None):
|
|
160
|
+
xs, ys, zs = proj3d.proj_transform(*self._verts3d, self.axes.get_proj())
|
|
161
|
+
self.set_positions((xs[0], ys[0]), (xs[1], ys[1]))
|
|
162
|
+
return np.min(zs)
|
|
163
|
+
|
|
164
|
+
ax.scatter(points[:, 0], points[:, 1], points[:, 2],
|
|
165
|
+
s=80, color=point_color, alpha=0.5)
|
|
166
|
+
for p, g in zip(points, grad_vectors):
|
|
167
|
+
arrow = Arrow3D([p[0], p[0]+g[0]], [p[1], p[1]+g[1]], [p[2], p[2]+g[2]],
|
|
168
|
+
mutation_scale=16, lw=4, arrowstyle='->',
|
|
169
|
+
color=arrow_color, alpha=0.8)
|
|
170
|
+
ax.add_artist(arrow)
|
|
171
|
+
|
|
172
|
+
# Clean 3D axes
|
|
173
|
+
ax.grid(False)
|
|
174
|
+
ax.xaxis.pane.set_visible(False)
|
|
175
|
+
ax.yaxis.pane.set_visible(False)
|
|
176
|
+
ax.zaxis.pane.set_visible(False)
|
|
177
|
+
ax.set_xticks([])
|
|
178
|
+
ax.set_yticks([])
|
|
179
|
+
ax.set_zticks([])
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
---
|
|
183
|
+
|
|
184
|
+
## Scatter Plot with Color-Coded Clusters
|
|
185
|
+
|
|
186
|
+
```python
|
|
187
|
+
def make_scatter(ax, x, y, labels_or_colors,
|
|
188
|
+
size=50, alpha=0.7, edgecolors='none'):
|
|
189
|
+
"""Single or multi-cluster scatter."""
|
|
190
|
+
import numpy as np
|
|
191
|
+
ax.scatter(x, y, c=labels_or_colors, s=size,
|
|
192
|
+
alpha=alpha, edgecolors=edgecolors)
|
|
193
|
+
ax.set_axis_off() # for conceptual diagrams; remove for data plots
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
---
|
|
197
|
+
|
|
198
|
+
## Fill-Between Area Chart (Stacked trend)
|
|
199
|
+
|
|
200
|
+
Used for cumulative publication counts, stacked contributions, etc.
|
|
201
|
+
|
|
202
|
+
```python
|
|
203
|
+
# Filled area (stacked) with hatch for print safety
|
|
204
|
+
ax.fill_between(x, 0, y_bottom,
|
|
205
|
+
color='#ffa8a6', label='Category A')
|
|
206
|
+
ax.fill_between(x, 0, y_top,
|
|
207
|
+
color='#9BC8FA',
|
|
208
|
+
hatch='///', # hatch for grayscale print
|
|
209
|
+
edgecolor='black',
|
|
210
|
+
label='Category B')
|
|
211
|
+
# Erase border artifacts
|
|
212
|
+
ax.fill_between(x, 0, y_top,
|
|
213
|
+
facecolor='none',
|
|
214
|
+
edgecolor='white',
|
|
215
|
+
linewidth=2)
|
|
216
|
+
|
|
217
|
+
# Overlay the trend line for exact values
|
|
218
|
+
ax.plot(x, y_top, lw=3, color='#13457E')
|
|
219
|
+
ax.plot(x, y_bottom, lw=3, color='#850c0a')
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
---
|
|
223
|
+
|
|
224
|
+
## Log-Scale Bar Chart
|
|
225
|
+
|
|
226
|
+
```python
|
|
227
|
+
ax.set_yscale('log')
|
|
228
|
+
ymin, ymax = ax.get_ylim()
|
|
229
|
+
ax.set_ylim(ymin, ymax * 20) # expand top for annotations
|
|
230
|
+
|
|
231
|
+
# Annotate values above bars
|
|
232
|
+
for i, val in enumerate(values):
|
|
233
|
+
ax.text(i, val * 1.1, f'{val:.3f}',
|
|
234
|
+
ha='center', va='bottom', fontsize=16)
|
|
235
|
+
```
|
|
236
|
+
|
|
237
|
+
---
|
|
238
|
+
|
|
239
|
+
## GridSpec Multi-Panel Layout
|
|
240
|
+
|
|
241
|
+
```python
|
|
242
|
+
from matplotlib import gridspec
|
|
243
|
+
|
|
244
|
+
# 2-row, 4-column layout
|
|
245
|
+
fig = plt.figure(figsize=(36, 12))
|
|
246
|
+
gs = gridspec.GridSpec(2, 4)
|
|
247
|
+
|
|
248
|
+
ax_top_left = fig.add_subplot(gs[0, 0])
|
|
249
|
+
ax_top_right = fig.add_subplot(gs[0, 1:3]) # span columns 1-2
|
|
250
|
+
ax_legend = fig.add_subplot(gs[0, 3]) # legend panel
|
|
251
|
+
ax_bottom = fig.add_subplot(gs[1, :]) # full-width bottom
|
|
252
|
+
```
|
|
253
|
+
|
|
254
|
+
---
|
|
255
|
+
|
|
256
|
+
## Scientific Notation on Y-Axis
|
|
257
|
+
|
|
258
|
+
```python
|
|
259
|
+
ax.ticklabel_format(axis='y', style='sci', scilimits=(0, 0))
|
|
260
|
+
```
|
|
261
|
+
|
|
262
|
+
---
|
|
263
|
+
|
|
264
|
+
## Custom Spine Positioning
|
|
265
|
+
|
|
266
|
+
```python
|
|
267
|
+
# Move bottom spine to y=0 (for negative values)
|
|
268
|
+
ax.spines['bottom'].set_position(('data', 0))
|
|
269
|
+
ax.xaxis.set_ticks_position('bottom')
|
|
270
|
+
ax.spines['left'].set_bounds(0, y_max)
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
---
|
|
274
|
+
|
|
275
|
+
## Related files
|
|
276
|
+
|
|
277
|
+
- [SKILL.md](../SKILL.md) — When to use this skill
|
|
278
|
+
- [api.md](api.md) — PALETTE and core helper signatures
|
|
279
|
+
- [common-patterns.md](common-patterns.md) — Bar, trend, and layout patterns
|
|
280
|
+
- [design-theory.md](design-theory.md) — Rationale and color theory
|
|
281
|
+
- [tutorials.md](tutorials.md) — Full end-to-end walkthroughs
|