biopipen 0.33.1__tar.gz → 0.34.0__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.

Potentially problematic release.


This version of biopipen might be problematic. Click here for more details.

Files changed (338) hide show
  1. {biopipen-0.33.1 → biopipen-0.34.0}/PKG-INFO +2 -1
  2. biopipen-0.34.0/biopipen/__init__.py +1 -0
  3. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/core/filters.py +10 -183
  4. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/core/proc.py +5 -3
  5. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/core/testing.py +8 -1
  6. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/ns/bam.py +40 -4
  7. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/ns/cnv.py +1 -1
  8. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/ns/cnvkit.py +1 -1
  9. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/ns/delim.py +1 -1
  10. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/ns/gsea.py +63 -37
  11. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/ns/misc.py +38 -0
  12. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/ns/plot.py +8 -0
  13. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/ns/scrna.py +290 -288
  14. biopipen-0.34.0/biopipen/ns/scrna_metabolic_landscape.py +511 -0
  15. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/ns/tcr.py +165 -97
  16. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/reports/bam/CNVpytor.svelte +4 -9
  17. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/reports/cnvkit/CNVkitDiagram.svelte +1 -1
  18. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/reports/cnvkit/CNVkitHeatmap.svelte +1 -1
  19. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/reports/cnvkit/CNVkitScatter.svelte +1 -1
  20. biopipen-0.33.1/biopipen/reports/delim/SampleInfo.svelte → biopipen-0.34.0/biopipen/reports/common.svelte +2 -3
  21. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/reports/scrna/DimPlots.svelte +1 -1
  22. biopipen-0.34.0/biopipen/reports/scrna_metabolic_landscape/MetabolicFeatures.svelte +61 -0
  23. biopipen-0.34.0/biopipen/reports/scrna_metabolic_landscape/MetabolicPathwayActivity.svelte +93 -0
  24. biopipen-0.34.0/biopipen/reports/scrna_metabolic_landscape/MetabolicPathwayHeterogeneity.svelte +72 -0
  25. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/reports/snp/PlinkCallRate.svelte +2 -2
  26. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/reports/snp/PlinkFreq.svelte +1 -1
  27. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/reports/snp/PlinkHWE.svelte +1 -1
  28. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/reports/snp/PlinkHet.svelte +1 -1
  29. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/reports/snp/PlinkIBD.svelte +1 -1
  30. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/reports/tcr/CDR3AAPhyschem.svelte +1 -1
  31. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/bam/CNAClinic.R +41 -6
  32. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/bam/CNVpytor.py +2 -1
  33. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/bam/ControlFREEC.py +2 -3
  34. biopipen-0.34.0/biopipen/scripts/bam/SamtoolsView.py +33 -0
  35. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/cnv/AneuploidyScore.R +25 -13
  36. biopipen-0.34.0/biopipen/scripts/cnv/AneuploidyScoreSummary.R +397 -0
  37. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/cnv/TMADScore.R +4 -4
  38. biopipen-0.34.0/biopipen/scripts/cnv/TMADScoreSummary.R +164 -0
  39. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/cnvkit/CNVkitGuessBaits.py +3 -3
  40. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/cnvkit/CNVkitHeatmap.py +3 -3
  41. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/cnvkit/CNVkitReference.py +3 -3
  42. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/delim/RowsBinder.R +1 -1
  43. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/delim/SampleInfo.R +4 -1
  44. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/gene/GeneNameConversion.R +14 -12
  45. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/gsea/Enrichr.R +2 -2
  46. biopipen-0.34.0/biopipen/scripts/gsea/FGSEA.R +192 -0
  47. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/gsea/PreRank.R +3 -3
  48. biopipen-0.34.0/biopipen/scripts/misc/Plot.R +80 -0
  49. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/plot/VennDiagram.R +2 -2
  50. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/protein/ProdigySummary.R +34 -27
  51. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/regulatory/MotifAffinityTest.R +11 -9
  52. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/regulatory/MotifAffinityTest_AtSNP.R +5 -5
  53. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/regulatory/MotifAffinityTest_MotifBreakR.R +4 -4
  54. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/regulatory/VariantMotifPlot.R +10 -8
  55. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/regulatory/motifs-common.R +10 -9
  56. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/rnaseq/Simulation-ESCO.R +14 -11
  57. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/rnaseq/Simulation-RUVcorr.R +7 -4
  58. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/rnaseq/Simulation.R +0 -2
  59. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/rnaseq/UnitConversion.R +6 -5
  60. biopipen-0.34.0/biopipen/scripts/scrna/AnnData2Seurat.R +39 -0
  61. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/scrna/CellCellCommunication.py +1 -1
  62. biopipen-0.34.0/biopipen/scripts/scrna/CellCellCommunicationPlots.R +74 -0
  63. biopipen-0.34.0/biopipen/scripts/scrna/CellTypeAnnotation-celltypist.R +201 -0
  64. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/scrna/CellTypeAnnotation-direct.R +11 -9
  65. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/scrna/CellTypeAnnotation-hitype.R +12 -9
  66. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/scrna/CellTypeAnnotation-sccatch.R +14 -11
  67. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/scrna/CellTypeAnnotation-sctype.R +19 -16
  68. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/scrna/CellTypeAnnotation.R +10 -2
  69. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/scrna/CellsDistribution.R +1 -1
  70. biopipen-0.34.0/biopipen/scripts/scrna/ExprImputation-alra.R +109 -0
  71. biopipen-0.34.0/biopipen/scripts/scrna/ExprImputation-rmagic.R +256 -0
  72. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/scrna/ExprImputation-scimpute.R +8 -5
  73. biopipen-0.34.0/biopipen/scripts/scrna/MarkersFinder.R +507 -0
  74. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/scrna/MetaMarkers.R +3 -3
  75. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/scrna/ModuleScoreCalculator.R +14 -13
  76. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/scrna/RadarPlots.R +1 -1
  77. biopipen-0.34.0/biopipen/scripts/scrna/ScFGSEA.R +276 -0
  78. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/scrna/ScSimulation.R +11 -10
  79. biopipen-0.34.0/biopipen/scripts/scrna/ScVelo.py +605 -0
  80. biopipen-0.34.0/biopipen/scripts/scrna/Seurat2AnnData.R +7 -0
  81. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/scrna/SeuratClusterStats-clustree.R +1 -1
  82. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/scrna/SeuratClusterStats-features.R +39 -30
  83. biopipen-0.34.0/biopipen/scripts/scrna/SeuratClusterStats-ngenes.R +81 -0
  84. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/scrna/SeuratClusterStats-stats.R +4 -4
  85. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/scrna/SeuratClusterStats.R +9 -6
  86. biopipen-0.34.0/biopipen/scripts/scrna/SeuratClustering.R +39 -0
  87. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/scrna/SeuratLoading.R +2 -2
  88. biopipen-0.34.0/biopipen/scripts/scrna/SeuratMap2Ref.R +111 -0
  89. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/scrna/SeuratMetadataMutater.R +5 -7
  90. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/scrna/SeuratPreparing.R +76 -24
  91. biopipen-0.34.0/biopipen/scripts/scrna/SeuratSubClustering.R +64 -0
  92. biopipen-0.33.1/biopipen/scripts/scrna/SlingShot.R → biopipen-0.34.0/biopipen/scripts/scrna/Slingshot.R +12 -16
  93. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/scrna/Subset10X.R +2 -2
  94. biopipen-0.34.0/biopipen/scripts/scrna/TopExpressingGenes.R +210 -0
  95. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/scrna/celltypist-wrapper.py +6 -4
  96. biopipen-0.34.0/biopipen/scripts/scrna/seurat_anndata_conversion.py +81 -0
  97. biopipen-0.34.0/biopipen/scripts/scrna_metabolic_landscape/MetabolicFeatures.R +471 -0
  98. biopipen-0.34.0/biopipen/scripts/scrna_metabolic_landscape/MetabolicPathwayActivity.R +498 -0
  99. biopipen-0.34.0/biopipen/scripts/scrna_metabolic_landscape/MetabolicPathwayHeterogeneity.R +263 -0
  100. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/snp/MatrixEQTL.R +39 -20
  101. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/snp/PlinkCallRate.R +43 -34
  102. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/snp/PlinkFreq.R +34 -41
  103. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/snp/PlinkHWE.R +23 -18
  104. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/snp/PlinkHet.R +26 -22
  105. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/snp/PlinkIBD.R +30 -34
  106. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/stats/ChowTest.R +9 -8
  107. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/stats/DiffCoexpr.R +13 -11
  108. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/stats/LiquidAssoc.R +7 -8
  109. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/stats/Mediation.R +8 -8
  110. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/stats/MetaPvalue.R +11 -13
  111. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/stats/MetaPvalue1.R +6 -5
  112. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/tcr/CDR3AAPhyschem.R +105 -164
  113. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/tcr/ClonalStats.R +5 -4
  114. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/tcr/CloneResidency.R +3 -3
  115. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/tcr/CloneSizeQQPlot.R +2 -2
  116. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/tcr/Immunarch2VDJtools.R +2 -2
  117. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/tcr/ImmunarchFilter.R +3 -3
  118. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/tcr/ImmunarchLoading.R +5 -5
  119. biopipen-0.34.0/biopipen/scripts/tcr/ScRepCombiningExpression.R +39 -0
  120. biopipen-0.34.0/biopipen/scripts/tcr/ScRepLoading.R +149 -0
  121. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/tcr/TCRClusterStats.R +2 -2
  122. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/tcr/TCRClustering.R +86 -97
  123. biopipen-0.34.0/biopipen/scripts/tcr/TESSA.R +185 -0
  124. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/tcr/VJUsage.R +5 -5
  125. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/vcf/TruvariBenchSummary.R +15 -11
  126. biopipen-0.34.0/biopipen/utils/common_docstrs.py +103 -0
  127. biopipen-0.34.0/biopipen/utils/reporter.py +177 -0
  128. {biopipen-0.33.1 → biopipen-0.34.0}/pyproject.toml +2 -1
  129. {biopipen-0.33.1 → biopipen-0.34.0}/setup.py +4 -3
  130. biopipen-0.33.1/biopipen/__init__.py +0 -1
  131. biopipen-0.33.1/biopipen/ns/scrna_metabolic_landscape.py +0 -670
  132. biopipen-0.33.1/biopipen/reports/scrna/CellCellCommunicationPlots.svelte +0 -14
  133. biopipen-0.33.1/biopipen/reports/scrna/SeuratClusterStats.svelte +0 -16
  134. biopipen-0.33.1/biopipen/reports/scrna/SeuratMap2Ref.svelte +0 -37
  135. biopipen-0.33.1/biopipen/reports/scrna/SeuratPreparing.svelte +0 -15
  136. biopipen-0.33.1/biopipen/reports/scrna_metabolic_landscape/MetabolicFeatures.svelte +0 -32
  137. biopipen-0.33.1/biopipen/reports/scrna_metabolic_landscape/MetabolicFeaturesIntraSubset.svelte +0 -28
  138. biopipen-0.33.1/biopipen/reports/scrna_metabolic_landscape/MetabolicPathwayActivity.svelte +0 -89
  139. biopipen-0.33.1/biopipen/reports/scrna_metabolic_landscape/MetabolicPathwayHeterogeneity.svelte +0 -15
  140. biopipen-0.33.1/biopipen/reports/utils/gsea.liq +0 -110
  141. biopipen-0.33.1/biopipen/scripts/cnv/AneuploidyScoreSummary.R +0 -342
  142. biopipen-0.33.1/biopipen/scripts/cnv/TMADScoreSummary.R +0 -197
  143. biopipen-0.33.1/biopipen/scripts/gsea/FGSEA.R +0 -58
  144. biopipen-0.33.1/biopipen/scripts/scrna/AnnData2Seurat.R +0 -87
  145. biopipen-0.33.1/biopipen/scripts/scrna/CellCellCommunicationPlots.R +0 -191
  146. biopipen-0.33.1/biopipen/scripts/scrna/CellTypeAnnotation-celltypist.R +0 -252
  147. biopipen-0.33.1/biopipen/scripts/scrna/CellTypeAnnotation-common.R +0 -10
  148. biopipen-0.33.1/biopipen/scripts/scrna/ExprImputation-alra.R +0 -33
  149. biopipen-0.33.1/biopipen/scripts/scrna/ExprImputation-rmagic.R +0 -30
  150. biopipen-0.33.1/biopipen/scripts/scrna/MarkersFinder.R +0 -376
  151. biopipen-0.33.1/biopipen/scripts/scrna/ScFGSEA.R +0 -194
  152. biopipen-0.33.1/biopipen/scripts/scrna/ScVelo.py +0 -0
  153. biopipen-0.33.1/biopipen/scripts/scrna/Seurat2AnnData.R +0 -8
  154. biopipen-0.33.1/biopipen/scripts/scrna/SeuratClusterStats-ngenes.R +0 -90
  155. biopipen-0.33.1/biopipen/scripts/scrna/SeuratClustering-common.R +0 -213
  156. biopipen-0.33.1/biopipen/scripts/scrna/SeuratClustering.R +0 -56
  157. biopipen-0.33.1/biopipen/scripts/scrna/SeuratMap2Ref.R +0 -412
  158. biopipen-0.33.1/biopipen/scripts/scrna/SeuratSubClustering.R +0 -203
  159. biopipen-0.33.1/biopipen/scripts/scrna/TopExpressingGenes.R +0 -253
  160. biopipen-0.33.1/biopipen/scripts/scrna_metabolic_landscape/MetabolicFeatures.R +0 -165
  161. biopipen-0.33.1/biopipen/scripts/scrna_metabolic_landscape/MetabolicFeaturesIntraSubset.R +0 -193
  162. biopipen-0.33.1/biopipen/scripts/scrna_metabolic_landscape/MetabolicPathwayActivity.R +0 -397
  163. biopipen-0.33.1/biopipen/scripts/scrna_metabolic_landscape/MetabolicPathwayHeterogeneity.R +0 -254
  164. biopipen-0.33.1/biopipen/scripts/tcr/ScRepLoading.R +0 -127
  165. biopipen-0.33.1/biopipen/scripts/tcr/TESSA.R +0 -235
  166. biopipen-0.33.1/biopipen/utils/caching.R +0 -44
  167. biopipen-0.33.1/biopipen/utils/common_docstrs.py +0 -100
  168. biopipen-0.33.1/biopipen/utils/gene.R +0 -95
  169. biopipen-0.33.1/biopipen/utils/gsea.R +0 -329
  170. biopipen-0.33.1/biopipen/utils/io.R +0 -20
  171. biopipen-0.33.1/biopipen/utils/misc.R +0 -602
  172. biopipen-0.33.1/biopipen/utils/mutate_helpers.R +0 -581
  173. biopipen-0.33.1/biopipen/utils/plot.R +0 -209
  174. biopipen-0.33.1/biopipen/utils/repr.R +0 -146
  175. biopipen-0.33.1/biopipen/utils/rnaseq.R +0 -48
  176. biopipen-0.33.1/biopipen/utils/single_cell.R +0 -207
  177. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/core/__init__.py +0 -0
  178. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/core/config.py +0 -0
  179. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/core/config.toml +0 -0
  180. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/core/defaults.py +0 -0
  181. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/ns/__init__.py +0 -0
  182. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/ns/bed.py +0 -0
  183. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/ns/cellranger.py +0 -0
  184. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/ns/cellranger_pipeline.py +0 -0
  185. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/ns/cnvkit_pipeline.py +0 -0
  186. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/ns/gene.py +0 -0
  187. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/ns/protein.py +0 -0
  188. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/ns/regulatory.py +0 -0
  189. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/ns/rnaseq.py +0 -0
  190. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/ns/snp.py +0 -0
  191. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/ns/stats.py +0 -0
  192. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/ns/tcgamaf.py +0 -0
  193. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/ns/vcf.py +0 -0
  194. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/ns/web.py +0 -0
  195. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/reports/bam/CNAClinic.svelte +0 -0
  196. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/reports/bam/ControlFREEC.svelte +0 -0
  197. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/reports/cellranger/CellRangerCount.svelte +0 -0
  198. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/reports/cellranger/CellRangerSummary.svelte +0 -0
  199. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/reports/cellranger/CellRangerVdj.svelte +0 -0
  200. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/reports/cnv/AneuploidyScore.svelte +0 -0
  201. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/reports/cnv/AneuploidyScoreSummary.svelte +0 -0
  202. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/reports/cnv/TMADScoreSummary.svelte +0 -0
  203. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/reports/gsea/FGSEA.svelte +0 -0
  204. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/reports/gsea/GSEA.svelte +0 -0
  205. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/reports/protein/ProdigySummary.svelte +0 -0
  206. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/reports/scrna/CellsDistribution.svelte +0 -0
  207. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/reports/scrna/MarkersFinder.svelte +0 -0
  208. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/reports/scrna/MetaMarkers.svelte +0 -0
  209. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/reports/scrna/RadarPlots.svelte +0 -0
  210. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/reports/scrna/ScFGSEA.svelte +0 -0
  211. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/reports/scrna/TopExpressingGenes.svelte +0 -0
  212. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/reports/tcr/ClonalStats.svelte +0 -0
  213. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/reports/tcr/CloneResidency.svelte +0 -0
  214. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/reports/tcr/Immunarch.svelte +0 -0
  215. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/reports/tcr/SampleDiversity.svelte +0 -0
  216. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/reports/tcr/TCRClusterStats.svelte +0 -0
  217. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/reports/tcr/TESSA.svelte +0 -0
  218. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/reports/tcr/VJUsage.svelte +0 -0
  219. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/reports/utils/misc.liq +0 -0
  220. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/reports/vcf/TruvariBenchSummary.svelte +0 -0
  221. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/reports/vcf/TruvariConsistency.svelte +0 -0
  222. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/bam/BamMerge.py +0 -0
  223. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/bam/BamSampling.py +0 -0
  224. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/bam/BamSort.py +0 -0
  225. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/bam/BamSplitChroms.py +0 -0
  226. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/bam/BamSubsetByBed.py +0 -0
  227. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/bed/Bed2Vcf.py +0 -0
  228. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/bed/BedConsensus.py +0 -0
  229. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/bed/BedLiftOver.sh +0 -0
  230. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/bed/BedtoolsIntersect.py +0 -0
  231. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/bed/BedtoolsMakeWindows.py +0 -0
  232. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/bed/BedtoolsMerge.py +0 -0
  233. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/cellranger/CellRangerCount.py +0 -0
  234. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/cellranger/CellRangerSummary.R +0 -0
  235. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/cellranger/CellRangerVdj.py +0 -0
  236. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/cnvkit/CNVkitAccess.py +0 -0
  237. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/cnvkit/CNVkitAutobin.py +0 -0
  238. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/cnvkit/CNVkitBatch.py +0 -0
  239. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/cnvkit/CNVkitCall.py +0 -0
  240. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/cnvkit/CNVkitCoverage.py +0 -0
  241. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/cnvkit/CNVkitDiagram.py +0 -0
  242. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/cnvkit/CNVkitFix.py +0 -0
  243. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/cnvkit/CNVkitScatter.py +0 -0
  244. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/cnvkit/CNVkitSegment.py +0 -0
  245. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/cnvkit/guess_baits.py +0 -0
  246. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/gene/GenePromoters.R +0 -0
  247. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/gsea/GSEA.R +0 -0
  248. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/misc/Config2File.py +0 -0
  249. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/misc/Shell.sh +0 -0
  250. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/misc/Str2File.py +0 -0
  251. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/plot/Heatmap.R +0 -0
  252. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/plot/Manhattan.R +0 -0
  253. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/plot/QQPlot.R +0 -0
  254. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/plot/ROC.R +0 -0
  255. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/plot/Scatter.R +0 -0
  256. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/protein/MMCIF2PDB.py +0 -0
  257. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/protein/PDB2Fasta.py +0 -0
  258. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/protein/Prodigy.py +0 -0
  259. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/protein/RMSD.py +0 -0
  260. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/regulatory/MotifScan.py +0 -0
  261. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/scrna/CCPlotR-patch.R +0 -0
  262. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/scrna/DimPlots.R +0 -0
  263. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/scrna/ExprImputation.R +0 -0
  264. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/scrna/LoomTo10X.R +0 -0
  265. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/scrna/SCImpute.R +0 -0
  266. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/scrna/SCP-plot.R +0 -0
  267. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/scrna/SeuratClusterStats-dimplots.R +0 -0
  268. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/scrna/SeuratFilter.R +0 -0
  269. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/scrna/SeuratSplit.R +0 -0
  270. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/scrna/SeuratSubset.R +0 -0
  271. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/scrna/SeuratTo10X.R +0 -0
  272. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/scrna/sctype.R +0 -0
  273. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/snp/Plink2GTMat.py +0 -0
  274. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/snp/PlinkFilter.py +0 -0
  275. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/snp/PlinkFromVcf.py +0 -0
  276. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/snp/PlinkSimulation.py +0 -0
  277. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/snp/PlinkUpdateName.py +0 -0
  278. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/tcgamaf/Maf2Vcf.py +0 -0
  279. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/tcgamaf/MafAddChr.py +0 -0
  280. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/tcgamaf/maf2vcf.pl +0 -0
  281. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/tcr/Attach2Seurat.R +0 -0
  282. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/tcr/GIANA/GIANA.py +0 -0
  283. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/tcr/GIANA/GIANA4.py +0 -0
  284. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/tcr/GIANA/Imgt_Human_TRBV.fasta +0 -0
  285. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/tcr/GIANA/query.py +0 -0
  286. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/tcr/Immunarch-basic.R +0 -0
  287. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/tcr/Immunarch-clonality.R +0 -0
  288. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/tcr/Immunarch-diversity.R +0 -0
  289. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/tcr/Immunarch-geneusage.R +0 -0
  290. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/tcr/Immunarch-kmer.R +0 -0
  291. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/tcr/Immunarch-overlap.R +0 -0
  292. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/tcr/Immunarch-spectratyping.R +0 -0
  293. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/tcr/Immunarch-tracking.R +0 -0
  294. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/tcr/Immunarch-vjjunc.R +0 -0
  295. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/tcr/Immunarch.R +0 -0
  296. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/tcr/ImmunarchSplitIdents.R +0 -0
  297. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/tcr/SampleDiversity.R +0 -0
  298. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/tcr/TCRDock.py +0 -0
  299. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/tcr/TESSA_source/Atchley_factors.csv +0 -0
  300. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/tcr/TESSA_source/BriseisEncoder.py +0 -0
  301. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/tcr/TESSA_source/MCMC_control.R +0 -0
  302. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/tcr/TESSA_source/TrainedEncoder.h5 +0 -0
  303. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/tcr/TESSA_source/fixed_b.csv +0 -0
  304. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/tcr/TESSA_source/initialization.R +0 -0
  305. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/tcr/TESSA_source/post_analysis.R +0 -0
  306. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/tcr/TESSA_source/real_data.R +0 -0
  307. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/tcr/TESSA_source/update.R +0 -0
  308. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/tcr/TESSA_source/utility.R +0 -0
  309. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/tcr/immunarch-patched.R +0 -0
  310. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/tcr/vdjtools-patch.sh +0 -0
  311. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/vcf/BcftoolsAnnotate.py +0 -0
  312. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/vcf/BcftoolsFilter.py +0 -0
  313. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/vcf/BcftoolsMerge.py +0 -0
  314. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/vcf/BcftoolsSort.py +0 -0
  315. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/vcf/BcftoolsView.py +0 -0
  316. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/vcf/TruvariBench.sh +0 -0
  317. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/vcf/TruvariConsistency.R +0 -0
  318. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/vcf/Vcf2Bed.py +0 -0
  319. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/vcf/VcfAnno.py +0 -0
  320. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/vcf/VcfDownSample.sh +0 -0
  321. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/vcf/VcfFilter.py +0 -0
  322. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/vcf/VcfFix.py +0 -0
  323. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/vcf/VcfFix_utils.py +0 -0
  324. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/vcf/VcfIndex.py +0 -0
  325. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/vcf/VcfIntersect.py +0 -0
  326. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/vcf/VcfLiftOver.sh +0 -0
  327. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/vcf/VcfSplitSamples.py +0 -0
  328. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/vcf/bcftools_utils.py +0 -0
  329. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/web/Download.py +0 -0
  330. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/web/DownloadList.py +0 -0
  331. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/web/GCloudStorageDownloadBucket.py +0 -0
  332. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/web/GCloudStorageDownloadFile.py +0 -0
  333. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/scripts/web/gcloud_common.py +0 -0
  334. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/utils/__init__.py +0 -0
  335. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/utils/gene.py +0 -0
  336. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/utils/misc.py +0 -0
  337. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/utils/reference.py +0 -0
  338. {biopipen-0.33.1 → biopipen-0.34.0}/biopipen/utils/vcf.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: biopipen
3
- Version: 0.33.1
3
+ Version: 0.34.0
4
4
  Summary: Bioinformatics processes/pipelines that can be run from `pipen run`
5
5
  License: MIT
6
6
  Author: pwwang
@@ -17,6 +17,7 @@ Provides-Extra: runinfo
17
17
  Requires-Dist: datar[pandas] (>=0.15.8,<0.16.0)
18
18
  Requires-Dist: pipen-board[report] (>=0.17,<0.18)
19
19
  Requires-Dist: pipen-cli-run (>=0.15,<0.16)
20
+ Requires-Dist: pipen-deprecated (>=0.0,<0.1)
20
21
  Requires-Dist: pipen-filters (>=0.15,<0.16)
21
22
  Requires-Dist: pipen-poplog (>=0.3,<0.4)
22
23
  Requires-Dist: pipen-runinfo (>=0.9,<0.10) ; extra == "runinfo"
@@ -0,0 +1 @@
1
+ __version__ = "0.34.0"
@@ -6,9 +6,10 @@ import shlex
6
6
  from pathlib import Path
7
7
  from typing import Any, List, Mapping
8
8
 
9
- from argx import Namespace
9
+ from argx import Namespace # pyright: ignore[reportPrivateImportUsage]
10
10
  from liquid.filters.manager import FilterManager
11
- from pipen_report.filters import register_component, render_ui, _tag
11
+ from yunpath import CloudPath
12
+ from pipen_report.filters import register_component, _tag
12
13
 
13
14
  # from .defaults import BIOPIPEN_DIR
14
15
 
@@ -172,14 +173,14 @@ def r(
172
173
  return "TRUE"
173
174
  if obj.upper() == "FALSE":
174
175
  return "FALSE"
175
- if obj.upper() == "NA" or obj.upper() == "NULL":
176
+ if obj.upper() == "NA" or obj.upper() == "NULL" or obj == "None":
176
177
  return obj.upper()
177
178
  if re.match(r"^\d+:\d+$", obj):
178
179
  return obj
179
180
  if obj.startswith("r:") or obj.startswith("R:"):
180
181
  return str(obj)[2:]
181
182
  return repr(str(obj))
182
- if isinstance(obj, Path):
183
+ if isinstance(obj, (Path, CloudPath)):
183
184
  return repr(str(obj))
184
185
  if isinstance(obj, (list, tuple, set)):
185
186
  if any(isinstance(i, dict) for i in obj):
@@ -233,6 +234,11 @@ def source_r(path: str | Path, chdir: bool = False) -> str:
233
234
  In addition to generating `source(path)`, we also include the mtime for the script
234
235
  to trigger the job not cached when the script is updated.
235
236
 
237
+ If your process is used in a cloud environment, it is recommended to
238
+ use the `read` filter to load the script content instead of sourcing it using
239
+ the `source` function in R to void the path issue (path could be different
240
+ in different environments).
241
+
236
242
  Args:
237
243
  path: The path to the R script
238
244
 
@@ -248,98 +254,6 @@ def source_r(path: str | Path, chdir: bool = False) -> str:
248
254
  )
249
255
 
250
256
 
251
- @register_component("fgsea")
252
- def _render_fgsea(
253
- cont: Mapping[str, Any],
254
- job: Mapping[str, Any],
255
- level: int,
256
- na_arg: str = "10",
257
- ) -> str:
258
- """Render fgsea report"""
259
- # cont["dir"] is required
260
- n_pathways = int(na_arg)
261
- pathways = []
262
- with Path(cont["dir"]).joinpath("fgsea.txt").open() as f:
263
- next(f) # skip header
264
- for line in f:
265
- items = line.strip().split("\t")
266
- pathways.append((items[0], items[-1]))
267
- if len(pathways) >= n_pathways:
268
- break
269
-
270
- components = [
271
- # Summary
272
- {
273
- "title": "Enrichment Analysis Summary",
274
- "ui": "tabs",
275
- "contents": [
276
- {
277
- "title": "Plot",
278
- "ui": "flat",
279
- "contents": [
280
- {
281
- "kind": "descr",
282
- "content": (
283
- "This table presents a comprehensive summary of the "
284
- "top enriched pathways derived from the fgsea. "
285
- "Each row corresponds to a pathway, and the gene ranks "
286
- "are shown based on the ranking metric used in the "
287
- "analysis. The enrichment score, p-value, and adjusted "
288
- "p-value are also provided to assess the significance "
289
- "of the enrichment."
290
- )
291
- },
292
- {
293
- "kind": "image",
294
- "src": str(Path(cont["dir"]).joinpath("gsea_table.png")),
295
- "download": str(Path(cont["dir"]).joinpath("gsea_table.pdf"))
296
- }
297
- ],
298
- },
299
- {
300
- "title": "Table",
301
- "ui": "flat",
302
- "contents": [
303
- {
304
- "kind": "descr",
305
- "content": (
306
- "This plot represents the GSEA results for a specified "
307
- "gene set, illustrating the distribution and impact of "
308
- "the gene set along the ranked list of genes. "
309
- "The running enrichment score curve shows the "
310
- "cumulative enrichment score as genes from the input "
311
- "list are encountered. Positive peaks on the curve "
312
- "indicate regions where members of the gene set are "
313
- "predominantly found."
314
- )
315
- },
316
- {
317
- "kind": "table",
318
- "src": str(Path(cont["dir"]).joinpath("fgsea.txt")),
319
- "data": {"excluded": {"slug"}},
320
- }
321
- ],
322
- },
323
- ]
324
- },
325
- # Pathways
326
- {
327
- "title": f"Enriched Pathways (Top {n_pathways})",
328
- "ui": "table_of_images",
329
- "contents": [
330
- {
331
- "src": str(Path(cont["dir"]) / f"fgsea_{slug}.png"),
332
- "download": str(Path(cont["dir"]) / f"fgsea_{slug}.pdf"),
333
- "title": pw,
334
- }
335
- for pw, slug in pathways
336
- ]
337
- },
338
- ]
339
-
340
- return render_ui(components, "accordion", job, level) # type: ignore
341
-
342
-
343
257
  @register_component("pdf")
344
258
  def _render_pdf(
345
259
  cont: Mapping[str, Any],
@@ -367,90 +281,3 @@ def _render_gsea(
367
281
  """Render gsea report"""
368
282
  # cont["dir"] is required
369
283
  raise NotImplementedError()
370
-
371
-
372
- @register_component("enrichr")
373
- def _render_enrichr(
374
- cont: Mapping[str, Any],
375
- job: Mapping[str, Any],
376
- level: int,
377
- ) -> str:
378
- """Render enrichr report"""
379
- # cont["dir"] is required
380
- dbs = [sumfile.stem[8:] for sumfile in Path(cont["dir"]).glob("Enrichr-*.txt")]
381
- components = []
382
-
383
- for db in dbs:
384
- enrichr_plots = list(Path(cont["dir"]).glob(f"Enrichr-{db}.*.png"))
385
- if len(enrichr_plots) == 0:
386
- components.append(
387
- {
388
- "title": db,
389
- "ui": "tabs",
390
- "contents": [
391
- {
392
- "title": "Error",
393
- "ui": "flat",
394
- "contents": [
395
- {
396
- "kind": "descr",
397
- "content": (
398
- "The enrichment analysis results of the top "
399
- "biological pathways associated with the input "
400
- "gene set. Each bar represents a pathway, "
401
- "with the length of the bar indicating the "
402
- "number of input genes overlapping with genes "
403
- "in that pathway. The color intensity of the "
404
- "bars reflects the statistical significance of "
405
- "the enrichment (p-value). "
406
- )
407
- },
408
- {
409
- "kind": "error",
410
- "content": "No enriched terms found.",
411
- }
412
- ],
413
- },
414
- ],
415
- }
416
- )
417
- else:
418
- contents = []
419
- for enrichr_plot in enrichr_plots:
420
- plot_type = enrichr_plot.stem.split(".")[-1]
421
- pdf = enrichr_plot.with_suffix(".pdf")
422
- contents.append(
423
- {
424
- "src": str(enrichr_plot),
425
- "title": f"{plot_type.title()} Plot",
426
- "download": str(pdf),
427
- }
428
- )
429
-
430
- components.append(
431
- {
432
- "title": db,
433
- "ui": "tabs",
434
- "contents": [
435
- {
436
- "title": "Plots",
437
- "ui": "table_of_images",
438
- "contents": contents,
439
- },
440
- {
441
- "title": "Table",
442
- "ui": "flat",
443
- "contents": [
444
- {
445
- "kind": "table",
446
- "src": str(
447
- Path(cont["dir"]).joinpath(f"Enrichr-{db}.txt")
448
- ),
449
- }
450
- ],
451
- },
452
- ],
453
- }
454
- )
455
-
456
- return render_ui(components, "accordion", job, level)
@@ -1,7 +1,9 @@
1
1
  """Provides a base class for the processes to subclass"""
2
- from diot import Diot
2
+ from __future__ import annotations
3
+
4
+ from diot import Diot # type: ignore
3
5
  from liquid.defaults import SEARCH_PATHS
4
- from pipen import Proc as PipenProc
6
+ from pipen import Proc as PipenProc # type: ignore
5
7
  from pipen_filters.filters import FILTERS
6
8
 
7
9
  from .filters import filtermanager
@@ -23,7 +25,7 @@ class Proc(PipenProc):
23
25
  template_opts = {
24
26
  "globals": {**FILTERS, "biopipen_dir": str(BIOPIPEN_DIR)},
25
27
  "filters": {**FILTERS, **filtermanager.filters},
26
- "search_paths": SEARCH_PATHS + [str(REPORT_DIR)],
28
+ "search_paths": SEARCH_PATHS + [str(REPORT_DIR)], # type: ignore
27
29
  }
28
30
 
29
31
  plugin_opts = {
@@ -44,12 +44,19 @@ def get_pipeline(testfile, loglevel="debug", enable_report=False, **kwargs):
44
44
  """Get a pipeline for a test file"""
45
45
  name, workdir, outdir = _get_test_dirs(testfile, False)
46
46
  report_plugin_prefix = "+" if enable_report else "-"
47
+ plugins = kwargs.pop("plugins", [])
48
+ if any("report" in p for p in plugins if isinstance(p, str)):
49
+ raise ValueError(
50
+ "Do not pass `report` plugin to `get_pipeline(plugins=[...])`, "
51
+ "use `enable_report` instead."
52
+ )
53
+ plugins.append(f"{report_plugin_prefix}report")
47
54
  kws = {
48
55
  "name": name,
49
56
  "workdir": workdir,
50
57
  "outdir": outdir,
51
58
  "loglevel": loglevel,
52
- "plugins": [f"{report_plugin_prefix}report"],
59
+ "plugins": plugins,
53
60
  }
54
61
  kws.update(kwargs)
55
62
  return Pipen(**kws)
@@ -4,6 +4,9 @@ from ..core.proc import Proc
4
4
  from ..core.config import config
5
5
 
6
6
 
7
+ # +-------------------------------------------------------------------+
8
+ # | CNV callers |
9
+ # +-------------------------------------------------------------------+
7
10
  class CNVpytor(Proc):
8
11
  """Detect CNV using CNVpytor
9
12
 
@@ -26,15 +29,14 @@ class CNVpytor(Proc):
26
29
  binsizes: The binsizes
27
30
  snp: How to read snp data
28
31
  filters: The filters to filter the result
29
- See - https://github.com/abyzovlab/CNVpytor/blob/master
30
- /GettingStarted.md#predicting-cnv-regions
32
+ See - https://github.com/abyzovlab/CNVpytor/blob/master/GettingStarted.md#predicting-cnv-regions
31
33
  mask_snps: Whether mask 1000 Genome snps
32
34
  baf_nomask: Do not use P mask in BAF histograms
33
35
 
34
36
  Requires:
35
37
  cnvpytor:
36
38
  - check: {{proc.envs.cnvpytor}} --version
37
- """
39
+ """ # noqa: E501
38
40
  input = "bamfile:file, snpfile:file"
39
41
  output = "outdir:dir:{{in.bamfile | stem}}.cnvpytor"
40
42
  lang = config.lang.python
@@ -150,7 +152,7 @@ class CNAClinic(Proc):
150
152
  A list of sample names
151
153
  A float number (0 < x <= 1), the fraction of samples to use
152
154
  A integer number (x > 1), the number of samples to use
153
- binsize: Directly use this binsize for CNAClinic, in kbp.
155
+ binsize: Directly use this binsize for CNAClinic, in bp.
154
156
  genome: The genome assembly
155
157
  run_args: The arguments for CNAClinic::runSegmentation
156
158
  plot_args: The arguments for CNAClinic::plotSampleData
@@ -181,6 +183,9 @@ class CNAClinic(Proc):
181
183
  }
182
184
 
183
185
 
186
+ # +-------------------------------------------------------------------+
187
+ # | Bam processing tools |
188
+ # +-------------------------------------------------------------------+
184
189
  class BamSplitChroms(Proc):
185
190
  """Split bam file by chromosomes
186
191
 
@@ -368,3 +373,34 @@ class BamSort(Proc):
368
373
  "index": True,
369
374
  }
370
375
  script = "file://../scripts/bam/BamSort.py"
376
+
377
+
378
+ class SamtoolsView(Proc):
379
+ """View bam file using samtools, mostly used for filtering
380
+
381
+ This is a wrapper for `samtools view` command.
382
+ It will create a new bam file with the same name as the input bam file.
383
+
384
+ Input:
385
+ bamfile: The bam file
386
+
387
+ Output:
388
+ outfile: The output bam file
389
+
390
+ Envs:
391
+ ncores: Number of cores to use
392
+ samtools: Path to samtools executable
393
+ index: Whether to index the output bam file
394
+ Requires the input bam file to be sorted.
395
+ <more>: Other arguments passed to the view tool
396
+ See `samtools view` or `sambamba view`.
397
+ """
398
+ input = "bamfile:file"
399
+ output = "outfile:file:{{in.bamfile | stem}}.bam"
400
+ lang = config.lang.python
401
+ envs = {
402
+ "ncores": config.misc.ncores,
403
+ "samtools": config.exe.samtools,
404
+ "index": True,
405
+ }
406
+ script = "file://../scripts/bam/SamtoolsView.py"
@@ -150,7 +150,7 @@ class TMADScore(Proc):
150
150
  excl_chroms (list): The chromosomes to be excluded
151
151
  """
152
152
  input = "segfile:file"
153
- output = "outfile:file:{{in.segfile | stem0}}.tmad.txt"
153
+ output = "outfile:file:{{in.segfile | stem}}.tmad.txt"
154
154
  lang = config.lang.rscript
155
155
  envs = {
156
156
  "chrom_col": "chrom",
@@ -482,7 +482,7 @@ class CNVkitDiagram(Proc):
482
482
  }
483
483
  script = "file://../scripts/cnvkit/CNVkitDiagram.py"
484
484
  plugin_opts = {
485
- "report": "file://../reports/cnvkit/CNVkitScatter.svelte",
485
+ "report": "file://../reports/cnvkit/CNVkitDiagram.svelte",
486
486
  "report_paging": 10,
487
487
  }
488
488
 
@@ -132,4 +132,4 @@ class SampleInfo(Proc):
132
132
  }
133
133
  lang = config.lang.rscript
134
134
  script = "file://../scripts/delim/SampleInfo.R"
135
- plugin_opts = {"report": "file://../reports/delim/SampleInfo.svelte"}
135
+ plugin_opts = {"report": "file://../reports/common.svelte"}
@@ -1,8 +1,10 @@
1
1
  """Gene set enrichment analysis"""
2
+ from pipen.utils import mark
2
3
  from ..core.proc import Proc
3
4
  from ..core.config import config
4
5
 
5
6
 
7
+ @mark(deprecated='[{proc.name}] is deprecated, use `FGSEA` instead.')
6
8
  class GSEA(Proc):
7
9
  """Gene set enrichment analysis
8
10
 
@@ -51,6 +53,7 @@ class GSEA(Proc):
51
53
  plugin_opts = {"report": "file://../reports/gsea/GSEA.svelte"}
52
54
 
53
55
 
56
+ @mark(deprecated='[{proc.name}] is deprecated, use `FGSEA` directly.')
54
57
  class PreRank(Proc):
55
58
  """PreRank the genes for GSEA analysis
56
59
 
@@ -100,59 +103,82 @@ class PreRank(Proc):
100
103
  class FGSEA(Proc):
101
104
  """Gene set enrichment analysis using `fgsea`
102
105
 
103
- Need `devtools::install_github("ctlab/fgsea")`
104
-
105
106
  Input:
106
- infile: The expression file.
107
- Either a tab-delimited matrix or an RDS file (on envs.inopts)
107
+ infile: The expression file (genes x samples).
108
+ Either a tab-delimited file.
108
109
  metafile: The meta data file, determining the class of the samples
109
- Two columns are required
110
- Sample: The unique sample id for each sample
111
- `[Group]`: The groups/classes of the samples
112
- gmtfile: The GMT file of reference gene sets
113
- configfile: The configuration file in TOML format to specify some envs.
114
- `clscol`: If not provided, will use `envs.clscol`
115
- `classes`: Defines pos and neg labels. If not provided, use will
116
- `envs.classes`.
110
+ Two columns are required. If column `Sample` is found, it will be used
111
+ as the samples; otherwise the first column should be the samples.
112
+ The other column should be the group/class of the samples, whose
113
+ name is specified by `envs.clscol`.
117
114
 
118
115
  Output:
119
- outdir: The output directory
116
+ outdir: The output directory containing the results, including
117
+ the table and plots.
120
118
 
121
119
  Envs:
122
- inopts: The options for `read.table()` to read the input file
123
- If `rds` will use `readRDS()`
124
- metaopts: The options for `read.table()` to read the meta file
125
- method: The method to do the preranking.
126
- Supported: `s2n(signal_to_noise)`, `abs_s2n(abs_signal_to_noise)`,
127
- `t_test`, `ratio_of_classes`, `diff_of_classes` and
128
- `log2_ratio_of_classes`.
120
+ ncores (type=int): Number of cores for parallelization
121
+ Passed to `nproc` of `fgseaMultilevel()`.
122
+ case: The case label for the positive class.
123
+ control: The control label for the negative class.
124
+ When there are only two classes in `in.metafile` at column `envs.clscol`,
125
+ either `case` or `control` can be specified and the other will be
126
+ automatically set to the other class.
127
+ gmtfile: The pathways in GMT format, with the gene names/ids in the same format as the seurat object.
128
+ One could also use a URL to a GMT file. For example, from <https://download.baderlab.org/EM_Genesets/current_release/Human/symbol/Pathways/>.
129
+ method (choice): The method to do the preranking.
130
+ - signal_to_noise: Signal to noise.
131
+ The larger the differences of the means (scaled by the standard deviations);
132
+ that is, the more distinct the gene expression is in each phenotype and the more the gene
133
+ acts as a "class marker".
134
+ - s2n: Alias of signal_to_noise.
135
+ - abs_signal_to_noise: The absolute value of signal_to_noise.
136
+ - abs_s2n: Alias of abs_signal_to_noise.
137
+ - t_test: T test.
138
+ Uses the difference of means scaled by the standard deviation and number of samples.
139
+ - ratio_of_classes: Also referred to as fold change.
140
+ Uses the ratio of class means to calculate fold change for natural scale data.
141
+ - diff_of_classes: Difference of class means.
142
+ Uses the difference of class means to calculate fold change for nature scale data
143
+ - log2_ratio_of_classes: Log2 ratio of class means.
144
+ Uses the log2 ratio of class means to calculate fold change for natural scale data.
145
+ This is the recommended statistic for calculating fold change for log scale data.
129
146
  clscol: The column of metafile specifying the classes of the samples
130
- classes: The classes to specify the pos and neg labels.
131
- It could be a pair of labels (e.g. `["CASE", "CNTRL"]`), where
132
- the first one is pos and second is neg. Or you can have multiple
133
- pairs of labels (e.g. `[["CASE1", "CNTRL"], ["CASE2", "CNTRL"]]`)
134
- top: Do gsea table and enrich plot for top N pathways. If it is < 1,
135
- will apply it to `padj`
136
- `<rest>`: Rest arguments for `fgsea()`
147
+ When `in.metafile` is not specified, it can also be specified as a list of
148
+ classes, in the same order as the samples in `in.infile`.
149
+ top (type=auto): Do gsea table and enrich plot for top N pathways.
150
+ If it is < 1, will apply it to `padj`, selecting pathways with `padj` < `top`.
151
+ eps (type=float): This parameter sets the boundary for calculating the p value.
152
+ See <https://rdrr.io/bioc/fgsea/man/fgseaMultilevel.html>
153
+ minsize (type=int): Minimal size of a gene set to test. All pathways below the threshold are excluded.
154
+ maxsize (type=int): Maximal size of a gene set to test. All pathways above the threshold are excluded.
155
+ rest (type=json;order=98): Rest arguments for [`fgsea()`](https://rdrr.io/bioc/fgsea/man/fgsea.html)
156
+ See also <https://rdrr.io/bioc/fgsea/man/fgseaMultilevel.html>
157
+ cases (type=json;order=99): If you have multiple cases, you can specify them here.
158
+ The keys are the names of the cases and the values are the above options except `mutaters`.
159
+ If some options are not specified, the default values specified above will be used.
160
+ If no cases are specified, the default case will be added with the name `GSEA`.
137
161
 
138
162
  Requires:
139
163
  bioconductor-fgsea:
140
164
  - check: {{proc.lang}} -e "library(fgsea)"
141
- """
142
- input = "infile:file, metafile:file, gmtfile:file, configfile:file"
165
+ """ # noqa: E501
166
+ input = "infile:file, metafile:file"
143
167
  output = "outdir:dir:{{in.infile | stem}}.fgsea"
144
168
  lang = config.lang.rscript
145
169
  envs = {
146
- "inopts": {"header": True, "row.names": -1},
147
- "metaopts": {"header": True, "row.names": -1},
148
- "method": "s2n",
149
- "clscol": None,
150
- "classes": None,
151
- "top": 20,
152
170
  "ncores": config.misc.ncores,
153
- "minSize": 10,
154
- "maxSize": 100,
171
+ "case": None,
172
+ "control": None,
173
+ "gmtfile": None,
174
+ "method": "signal_to_noise",
175
+ "clscol": None,
176
+ "top": 10,
155
177
  "eps": 0,
178
+ "minsize": 10,
179
+ "maxsize": 100,
180
+ "rest": {},
181
+ "cases": {},
156
182
  }
157
183
  script = "file://../scripts/gsea/FGSEA.R"
158
184
  plugin_opts = {"report": "file://../reports/gsea/FGSEA.svelte"}
@@ -106,3 +106,41 @@ class Shell(Proc):
106
106
  envs = {"cmd": "", "outdir": False}
107
107
  lang = config.lang.bash
108
108
  script = "file://../scripts/misc/Shell.sh"
109
+
110
+
111
+ class Plot(Proc):
112
+ """Plot given data using plotthis package in R
113
+
114
+ Input:
115
+ datafile: The input data file in RDS or qs/qs2 format.
116
+ If it is not in RDS nor qs/qs2 format, read.table will be used
117
+ to read the data file with the options provided by `envs.read_opts`.
118
+
119
+ Output:
120
+ plotfile: The output plot file in PNG format
121
+
122
+ envs:
123
+ fn: The plot function to use. Required.
124
+ devpars (ns): The device parameters for the plot.
125
+ - width: The width of the plot in pixels.
126
+ - height: The height of the plot in pixels.
127
+ - res: The resolution of the plot in DPI.
128
+ more_formats: The additional formats to save the plot in other than PNG.
129
+ The file will be saved in the same directory as the plotfile.
130
+ save_code: Whether to save the R code used for plotting.
131
+ read_opts: Options to read the data file.
132
+ If the data file is not in RDS nor qs/qs2 format, these options
133
+ will be passed to `read.table`.
134
+ <more>: Additional parameters to the plot function.
135
+ """
136
+ input = "datafile:file"
137
+ output = "plotfile:file:{{in.datafile | stem}}.png"
138
+ envs = {
139
+ "fn": None,
140
+ "devpars": {"res": 100},
141
+ "more_formats": [],
142
+ "save_code": False,
143
+ "read_opts": {},
144
+ }
145
+ lang = config.lang.rscript
146
+ script = "file://../scripts/misc/Plot.R"
@@ -1,8 +1,16 @@
1
1
  """Plotting data"""
2
2
 
3
+ import warnings
4
+
3
5
  from ..core.proc import Proc
4
6
  from ..core.config import config
5
7
 
8
+ warnings.warn(
9
+ "The `biopipen.ns.plot` module is deprecated and will be removed in the future. "
10
+ "Please use `biopipen.ns.misc.Plot` process instead.",
11
+ DeprecationWarning,
12
+ )
13
+
6
14
 
7
15
  class VennDiagram(Proc):
8
16
  """Plot Venn diagram