immunopipe 2.6.1__tar.gz → 2.6.2__tar.gz

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 (233) hide show
  1. {immunopipe-2.6.1 → immunopipe-2.6.2}/.github/workflows/build.yml +23 -10
  2. immunopipe-2.6.2/.github/workflows/install-matrix.yml.disabled +585 -0
  3. immunopipe-2.6.2/.github/workflows/repro-docker-invocation.yml.disabled +100 -0
  4. {immunopipe-2.6.1 → immunopipe-2.6.2}/PKG-INFO +1 -1
  5. {immunopipe-2.6.1 → immunopipe-2.6.2}/docs/CHANGELOG.md +19 -0
  6. immunopipe-2.6.2/docs/ai-chat.md +31 -0
  7. {immunopipe-2.6.1 → immunopipe-2.6.2}/docs/faq.md +8 -0
  8. {immunopipe-2.6.1 → immunopipe-2.6.2}/docs/getting-started.md +7 -2
  9. {immunopipe-2.6.1 → immunopipe-2.6.2}/docs/installation.md +34 -5
  10. {immunopipe-2.6.1 → immunopipe-2.6.2}/docs/mcp-server.md +68 -16
  11. {immunopipe-2.6.1 → immunopipe-2.6.2}/docs/processes/CDR3AAPhyschem.md +16 -0
  12. {immunopipe-2.6.1 → immunopipe-2.6.2}/docs/processes/CDR3Clustering.md +16 -0
  13. {immunopipe-2.6.1 → immunopipe-2.6.2}/docs/processes/CellCellCommunication.md +16 -0
  14. {immunopipe-2.6.1 → immunopipe-2.6.2}/docs/processes/CellCellCommunicationPlots.md +15 -0
  15. {immunopipe-2.6.1 → immunopipe-2.6.2}/docs/processes/CellTypeAnnotation.md +602 -20
  16. {immunopipe-2.6.1 → immunopipe-2.6.2}/docs/processes/ClonalStats.md +15 -0
  17. {immunopipe-2.6.1 → immunopipe-2.6.2}/docs/processes/ClusterMarkers.md +21 -0
  18. {immunopipe-2.6.1 → immunopipe-2.6.2}/docs/processes/ClusterMarkersOfAllCells.md +21 -0
  19. {immunopipe-2.6.1 → immunopipe-2.6.2}/docs/processes/LoadingRNAFromSeurat.md +21 -0
  20. {immunopipe-2.6.1 → immunopipe-2.6.2}/docs/processes/MarkersFinder.md +15 -0
  21. {immunopipe-2.6.1 → immunopipe-2.6.2}/docs/processes/ModuleScoreCalculator.md +14 -0
  22. {immunopipe-2.6.1 → immunopipe-2.6.2}/docs/processes/PseudoBulkDEG.md +15 -0
  23. {immunopipe-2.6.1 → immunopipe-2.6.2}/docs/processes/SampleInfo.md +17 -0
  24. {immunopipe-2.6.1 → immunopipe-2.6.2}/docs/processes/ScFGSEA.md +15 -0
  25. {immunopipe-2.6.1 → immunopipe-2.6.2}/docs/processes/ScRepCombiningExpression.md +16 -0
  26. {immunopipe-2.6.1 → immunopipe-2.6.2}/docs/processes/ScRepLoading.md +16 -0
  27. {immunopipe-2.6.1 → immunopipe-2.6.2}/docs/processes/SeuratClusterStats.md +21 -0
  28. {immunopipe-2.6.1 → immunopipe-2.6.2}/docs/processes/SeuratClustering.md +15 -0
  29. {immunopipe-2.6.1 → immunopipe-2.6.2}/docs/processes/SeuratClusteringOfAllCells.md +17 -0
  30. {immunopipe-2.6.1 → immunopipe-2.6.2}/docs/processes/SeuratMap2Ref.md +15 -0
  31. {immunopipe-2.6.1 → immunopipe-2.6.2}/docs/processes/SeuratPreparing.md +16 -0
  32. {immunopipe-2.6.1 → immunopipe-2.6.2}/docs/processes/SeuratSubClustering.md +14 -0
  33. {immunopipe-2.6.1 → immunopipe-2.6.2}/docs/processes/Slingshot.md +14 -0
  34. {immunopipe-2.6.1 → immunopipe-2.6.2}/docs/processes/TESSA.md +16 -0
  35. {immunopipe-2.6.1 → immunopipe-2.6.2}/docs/processes/TOrBCellSelection.md +21 -0
  36. {immunopipe-2.6.1 → immunopipe-2.6.2}/docs/processes/TopExpressingGenes.md +15 -0
  37. {immunopipe-2.6.1 → immunopipe-2.6.2}/docs/processes/TopExpressingGenesOfAllCells.md +16 -0
  38. {immunopipe-2.6.1 → immunopipe-2.6.2}/docs/running.md +1 -1
  39. {immunopipe-2.6.1 → immunopipe-2.6.2}/immunopipe/mcp/README.md +1 -1
  40. {immunopipe-2.6.1 → immunopipe-2.6.2}/immunopipe/mcp/example.py +1 -1
  41. {immunopipe-2.6.1 → immunopipe-2.6.2}/immunopipe/mcp/mcp_server.py +4 -6
  42. {immunopipe-2.6.1 → immunopipe-2.6.2}/immunopipe/mcp/options.py +139 -3
  43. {immunopipe-2.6.1 → immunopipe-2.6.2}/immunopipe/mcp/toml_generator.py +135 -20
  44. {immunopipe-2.6.1 → immunopipe-2.6.2}/immunopipe/mcp/tools.py +7 -7
  45. {immunopipe-2.6.1 → immunopipe-2.6.2}/immunopipe/processes.py +396 -4
  46. {immunopipe-2.6.1 → immunopipe-2.6.2}/immunopipe/version.py +1 -1
  47. {immunopipe-2.6.1 → immunopipe-2.6.2}/mkdocs.yml +1 -0
  48. immunopipe-2.6.2/scripts/mcp_smoke.sh +110 -0
  49. {immunopipe-2.6.1 → immunopipe-2.6.2}/tests/test_mcp_options.py +16 -0
  50. immunopipe-2.6.2/tests/test_mcp_server_stdio.py +80 -0
  51. {immunopipe-2.6.1 → immunopipe-2.6.2}/tests/test_mcp_toml_generator.py +137 -1
  52. {immunopipe-2.6.1 → immunopipe-2.6.2}/tests/test_mcp_tools.py +24 -0
  53. {immunopipe-2.6.1 → immunopipe-2.6.2}/uv.lock +370 -337
  54. {immunopipe-2.6.1 → immunopipe-2.6.2}/.coveragerc +0 -0
  55. {immunopipe-2.6.1 → immunopipe-2.6.2}/.dockerignore +0 -0
  56. {immunopipe-2.6.1 → immunopipe-2.6.2}/.github/copilot-instructions.md +0 -0
  57. {immunopipe-2.6.1 → immunopipe-2.6.2}/.github/workflows/deploy.yml +0 -0
  58. {immunopipe-2.6.1 → immunopipe-2.6.2}/.github/workflows/docs-dev.yml +0 -0
  59. {immunopipe-2.6.1 → immunopipe-2.6.2}/.github/workflows/docs.yml +0 -0
  60. {immunopipe-2.6.1 → immunopipe-2.6.2}/.github/workflows/test.yml +0 -0
  61. {immunopipe-2.6.1 → immunopipe-2.6.2}/.gitignore +0 -0
  62. {immunopipe-2.6.1 → immunopipe-2.6.2}/AGENTS.md +0 -0
  63. {immunopipe-2.6.1 → immunopipe-2.6.2}/Dockerfile +0 -0
  64. {immunopipe-2.6.1 → immunopipe-2.6.2}/Dockerfile.base +0 -0
  65. {immunopipe-2.6.1 → immunopipe-2.6.2}/Dockerfile.rpkgs +0 -0
  66. {immunopipe-2.6.1 → immunopipe-2.6.2}/LICENSE +0 -0
  67. {immunopipe-2.6.1 → immunopipe-2.6.2}/Makefile +0 -0
  68. {immunopipe-2.6.1 → immunopipe-2.6.2}/README.md +0 -0
  69. {immunopipe-2.6.1 → immunopipe-2.6.2}/board.toml +0 -0
  70. {immunopipe-2.6.1 → immunopipe-2.6.2}/docker/cleanup.list +0 -0
  71. {immunopipe-2.6.1 → immunopipe-2.6.2}/docker/cleanup.py +0 -0
  72. {immunopipe-2.6.1 → immunopipe-2.6.2}/docker/dockerhub-base-description.md +0 -0
  73. {immunopipe-2.6.1 → immunopipe-2.6.2}/docker/dockerhub-description.md +0 -0
  74. {immunopipe-2.6.1 → immunopipe-2.6.2}/docker/dockerhub-rpkgs-description.md +0 -0
  75. {immunopipe-2.6.1 → immunopipe-2.6.2}/docker/entry.sh +0 -0
  76. {immunopipe-2.6.1 → immunopipe-2.6.2}/docker/environment_base.yml +0 -0
  77. {immunopipe-2.6.1 → immunopipe-2.6.2}/docker/environment_rpkgs.yml +0 -0
  78. {immunopipe-2.6.1 → immunopipe-2.6.2}/docs/ImmunopipeMinimal.svg +0 -0
  79. {immunopipe-2.6.1 → immunopipe-2.6.2}/docs/agent-skills.md +0 -0
  80. {immunopipe-2.6.1 → immunopipe-2.6.2}/docs/assets/script.js +0 -0
  81. {immunopipe-2.6.1 → immunopipe-2.6.2}/docs/assets/style.css +0 -0
  82. {immunopipe-2.6.1 → immunopipe-2.6.2}/docs/cli-utils.md +0 -0
  83. {immunopipe-2.6.1 → immunopipe-2.6.2}/docs/configurations.md +0 -0
  84. {immunopipe-2.6.1 → immunopipe-2.6.2}/docs/diagram.svg +0 -0
  85. {immunopipe-2.6.1 → immunopipe-2.6.2}/docs/gallery.md +0 -0
  86. {immunopipe-2.6.1 → immunopipe-2.6.2}/docs/img/favicon.ico +0 -0
  87. {immunopipe-2.6.1 → immunopipe-2.6.2}/docs/immunopipe-caching.png +0 -0
  88. {immunopipe-2.6.1 → immunopipe-2.6.2}/docs/immunopipe.flowchart.pdf +0 -0
  89. {immunopipe-2.6.1 → immunopipe-2.6.2}/docs/immunopipe.flowchart.png +0 -0
  90. {immunopipe-2.6.1 → immunopipe-2.6.2}/docs/immunopipe.gbatch.png +0 -0
  91. {immunopipe-2.6.1 → immunopipe-2.6.2}/docs/immunopipe.ms.png +0 -0
  92. {immunopipe-2.6.1 → immunopipe-2.6.2}/docs/introduction.md +0 -0
  93. {immunopipe-2.6.1 → immunopipe-2.6.2}/docs/logo.png +0 -0
  94. {immunopipe-2.6.1 → immunopipe-2.6.2}/docs/pipen-board.gif +0 -0
  95. {immunopipe-2.6.1 → immunopipe-2.6.2}/docs/pipen-cache.png +0 -0
  96. {immunopipe-2.6.1 → immunopipe-2.6.2}/docs/preparing-input.md +0 -0
  97. {immunopipe-2.6.1 → immunopipe-2.6.2}/docs/processes/MetabolicExprImputation.md +0 -0
  98. {immunopipe-2.6.1 → immunopipe-2.6.2}/docs/processes/MetabolicFeatures.md +0 -0
  99. {immunopipe-2.6.1 → immunopipe-2.6.2}/docs/processes/MetabolicInput.md +0 -0
  100. {immunopipe-2.6.1 → immunopipe-2.6.2}/docs/processes/MetabolicPathwayActivity.md +0 -0
  101. {immunopipe-2.6.1 → immunopipe-2.6.2}/docs/processes/MetabolicPathwayHeterogeneity.md +0 -0
  102. {immunopipe-2.6.1 → immunopipe-2.6.2}/docs/processes/ScVelo.md +0 -0
  103. {immunopipe-2.6.1 → immunopipe-2.6.2}/docs/processes/ScrnaMetabolicLandscape.md +0 -0
  104. {immunopipe-2.6.1 → immunopipe-2.6.2}/docs/processes/images/CellTypeAnnotation-metadata.png +0 -0
  105. {immunopipe-2.6.1 → immunopipe-2.6.2}/docs/processes/images/CellsDistribution_example.png +0 -0
  106. {immunopipe-2.6.1 → immunopipe-2.6.2}/docs/processes/images/CloneResidency.png +0 -0
  107. {immunopipe-2.6.1 → immunopipe-2.6.2}/docs/processes/images/CloneResidency_venn.png +0 -0
  108. {immunopipe-2.6.1 → immunopipe-2.6.2}/docs/processes/images/Immunarch-counts.png +0 -0
  109. {immunopipe-2.6.1 → immunopipe-2.6.2}/docs/processes/images/Immunarch-hom_clones.png +0 -0
  110. {immunopipe-2.6.1 → immunopipe-2.6.2}/docs/processes/images/Immunarch-top_clones_marks.png +0 -0
  111. {immunopipe-2.6.1 → immunopipe-2.6.2}/docs/processes/images/Immunarch-volume-default.png +0 -0
  112. {immunopipe-2.6.1 → immunopipe-2.6.2}/docs/processes/images/Immunarch_sample_diversity.png +0 -0
  113. {immunopipe-2.6.1 → immunopipe-2.6.2}/docs/processes/images/MetabolicPathwayActivity_heatmap.png +0 -0
  114. {immunopipe-2.6.1 → immunopipe-2.6.2}/docs/processes/images/MetabolicPathwayActivity_merged_heatmap.png +0 -0
  115. {immunopipe-2.6.1 → immunopipe-2.6.2}/docs/processes/images/MetabolicPathwayActivity_violin.png +0 -0
  116. {immunopipe-2.6.1 → immunopipe-2.6.2}/docs/processes/images/MetabolicPathwayHeterogeneity.png +0 -0
  117. {immunopipe-2.6.1 → immunopipe-2.6.2}/docs/processes/images/ModuleScoreCalculator-metadata.png +0 -0
  118. {immunopipe-2.6.1 → immunopipe-2.6.2}/docs/processes/images/RadarPlots-cluster_order.png +0 -0
  119. {immunopipe-2.6.1 → immunopipe-2.6.2}/docs/processes/images/RadarPlots-default.png +0 -0
  120. {immunopipe-2.6.1 → immunopipe-2.6.2}/docs/processes/images/RadarPlots-each.png +0 -0
  121. {immunopipe-2.6.1 → immunopipe-2.6.2}/docs/processes/images/SampleInfo-infile.png +0 -0
  122. {immunopipe-2.6.1 → immunopipe-2.6.2}/docs/processes/images/SampleInfo-report.png +0 -0
  123. {immunopipe-2.6.1 → immunopipe-2.6.2}/docs/processes/images/SampleInfo_Samples_Source.png +0 -0
  124. {immunopipe-2.6.1 → immunopipe-2.6.2}/docs/processes/images/SampleInfo_Score_Source.png +0 -0
  125. {immunopipe-2.6.1 → immunopipe-2.6.2}/docs/processes/images/SeuratClusterStats_dimplots.png +0 -0
  126. {immunopipe-2.6.1 → immunopipe-2.6.2}/docs/processes/images/SeuratClusterStats_fracCells_Sample.png +0 -0
  127. {immunopipe-2.6.1 → immunopipe-2.6.2}/docs/processes/images/SeuratClusterStats_nCells_All.png +0 -0
  128. {immunopipe-2.6.1 → immunopipe-2.6.2}/docs/processes/images/SeuratClusterStats_nCells_Sample.png +0 -0
  129. {immunopipe-2.6.1 → immunopipe-2.6.2}/docs/processes/images/SeuratClusterStats_vlnplots.png +0 -0
  130. {immunopipe-2.6.1 → immunopipe-2.6.2}/docs/processes/images/SeuratClusterStats_vlnplots_1.png +0 -0
  131. {immunopipe-2.6.1 → immunopipe-2.6.2}/docs/processes/images/SeuratClustering-metadata.png +0 -0
  132. {immunopipe-2.6.1 → immunopipe-2.6.2}/docs/processes/images/SeuratPreparing-metadata.png +0 -0
  133. {immunopipe-2.6.1 → immunopipe-2.6.2}/docs/processes/images/SeuratSubClustering-metadata.png +0 -0
  134. {immunopipe-2.6.1 → immunopipe-2.6.2}/docs/processes/images/TCRClusteringStats_cluster_size.png +0 -0
  135. {immunopipe-2.6.1 → immunopipe-2.6.2}/docs/processes/images/TCRClusteringStats_sample_diversity.png +0 -0
  136. {immunopipe-2.6.1 → immunopipe-2.6.2}/docs/processes/images/TCRClusteringStats_shared_clusters.png +0 -0
  137. {immunopipe-2.6.1 → immunopipe-2.6.2}/docs/processes/images/TESSA-metadata.png +0 -0
  138. {immunopipe-2.6.1 → immunopipe-2.6.2}/docs/processes/images/TOrBCellSelection-kmeans.png +0 -0
  139. {immunopipe-2.6.1 → immunopipe-2.6.2}/docs/requirements.txt +0 -0
  140. {immunopipe-2.6.1 → immunopipe-2.6.2}/docs/routes-notcr.png +0 -0
  141. {immunopipe-2.6.1 → immunopipe-2.6.2}/docs/routes-tcr.png +0 -0
  142. {immunopipe-2.6.1 → immunopipe-2.6.2}/docs/rtd-logo.png +0 -0
  143. {immunopipe-2.6.1 → immunopipe-2.6.2}/docs/singularity-pipen-board.png +0 -0
  144. {immunopipe-2.6.1 → immunopipe-2.6.2}/immunopipe/__init__.py +0 -0
  145. {immunopipe-2.6.1 → immunopipe-2.6.2}/immunopipe/__main__.py +0 -0
  146. {immunopipe-2.6.1 → immunopipe-2.6.2}/immunopipe/cli_help.py +0 -0
  147. {immunopipe-2.6.1 → immunopipe-2.6.2}/immunopipe/cli_utils/AGENTS.md +0 -0
  148. {immunopipe-2.6.1 → immunopipe-2.6.2}/immunopipe/cli_utils/__init__.py +0 -0
  149. {immunopipe-2.6.1 → immunopipe-2.6.2}/immunopipe/cli_utils/check_dim.R +0 -0
  150. {immunopipe-2.6.1 → immunopipe-2.6.2}/immunopipe/cli_utils/check_dim.py +0 -0
  151. {immunopipe-2.6.1 → immunopipe-2.6.2}/immunopipe/cli_utils/check_genes.R +0 -0
  152. {immunopipe-2.6.1 → immunopipe-2.6.2}/immunopipe/cli_utils/check_genes.py +0 -0
  153. {immunopipe-2.6.1 → immunopipe-2.6.2}/immunopipe/cli_utils/select_markers.py +0 -0
  154. {immunopipe-2.6.1 → immunopipe-2.6.2}/immunopipe/cli_utils/utils.py +0 -0
  155. {immunopipe-2.6.1 → immunopipe-2.6.2}/immunopipe/gbatch.py +0 -0
  156. {immunopipe-2.6.1 → immunopipe-2.6.2}/immunopipe/inhouse.py +0 -0
  157. {immunopipe-2.6.1 → immunopipe-2.6.2}/immunopipe/mcp/AGENTS.md +0 -0
  158. {immunopipe-2.6.1 → immunopipe-2.6.2}/immunopipe/mcp/__init__.py +0 -0
  159. {immunopipe-2.6.1 → immunopipe-2.6.2}/immunopipe/mcp/doc_extractor.py +0 -0
  160. {immunopipe-2.6.1 → immunopipe-2.6.2}/immunopipe/mcp/server.py +0 -0
  161. {immunopipe-2.6.1 → immunopipe-2.6.2}/immunopipe/pipeline.py +0 -0
  162. {immunopipe-2.6.1 → immunopipe-2.6.2}/immunopipe/reports/CloneHeterogeneity.svelte +0 -0
  163. {immunopipe-2.6.1 → immunopipe-2.6.2}/immunopipe/reports/MarkersOverlapping.svelte +0 -0
  164. {immunopipe-2.6.1 → immunopipe-2.6.2}/immunopipe/reports/TCellSelection.svelte +0 -0
  165. {immunopipe-2.6.1 → immunopipe-2.6.2}/immunopipe/reports/TOrBCellSelection.svelte +0 -0
  166. {immunopipe-2.6.1 → immunopipe-2.6.2}/immunopipe/router.py +0 -0
  167. {immunopipe-2.6.1 → immunopipe-2.6.2}/immunopipe/scripts/LoadingRNAFromSeurat.R +0 -0
  168. {immunopipe-2.6.1 → immunopipe-2.6.2}/immunopipe/scripts/TOrBCellSelection.R +0 -0
  169. {immunopipe-2.6.1 → immunopipe-2.6.2}/immunopipe/validate_config.py +0 -0
  170. {immunopipe-2.6.1 → immunopipe-2.6.2}/immunopipe.config.example.toml +0 -0
  171. {immunopipe-2.6.1 → immunopipe-2.6.2}/pyproject.toml +0 -0
  172. {immunopipe-2.6.1 → immunopipe-2.6.2}/setup.py +0 -0
  173. {immunopipe-2.6.1 → immunopipe-2.6.2}/skills/README.md +0 -0
  174. {immunopipe-2.6.1 → immunopipe-2.6.2}/skills/cdr3aaphyschem/SKILL.md +0 -0
  175. {immunopipe-2.6.1 → immunopipe-2.6.2}/skills/cdr3clustering/SKILL.md +0 -0
  176. {immunopipe-2.6.1 → immunopipe-2.6.2}/skills/cellcellcommunication/SKILL.md +0 -0
  177. {immunopipe-2.6.1 → immunopipe-2.6.2}/skills/cellcellcommunicationplots/SKILL.md +0 -0
  178. {immunopipe-2.6.1 → immunopipe-2.6.2}/skills/celltypeannotation/SKILL.md +0 -0
  179. {immunopipe-2.6.1 → immunopipe-2.6.2}/skills/clonalstats/SKILL.md +0 -0
  180. {immunopipe-2.6.1 → immunopipe-2.6.2}/skills/clustermarkers/SKILL.md +0 -0
  181. {immunopipe-2.6.1 → immunopipe-2.6.2}/skills/clustermarkersofallcells/SKILL.md +0 -0
  182. {immunopipe-2.6.1 → immunopipe-2.6.2}/skills/immunopipe-config/SKILL.md +0 -0
  183. {immunopipe-2.6.1 → immunopipe-2.6.2}/skills/loadingrnafromseurat/SKILL.md +0 -0
  184. {immunopipe-2.6.1 → immunopipe-2.6.2}/skills/markersfinder/SKILL.md +0 -0
  185. {immunopipe-2.6.1 → immunopipe-2.6.2}/skills/metabolicexpimputation/SKILL.md +0 -0
  186. {immunopipe-2.6.1 → immunopipe-2.6.2}/skills/metabolicfeatures/SKILL.md +0 -0
  187. {immunopipe-2.6.1 → immunopipe-2.6.2}/skills/metabolicinput/SKILL.md +0 -0
  188. {immunopipe-2.6.1 → immunopipe-2.6.2}/skills/metabolicpathwayactivity/SKILL.md +0 -0
  189. {immunopipe-2.6.1 → immunopipe-2.6.2}/skills/metabolicpathwayheterogeneity/SKILL.md +0 -0
  190. {immunopipe-2.6.1 → immunopipe-2.6.2}/skills/modulescorecalculator/SKILL.md +0 -0
  191. {immunopipe-2.6.1 → immunopipe-2.6.2}/skills/pseudobulkdeg/SKILL.md +0 -0
  192. {immunopipe-2.6.1 → immunopipe-2.6.2}/skills/sampleinfo/SKILL.md +0 -0
  193. {immunopipe-2.6.1 → immunopipe-2.6.2}/skills/scfgsea/SKILL.md +0 -0
  194. {immunopipe-2.6.1 → immunopipe-2.6.2}/skills/screpcombiningexpression/SKILL.md +0 -0
  195. {immunopipe-2.6.1 → immunopipe-2.6.2}/skills/screploading/SKILL.md +0 -0
  196. {immunopipe-2.6.1 → immunopipe-2.6.2}/skills/scrnametaboliclandscape/SKILL.md +0 -0
  197. {immunopipe-2.6.1 → immunopipe-2.6.2}/skills/seuratclustering/SKILL.md +0 -0
  198. {immunopipe-2.6.1 → immunopipe-2.6.2}/skills/seuratclusteringofallcells/SKILL.md +0 -0
  199. {immunopipe-2.6.1 → immunopipe-2.6.2}/skills/seuratclusterstats/SKILL.md +0 -0
  200. {immunopipe-2.6.1 → immunopipe-2.6.2}/skills/seuratmap2ref/SKILL.md +0 -0
  201. {immunopipe-2.6.1 → immunopipe-2.6.2}/skills/seuratpreparing/SKILL.md +0 -0
  202. {immunopipe-2.6.1 → immunopipe-2.6.2}/skills/seuratsubclustering/SKILL.md +0 -0
  203. {immunopipe-2.6.1 → immunopipe-2.6.2}/skills/tessa/SKILL.md +0 -0
  204. {immunopipe-2.6.1 → immunopipe-2.6.2}/skills/topexpressinggenes/SKILL.md +0 -0
  205. {immunopipe-2.6.1 → immunopipe-2.6.2}/skills/topexpressinggenesofallcells/SKILL.md +0 -0
  206. {immunopipe-2.6.1 → immunopipe-2.6.2}/skills/torbcellselection/SKILL.md +0 -0
  207. {immunopipe-2.6.1 → immunopipe-2.6.2}/tests/__init__.py +0 -0
  208. {immunopipe-2.6.1 → immunopipe-2.6.2}/tests/conftest.py +0 -0
  209. {immunopipe-2.6.1 → immunopipe-2.6.2}/tests/running/configs/CellCellCommunication.config.toml +0 -0
  210. {immunopipe-2.6.1 → immunopipe-2.6.2}/tests/running/configs/ClonalStats.config.toml +0 -0
  211. {immunopipe-2.6.1 → immunopipe-2.6.2}/tests/running/configs/ClusterMarkers.config.toml +0 -0
  212. {immunopipe-2.6.1 → immunopipe-2.6.2}/tests/running/configs/SampleInfo.config.toml +0 -0
  213. {immunopipe-2.6.1 → immunopipe-2.6.2}/tests/running/configs/ScFGSEA.config.toml +0 -0
  214. {immunopipe-2.6.1 → immunopipe-2.6.2}/tests/running/configs/ScRep.config.toml +0 -0
  215. {immunopipe-2.6.1 → immunopipe-2.6.2}/tests/running/configs/SeuratClusterStats.config.toml +0 -0
  216. {immunopipe-2.6.1 → immunopipe-2.6.2}/tests/running/configs/SeuratClustering.config.toml +0 -0
  217. {immunopipe-2.6.1 → immunopipe-2.6.2}/tests/running/configs/SeuratPreparing.config.toml +0 -0
  218. {immunopipe-2.6.1 → immunopipe-2.6.2}/tests/running/configs/SeuratPreparing_sct.config.toml +0 -0
  219. {immunopipe-2.6.1 → immunopipe-2.6.2}/tests/running/configs/TOrBCellSelection.config.toml +0 -0
  220. {immunopipe-2.6.1 → immunopipe-2.6.2}/tests/running/configs/TOrBCellSelectionWithCellbarcodes.config.toml +0 -0
  221. {immunopipe-2.6.1 → immunopipe-2.6.2}/tests/running/configs/celltypeannotation_seuratmap2ref.config.toml +0 -0
  222. {immunopipe-2.6.1 → immunopipe-2.6.2}/tests/running/configs/loadingrnafromseurat.config.toml +0 -0
  223. {immunopipe-2.6.1 → immunopipe-2.6.2}/tests/running/configs/malformed.config.toml +0 -0
  224. {immunopipe-2.6.1 → immunopipe-2.6.2}/tests/running/configs/mixed.config.toml +0 -0
  225. {immunopipe-2.6.1 → immunopipe-2.6.2}/tests/running/configs/sampleinfo_multiple_infiles.config.toml +0 -0
  226. {immunopipe-2.6.1 → immunopipe-2.6.2}/tests/running/configs/torbcellselection_seuratclusteringofallcells.config.toml +0 -0
  227. {immunopipe-2.6.1 → immunopipe-2.6.2}/tests/running/data/sampleinfo.txt +0 -0
  228. {immunopipe-2.6.1 → immunopipe-2.6.2}/tests/running/data/tcells.txt +0 -0
  229. {immunopipe-2.6.1 → immunopipe-2.6.2}/tests/test_doc_extractor.py +0 -0
  230. {immunopipe-2.6.1 → immunopipe-2.6.2}/tests/test_processes.py +0 -0
  231. {immunopipe-2.6.1 → immunopipe-2.6.2}/tests/test_routes.py +0 -0
  232. {immunopipe-2.6.1 → immunopipe-2.6.2}/tests/test_validate_config.py +0 -0
  233. {immunopipe-2.6.1 → immunopipe-2.6.2}/tox.ini +0 -0
@@ -13,13 +13,21 @@ jobs:
13
13
  fetch-depth: 2
14
14
  - name: Check if base files changed
15
15
  id: check_changes
16
+ # The ref name and the commit message are untrusted text. Interpolating them into
17
+ # the script (${{ ... }}) let a commit message containing backticks, double quotes,
18
+ # $(...) or parentheses inject code into this step - see run 36176158453, where
19
+ # "conditional binary operator expected" / exit code 2 killed build / docker-base.
20
+ # They arrive through env instead, so the shell only ever sees data.
21
+ env:
22
+ REF_NAME: ${{ github.ref_name }}
23
+ COMMIT_MSG: ${{ github.event.head_commit.message }}
16
24
  run: |
17
- if [[ "${{ github.ref_name }}" == "dev" ]] && git diff --name-only HEAD~1 HEAD | grep -qE '(cleanup\.list|environment_base\.yml|Dockerfile\.base)$'; then
18
- echo "changed=true" >> $GITHUB_OUTPUT
19
- elif [[ "${{ github.event.head_commit.message }}" == *"[force-base]"* ]]; then
20
- echo "changed=true" >> $GITHUB_OUTPUT
25
+ if [[ "$REF_NAME" == "dev" ]] && git diff --name-only HEAD~1 HEAD | grep -qE '(cleanup\.list|environment_base\.yml|Dockerfile\.base)$'; then
26
+ echo "changed=true" >> "$GITHUB_OUTPUT"
27
+ elif [[ "$COMMIT_MSG" == *"[force-base]"* ]]; then
28
+ echo "changed=true" >> "$GITHUB_OUTPUT"
21
29
  else
22
- echo "changed=false" >> $GITHUB_OUTPUT
30
+ echo "changed=false" >> "$GITHUB_OUTPUT"
23
31
  fi
24
32
  - name: Set up QEMU
25
33
  if: steps.check_changes.outputs.changed == 'true'
@@ -50,13 +58,18 @@ jobs:
50
58
  fetch-depth: 2
51
59
  - name: Check if rpkgs files changed
52
60
  id: check_changes
61
+ # Same fix as "Check if base files changed": untrusted text goes through env, never
62
+ # through the script body.
63
+ env:
64
+ REF_NAME: ${{ github.ref_name }}
65
+ COMMIT_MSG: ${{ github.event.head_commit.message }}
53
66
  run: |
54
- if [[ "${{ github.ref_name }}" == "dev" ]] && git diff --name-only HEAD~1 HEAD | grep -qE '(cleanup\.list|environment_(base|rpkgs)\.yml|Dockerfile\.(base|rpkgs))$'; then
55
- echo "changed=true" >> $GITHUB_OUTPUT
56
- elif [[ "${{ github.event.head_commit.message }}" == *"[force-rpkgs]"* ]]; then
57
- echo "changed=true" >> $GITHUB_OUTPUT
67
+ if [[ "$REF_NAME" == "dev" ]] && git diff --name-only HEAD~1 HEAD | grep -qE '(cleanup\.list|environment_(base|rpkgs)\.yml|Dockerfile\.(base|rpkgs))$'; then
68
+ echo "changed=true" >> "$GITHUB_OUTPUT"
69
+ elif [[ "$COMMIT_MSG" == *"[force-rpkgs]"* ]]; then
70
+ echo "changed=true" >> "$GITHUB_OUTPUT"
58
71
  else
59
- echo "changed=false" >> $GITHUB_OUTPUT
72
+ echo "changed=false" >> "$GITHUB_OUTPUT"
60
73
  fi
61
74
  - name: Set up QEMU
62
75
  if: steps.check_changes.outputs.changed == 'true'
@@ -0,0 +1,585 @@
1
+ name: install-matrix
2
+
3
+ # Verifies the DOCUMENTED installation path (docs/installation.md, section
4
+ # "Install the pipline and the dependencies using conda/mamba") on the platforms
5
+ # the manuscript claims to support, and then RUNS the pipeline on a tiny synthetic
6
+ # dataset: installing is not the claim under test, executing is.
7
+ #
8
+ # Command mapping (docs -> this workflow). The documented commands are conda
9
+ # commands and the published container uses micromamba; micromamba exposes the same
10
+ # surface (`env update -f` included), so the documented commands are run here with
11
+ # micromamba:
12
+ #
13
+ # docs step 1 conda env create -n immunopipe -f docker/environment_base.yml
14
+ # -> micromamba create -n immunopipe -f docker/environment_base.yml
15
+ # docs step 2 conda env update -n immunopipe -f docker/environment_rpkgs.yml
16
+ # -> micromamba env update -n immunopipe -f docker/environment_rpkgs.yml
17
+ # docs step 3 conda activate immunopipe; pip install -U immunopipe
18
+ # -> micromamba run -n immunopipe python -m pip install -U immunopipe
19
+ # docs step 3 pipen report update (unchanged)
20
+ #
21
+ # The environment files come from the checked-out commit (so the job tests the
22
+ # branch under review), and an early step diffs them against the URLs the docs tell
23
+ # users to download from, so a green run cannot be green because of a stale file.
24
+ #
25
+ # Platform claims (docs/installation.md): the conda/mamba route is documented as
26
+ # LINUX-ONLY, because every R package immunopipe needs is published on the pwwang
27
+ # channel as linux-64 builds only - so `conda env create -f environment_base.yml`
28
+ # cannot solve on macOS, Intel or Apple silicon, by construction. macOS is documented as
29
+ # a pip install instead. The two legs therefore verify two different claims:
30
+ #
31
+ # ubuntu-latest the documented conda path must work end to end: base + rpkgs + the
32
+ # `pip install -U immunopipe` into that env + the smoke run. All four
33
+ # are gated, exactly as before.
34
+ # macos-latest the conda path is EXPECTED to fail. It is still attempted and its
35
+ # solver output is still captured (install-logs/rpkgs.log,
36
+ # install-logs/pip-install.log, install-logs/probe-*.log) as the
37
+ # evidence for the documented limitation, but its outcome never fails
38
+ # the job. What IS gated on macOS is the documented pip path: a plain
39
+ # virtualenv + `pip install -U immunopipe` + importing the installed
40
+ # package. The smoke run needs R from the conda env, so it stays skipped
41
+ # on macOS rather than pretending to run.
42
+ #
43
+ # The verdict step is platform-aware and fails the job when the claim that applies to
44
+ # that platform was not met, so this workflow can never be green by omission.
45
+ on:
46
+ push:
47
+ branches: [dev, master, main]
48
+ pull_request:
49
+ workflow_dispatch:
50
+ inputs:
51
+ cold:
52
+ description: "Ignore the cached environment and run the documented install from scratch"
53
+ type: boolean
54
+ default: false
55
+ probe_platform:
56
+ description: "Extra conda platform for the availability probe (e.g. osx-64); empty = native platform only"
57
+ type: string
58
+ default: ""
59
+
60
+ permissions:
61
+ contents: read
62
+
63
+ jobs:
64
+ install-and-run:
65
+ name: documented install + smoke run (${{ matrix.os }})
66
+ runs-on: ${{ matrix.os }}
67
+ timeout-minutes: 180
68
+ strategy:
69
+ fail-fast: false
70
+ matrix:
71
+ os: [ubuntu-latest, macos-latest]
72
+
73
+ env:
74
+ LOGDIR: ${{ github.workspace }}/install-logs
75
+ SMOKEDIR: ${{ github.workspace }}/smoke
76
+ PROBE_PLATFORM: ${{ inputs.probe_platform }}
77
+ ENV_BASE: docker/environment_base.yml
78
+ ENV_RPKGS: docker/environment_rpkgs.yml
79
+ # the platform this leg runs on, as data rather than as text spliced into scripts
80
+ MATRIX_OS: ${{ matrix.os }}
81
+ # RUNNER_OS is deliberately NOT set here: it is a built-in GitHub variable
82
+ # (Linux / macOS / Windows) already present in every step's environment, and
83
+ # the `runner` context is not available in a job-level `env:` block - using it
84
+ # made GitHub reject this whole workflow file, so the run produced zero jobs.
85
+
86
+ defaults:
87
+ run:
88
+ shell: bash -elo pipefail {0}
89
+
90
+ steps:
91
+ - uses: actions/checkout@v6
92
+ with:
93
+ fetch-depth: 0
94
+
95
+ # Diagnostic only, so it must never gate the run. micromamba is installed by
96
+ # the setup-micromamba step below, not present on a fresh runner; calling it
97
+ # here unconditionally exited 127 and skipped every subsequent step.
98
+ - name: Platform fingerprint
99
+ run: |
100
+ mkdir -p "$LOGDIR"
101
+ {
102
+ echo "runner: $MATRIX_OS"
103
+ uname -a
104
+ if command -v micromamba >/dev/null 2>&1; then
105
+ micromamba --version
106
+ else
107
+ echo "micromamba: not on PATH yet (installed by the next setup step)"
108
+ fi
109
+ } 2>&1 | tee "$LOGDIR/platform.log"
110
+
111
+ - name: Documented environment files vs the URLs in docs/installation.md
112
+ continue-on-error: true
113
+ run: |
114
+ BASEURL=https://raw.githubusercontent.com/pwwang/immunopipe/master/docker
115
+ for f in environment_base.yml environment_rpkgs.yml; do
116
+ if curl -fsSL "$BASEURL/$f" -o "/tmp/documented-$f"; then
117
+ if diff -q "docker/$f" "/tmp/documented-$f" > /dev/null; then
118
+ echo "$f: IDENTICAL to the documented download ($BASEURL/$f)"
119
+ else
120
+ echo "$f: DIFFERS from the documented download - this run tests the checkout, not the URL:"
121
+ diff -u "docker/$f" "/tmp/documented-$f" | head -40 || true
122
+ fi
123
+ else
124
+ echo "$f: could not fetch the documented URL (network?) - informational only"
125
+ fi
126
+ done 2>&1 | tee "$LOGDIR/documented-vs-checkout.log"
127
+
128
+ # documented step 1: the action runs
129
+ # `micromamba create -n immunopipe -f docker/environment_base.yml` and caches
130
+ # the environment (cache key includes the environment file hash and the OS).
131
+ # `workflow_dispatch` with `cold: true` disables the cache so the documented
132
+ # command really runs from scratch.
133
+ - name: "Documented step 1: conda env create -f docker/environment_base.yml"
134
+ id: base
135
+ continue-on-error: true
136
+ uses: mamba-org/setup-micromamba@v2
137
+ with:
138
+ environment-file: docker/environment_base.yml
139
+ environment-name: immunopipe
140
+ cache-environment: ${{ !(github.event_name == 'workflow_dispatch' && inputs.cold) }}
141
+ cache-downloads: true
142
+ init-shell: none
143
+
144
+ # the rest of the platform fingerprint, now that micromamba exists. Diagnostic
145
+ # only: on macOS the documented conda path is expected to be unavailable and
146
+ # setup-micromamba can fail before it puts micromamba on PATH, so a missing
147
+ # micromamba is recorded here instead of aborting the step (127 used to skip every
148
+ # later step, including the macOS pip check that this workflow now gates on).
149
+ - name: Platform fingerprint (micromamba)
150
+ continue-on-error: true
151
+ run: |
152
+ {
153
+ if command -v micromamba >/dev/null 2>&1; then
154
+ echo "micromamba --version:"
155
+ micromamba --version
156
+ echo
157
+ echo "micromamba info:"
158
+ micromamba info
159
+ else
160
+ echo "micromamba: not on PATH - the documented conda path could not start here"
161
+ fi
162
+ } 2>&1 | tee -a "$LOGDIR/platform.log"
163
+
164
+ - name: "Documented step 2: conda env update -f docker/environment_rpkgs.yml"
165
+ id: rpkgs
166
+ continue-on-error: true
167
+ run: |
168
+ # Redirect to the log rather than piping through tee: under `set -e` a
169
+ # failing `echo | tee` aborts the script with tee's status, which recorded a
170
+ # successful update (RPKGS_EXIT=0, "Transaction finished") as a failure.
171
+ set +e
172
+ micromamba env update -n immunopipe -f "$ENV_RPKGS" > "$LOGDIR/rpkgs.log" 2>&1
173
+ rc=$?
174
+ set +e
175
+ echo "RPKGS_EXIT=$rc" >> "$LOGDIR/rpkgs.log" || true
176
+ if [ "$rc" -ne 0 ]; then
177
+ echo "::warning::documented step 2 failed (exit $rc) on this platform - the unresolved package list is in install-logs/rpkgs.log"
178
+ fi
179
+ exit "$rc"
180
+
181
+ # documented step 3, inside the conda environment the docs create. continue-on-error
182
+ # keeps a failure here from skipping the steps below (on macOS the env cannot exist,
183
+ # so this fails by design there); the Verdict reads the raw outcome and still gates
184
+ # it on Linux. The whole transcript is redirected into install-logs/pip-install.log,
185
+ # so the failure - or the proof it worked - survives in the artifact either way.
186
+ - name: "Documented step 3: pip install -U immunopipe"
187
+ id: install
188
+ continue-on-error: true
189
+ run: |
190
+ # set +e throughout: this step reports its own exit status, and errexit
191
+ # aborting mid-way would lose the report that is the point of the step.
192
+ set +e
193
+ rc=0
194
+ : > "$LOGDIR/pip-install.log"
195
+
196
+ # record each command's status separately, so a failure names the command
197
+ step_rc() {
198
+ echo "$1=$2" | tee -a "$LOGDIR/pip-install.log"
199
+ [ "$2" -eq 0 ] || rc="$2"
200
+ }
201
+
202
+ if command -v micromamba >/dev/null 2>&1; then
203
+ micromamba run -n immunopipe python -m pip install --upgrade pip \
204
+ >> "$LOGDIR/pip-install.log" 2>&1
205
+ step_rc PIP_UPGRADE_EXIT $?
206
+
207
+ micromamba run -n immunopipe python -m pip install -U immunopipe \
208
+ >> "$LOGDIR/pip-install.log" 2>&1
209
+ step_rc PIP_INSTALL_EXIT $?
210
+
211
+ micromamba run -n immunopipe immunopipe --version \
212
+ > "$LOGDIR/immunopipe-version.log" 2>&1
213
+ step_rc IMMUNOPIPE_VERSION_EXIT $?
214
+ cat "$LOGDIR/immunopipe-version.log" >> "$LOGDIR/pip-install.log"
215
+ else
216
+ echo "micromamba: not on PATH - the documented conda path cannot run here" \
217
+ >> "$LOGDIR/pip-install.log"
218
+ step_rc MICROMAMBA_MISSING 127
219
+ fi
220
+
221
+ echo "INSTALL_EXIT=$rc" | tee -a "$LOGDIR/pip-install.log"
222
+ cat "$LOGDIR/pip-install.log"
223
+ exit "$rc"
224
+
225
+ - name: "Documented step 3b: pipen report update"
226
+ id: reportdeps
227
+ continue-on-error: true
228
+ run: |
229
+ micromamba run -n immunopipe pipen report update 2>&1 | tee "$LOGDIR/pipen-report-update.log"
230
+
231
+ # The macOS claim in docs/installation.md is the pip path ("On macOS, install with
232
+ # pip and provide R separately"). Verified here in a plain virtualenv - no conda, no
233
+ # micromamba - and gated: if this stops working, the documented macOS instruction is
234
+ # false and the job must go red. The venv lives outside $LOGDIR on purpose, so the
235
+ # uploaded artifact stays logs, not a hundred megabytes of site-packages.
236
+ - name: "Documented macOS path: python -m venv + pip install -U immunopipe"
237
+ id: pipvenv
238
+ if: runner.os == 'macOS'
239
+ run: |
240
+ VENVDIR="${RUNNER_TEMP:-/tmp}/immunopipe-pipvenv"
241
+ python3 --version 2>&1 | tee "$LOGDIR/pipvenv-install.log"
242
+ python3 -m venv "$VENVDIR"
243
+ VENV_PY="$VENVDIR/bin/python"
244
+ "$VENV_PY" -m pip install --upgrade pip 2>&1 | tee -a "$LOGDIR/pipvenv-install.log"
245
+ "$VENV_PY" -m pip install -U immunopipe 2>&1 | tee -a "$LOGDIR/pipvenv-install.log"
246
+ "$VENV_PY" -c "import immunopipe; print('immunopipe', immunopipe.__version__)" 2>&1 | tee "$LOGDIR/pipvenv-import.log"
247
+
248
+ # The smoke run needs the R packages that only the conda env provides, so on macOS
249
+ # it is skipped outright rather than attempted (and it lands in the verdict table as
250
+ # `skipped`, not as a fake pass).
251
+ - name: "Smoke run: immunopipe @smoke.config.toml on a tiny synthetic dataset"
252
+ id: smoke
253
+ # not gated on steps.install.outcome: the smoke run IS the test, so a
254
+ # bookkeeping failure upstream must not suppress it - if the install
255
+ # really failed, this fails too and the verdict still catches it
256
+ if: runner.os != 'macOS'
257
+ run: |
258
+ # Deterministic, stdlib-only generator: 200 cells x 379 genes, 4 samples,
259
+ # 3 expression programs, plus a local GMT so no web service is needed.
260
+ cat > "$LOGDIR/gen_smoke_data.py" <<'PY'
261
+ #!/usr/bin/env python3
262
+ """Generate a tiny synthetic 10x (CellRanger v3) dataset for the CI smoke test.
263
+
264
+ Pure standard library (no numpy) so it can run inside any freshly created
265
+ conda environment. Deterministic: same seed -> same data.
266
+
267
+ Layout produced under <outdir>:
268
+ data/prepared/<sample>/{matrix.mtx.gz,barcodes.tsv.gz,features.tsv.gz}
269
+ data/samples.txt (Sample, RNAData, Condition)
270
+ smoke.config.toml (documented minimal configuration)
271
+ """
272
+
273
+ from __future__ import annotations
274
+
275
+ import gzip
276
+ import random
277
+ import sys
278
+ from pathlib import Path
279
+
280
+ SEED = 20260923
281
+ N_SAMPLES = 4
282
+ CELLS_PER_SAMPLE = 50
283
+ GENES_BG = 300
284
+ MARKERS_PER_CLUSTER = 25
285
+ N_CLUSTERS = 3
286
+ MT_GENES = ["MT-ND1", "MT-CO1", "MT-ATP6", "MT-CYB"]
287
+ LAMBDA_BG = 0.35
288
+ LAMBDA_MARKER = 3.0
289
+ LAMBDA_MT = 1.0
290
+
291
+ SAMPLES = [
292
+ ("C1", "Control"),
293
+ ("C2", "Control"),
294
+ ("T1", "Treated"),
295
+ ("T2", "Treated"),
296
+ ]
297
+
298
+
299
+ def poisson(rng: random.Random, lam: float) -> int:
300
+ """Knuth's algorithm; lambdas here are small (<10) so this is fine."""
301
+ limit = 2.718281828459045 ** (-lam)
302
+ k, p = 0, 1.0
303
+ while True:
304
+ p *= rng.random()
305
+ if p <= limit:
306
+ return k
307
+ k += 1
308
+
309
+
310
+ def write_gz(path: Path, text: str) -> None:
311
+ path.parent.mkdir(parents=True, exist_ok=True)
312
+ with gzip.open(path, "wt", newline="\n") as fh:
313
+ fh.write(text)
314
+
315
+
316
+ def main() -> int:
317
+ outdir = Path(sys.argv[1] if len(sys.argv) > 1 else "smoke").resolve()
318
+ rng = random.Random(SEED)
319
+
320
+ genes = [f"GENE{i:04d}" for i in range(1, GENES_BG + 1)]
321
+ markers = [
322
+ [f"CLU{k}_MARK{i:02d}" for i in range(1, MARKERS_PER_CLUSTER + 1)]
323
+ for k in range(N_CLUSTERS)
324
+ ]
325
+ features = genes + [g for grp in markers for g in grp] + MT_GENES
326
+ n_genes = len(features)
327
+
328
+ total_cells = 0
329
+ for sample, condition in SAMPLES:
330
+ sdir = outdir / "data" / "prepared" / sample
331
+ barcodes = [f"{sample}_{i:04d}-1" for i in range(1, CELLS_PER_SAMPLE + 1)]
332
+ entries: list[str] = []
333
+ for cell_idx, _ in enumerate(barcodes):
334
+ # every cell belongs to one of N_CLUSTERS expression programs
335
+ cluster = cell_idx % N_CLUSTERS
336
+ high = set(markers[cluster])
337
+ for gene_idx, gene in enumerate(features, start=1):
338
+ if gene in high:
339
+ lam = LAMBDA_MARKER
340
+ elif gene in MT_GENES:
341
+ lam = LAMBDA_MT
342
+ else:
343
+ lam = LAMBDA_BG
344
+ count = poisson(rng, lam)
345
+ if count:
346
+ # 10x mtx is gene(row) x cell(column), 1-based
347
+ entries.append(f"{gene_idx} {cell_idx + 1} {count}")
348
+ total_cells += len(barcodes)
349
+ write_gz(
350
+ sdir / "matrix.mtx.gz",
351
+ "%%MatrixMarket matrix coordinate integer general\n"
352
+ f"%\n{n_genes} {len(barcodes)} {len(entries)}\n"
353
+ + "\n".join(entries)
354
+ + "\n",
355
+ )
356
+ write_gz(sdir / "barcodes.tsv.gz", "\n".join(barcodes) + "\n")
357
+ write_gz(
358
+ sdir / "features.tsv.gz",
359
+ "".join(f"{g}\t{g}\tGene Expression\n" for g in features),
360
+ )
361
+
362
+ samples_txt = "Sample\tRNAData\tCondition\n" + "".join(
363
+ f"{s}\tdata/prepared/{s}\t{cond}\n" for s, cond in SAMPLES
364
+ )
365
+ (outdir / "data").mkdir(parents=True, exist_ok=True)
366
+ (outdir / "data" / "samples.txt").write_text(samples_txt)
367
+
368
+ # A tiny local GMT keeps the marker-enrichment step (ClusterMarkers always
369
+ # runs it) offline and deterministic - no Enrichr web service involved.
370
+ gmt = outdir / "data" / "genesets.gmt"
371
+ gmt.write_text(
372
+ "".join(
373
+ f"SYNTH_CLU{k}\tsynthetic marker set {k}\t"
374
+ + "\t".join(grp)
375
+ + "\n"
376
+ for k, grp in enumerate(markers)
377
+ )
378
+ )
379
+
380
+ (outdir / "smoke.config.toml").write_text(
381
+ "\n".join(
382
+ [
383
+ "# Minimal configuration, same shape as the documented",
384
+ "# ImmunopipeMinimal.config.toml, pointed at the synthetic data.",
385
+ 'name = "ImmunopipeSmoke"',
386
+ 'outdir = "smoke-output"',
387
+ "",
388
+ "[SampleInfo.in]",
389
+ 'infile = ["data/samples.txt"]',
390
+ "",
391
+ "# Keep the smoke run small: 2 cores, and a local GMT instead of the",
392
+ "# default Enrichr databases so the run needs no web service.",
393
+ "[SeuratPreparing.envs]",
394
+ "ncores = 2",
395
+ "",
396
+ "[SeuratClustering.envs]",
397
+ "ncores = 2",
398
+ "",
399
+ "[ClusterMarkers.envs]",
400
+ "ncores = 2",
401
+ f'dbs = ["{gmt}"]',
402
+ "",
403
+ "[SeuratClusterStats.envs]",
404
+ "ncores = 2",
405
+ "",
406
+ ]
407
+ )
408
+ )
409
+
410
+ print(
411
+ f"generated {total_cells} cells x {n_genes} genes across "
412
+ f"{N_SAMPLES} samples in {outdir}"
413
+ )
414
+ return 0
415
+
416
+
417
+ if __name__ == "__main__":
418
+ raise SystemExit(main())
419
+ PY
420
+ micromamba run -n immunopipe python "$LOGDIR/gen_smoke_data.py" "$SMOKEDIR"
421
+ cd "$SMOKEDIR"
422
+ micromamba run -n immunopipe immunopipe @smoke.config.toml 2>&1 | tee "$LOGDIR/smoke-run.log"
423
+ # The documented minimal run leaves reports at <outdir>/REPORTS/index.html.
424
+ # pipen may override the configured `outdir`, so accept any directory
425
+ # directly under the run directory that holds REPORTS/index.html.
426
+ OUT=""
427
+ for d in "$SMOKEDIR"/*/; do
428
+ if [ -f "${d}REPORTS/index.html" ]; then OUT="${d%/}"; break; fi
429
+ done
430
+ if [ -z "$OUT" ]; then
431
+ echo "::error::the smoke run produced no <outdir>/REPORTS/index.html"
432
+ ls -la "$SMOKEDIR"
433
+ exit 1
434
+ fi
435
+ echo "smoke run output directory: $OUT"
436
+ find "$OUT" -maxdepth 1 | sort | head -40
437
+
438
+ # Diagnostic only: repeats the solve with --dry-run for both environment files
439
+ # so the unresolved specs are in one greppable place even when the real install
440
+ # aborted at step 1. Never fails the job.
441
+ - name: Availability probe (diagnostic)
442
+ if: always()
443
+ continue-on-error: true
444
+ run: |
445
+ # On macOS the documented conda path is expected to be unavailable, and
446
+ # setup-micromamba can fail before it puts micromamba on PATH. Without a
447
+ # micromamba this probe would only record "command not found", which proves
448
+ # nothing about the channel; so fetch a platform-native one, purely to run the
449
+ # dry-run solve and get the unresolved specs into the artifact.
450
+ if ! command -v micromamba >/dev/null 2>&1; then
451
+ case "$(uname -s)-$(uname -m)" in
452
+ Darwin-arm64) mm_platform=osx-arm64 ;;
453
+ Darwin-*) mm_platform=osx-64 ;;
454
+ Linux-x86_64) mm_platform=linux-64 ;;
455
+ Linux-aarch64|Linux-arm64) mm_platform=linux-aarch64 ;;
456
+ *) mm_platform="" ;;
457
+ esac
458
+ if [ -n "$mm_platform" ]; then
459
+ mm_bindir="${RUNNER_TEMP:-/tmp}/mm-probe"
460
+ mkdir -p "$mm_bindir"
461
+ echo "micromamba is not on PATH; fetching one ($mm_platform) for the probe"
462
+ curl -fLsS --max-time 120 "https://micro.mamba.pm/api/micromamba/$mm_platform/latest" \
463
+ | tar -xj -C "$mm_bindir" bin/micromamba || true
464
+ if [ -x "$mm_bindir/bin/micromamba" ]; then
465
+ export PATH="$mm_bindir/bin:$PATH"
466
+ micromamba --version
467
+ else
468
+ echo "::warning::no micromamba for the probe either - the 'Documented step 1' log is the remaining evidence on this platform"
469
+ fi
470
+ fi
471
+ fi
472
+ probe() {
473
+ envfile="$1"; platform="$2"; tag="$3"
474
+ if [ -n "$platform" ]; then
475
+ echo "### micromamba create -n probe-$tag --dry-run --platform $platform -f $envfile"
476
+ micromamba create -n "probe-$tag" --dry-run -y --platform "$platform" -f "$envfile" 2>&1 | tee "$LOGDIR/probe-$tag.log" || true
477
+ else
478
+ echo "### micromamba create -n probe-$tag --dry-run -f $envfile"
479
+ micromamba create -n "probe-$tag" --dry-run -y -f "$envfile" 2>&1 | tee "$LOGDIR/probe-$tag.log" || true
480
+ fi
481
+ }
482
+ probe "$ENV_BASE" "" "base-native"
483
+ probe "$ENV_RPKGS" "" "rpkgs-native"
484
+ if [ -n "$PROBE_PLATFORM" ]; then
485
+ probe "$ENV_BASE" "$PROBE_PLATFORM" "base-$PROBE_PLATFORM"
486
+ probe "$ENV_RPKGS" "$PROBE_PLATFORM" "rpkgs-$PROBE_PLATFORM"
487
+ fi
488
+ {
489
+ for f in "$LOGDIR"/probe-*.log; do
490
+ [ -f "$f" ] || continue
491
+ echo "===== $(basename "$f") ====="
492
+ grep -nE 'does not exist|not installable|cannot be installed|Could not solve|PackagesNotFound|nothing provides' "$f" | head -80 || echo "(no unresolved specs reported)"
493
+ done
494
+ } 2>&1 | tee "$LOGDIR/probe-unresolved.log"
495
+
496
+ # Platform-aware, and the only place a job is allowed to go red. The raw outcomes
497
+ # come in through env: a step with `continue-on-error: true` is reported by GitHub as
498
+ # "success", but `steps.<id>.outcome` still says "failure", and that is what decides.
499
+ - name: Verdict
500
+ if: always()
501
+ env:
502
+ OUTCOME_BASE: ${{ steps.base.outcome }}
503
+ OUTCOME_RPKGS: ${{ steps.rpkgs.outcome }}
504
+ OUTCOME_INSTALL: ${{ steps.install.outcome }}
505
+ OUTCOME_REPORTDEPS: ${{ steps.reportdeps.outcome }}
506
+ OUTCOME_PIPVENV: ${{ steps.pipvenv.outcome }}
507
+ OUTCOME_SMOKE: ${{ steps.smoke.outcome }}
508
+ run: |
509
+ {
510
+ echo "## install-matrix verdict: $MATRIX_OS (runner.os=$RUNNER_OS)"
511
+ echo
512
+ echo "| documented step | outcome |"
513
+ echo "| --- | --- |"
514
+ echo "| 1. conda env create -f $ENV_BASE | $OUTCOME_BASE |"
515
+ echo "| 2. conda env update -f $ENV_RPKGS | $OUTCOME_RPKGS |"
516
+ echo "| 3. pip install -U immunopipe (into the conda env) | $OUTCOME_INSTALL |"
517
+ echo "| 3b. pipen report update | $OUTCOME_REPORTDEPS |"
518
+ echo "| 4. immunopipe @smoke.config.toml | $OUTCOME_SMOKE |"
519
+ echo "| 5. pip install -U immunopipe (plain venv, macOS only) | $OUTCOME_PIPVENV |"
520
+ echo
521
+ } >> "$GITHUB_STEP_SUMMARY"
522
+ failed=0
523
+ if [ "$RUNNER_OS" = "macOS" ]; then
524
+ {
525
+ echo "### macOS: the conda route is expected to fail here and is not gated"
526
+ echo
527
+ echo "docs/installation.md documents the conda route as **Linux-only**: the R"
528
+ echo "packages immunopipe depends on are published on the pwwang channel as"
529
+ echo "linux-64 builds only, so \`conda env create -f $ENV_BASE\` cannot solve on"
530
+ echo "macOS (Intel or Apple silicon). This run recorded that: step 1 ="
531
+ echo "$OUTCOME_BASE, step 2 = $OUTCOME_RPKGS, step 3 = $OUTCOME_INSTALL, and the"
532
+ echo "solver output is in the install-logs artifact (rpkgs.log, pip-install.log,"
533
+ echo "probe-*.log)."
534
+ echo
535
+ echo ""
536
+ echo "**The supported route on macOS is the container image**, which carries"
537
+ echo "the whole R environment; this job cannot exercise it, because a macOS"
538
+ echo "runner cannot run Linux containers. Step 5 below only checks that the"
539
+ echo "Python package installs on macOS with pip; it does not make pip a supported"
540
+ echo "installation route, since without the R dependencies the pipeline cannot"
541
+ echo "run."
542
+ echo
543
+ } >> "$GITHUB_STEP_SUMMARY"
544
+ if [ "$OUTCOME_PIPVENV" != "success" ]; then failed=1; fi
545
+ else
546
+ for outcome in "$OUTCOME_BASE" "$OUTCOME_RPKGS" "$OUTCOME_INSTALL" "$OUTCOME_SMOKE"; do
547
+ if [ "$outcome" != "success" ]; then failed=1; fi
548
+ done
549
+ fi
550
+ if [ "$failed" -ne 0 ]; then
551
+ {
552
+ if [ "$RUNNER_OS" = "macOS" ]; then
553
+ echo "**RESULT: the documented macOS path (\`pip install -U immunopipe\` in a plain virtualenv) does NOT work.**"
554
+ echo
555
+ echo "The conda failures listed above are expected and are not what failed this"
556
+ echo "job; step 5 is. See install-logs/pipvenv-install.log."
557
+ else
558
+ echo "**RESULT: the documented installation + run does NOT work on this platform.**"
559
+ echo
560
+ echo "Unresolved specs reported by the availability probe:"
561
+ echo
562
+ echo '```'
563
+ cat "$LOGDIR/probe-unresolved.log" 2>/dev/null || echo "(probe log missing)"
564
+ echo '```'
565
+ fi
566
+ } >> "$GITHUB_STEP_SUMMARY"
567
+ echo "::error::install-matrix: the claim for this platform ($RUNNER_OS) is not met on $MATRIX_OS - see the job summary and the install-logs artifact"
568
+ exit 1
569
+ fi
570
+ if [ "$RUNNER_OS" = "macOS" ]; then
571
+ echo "**RESULT: as documented, the conda environment is unavailable on macOS (recorded above) and the Python package still installs with pip. macOS users are directed to the container image, which this job cannot exercise.**" >> "$GITHUB_STEP_SUMMARY"
572
+ else
573
+ echo "**RESULT: the documented installation path installs AND runs the pipeline on this platform.**" >> "$GITHUB_STEP_SUMMARY"
574
+ fi
575
+
576
+ - name: Upload logs and smoke-run reports
577
+ if: always()
578
+ uses: actions/upload-artifact@v4
579
+ with:
580
+ name: install-logs-${{ matrix.os }}
581
+ path: |
582
+ install-logs/**
583
+ smoke/*/REPORTS/**
584
+ if-no-files-found: ignore
585
+ retention-days: 30