biopipen 0.29.2__tar.gz → 0.31.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 (289) hide show
  1. {biopipen-0.29.2 → biopipen-0.31.0}/PKG-INFO +7 -7
  2. biopipen-0.31.0/biopipen/__init__.py +1 -0
  3. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/core/config.toml +2 -0
  4. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/core/filters.py +21 -0
  5. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/ns/plot.py +55 -0
  6. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/ns/scrna.py +110 -21
  7. biopipen-0.31.0/biopipen/ns/web.py +160 -0
  8. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/bam/CNAClinic.R +2 -1
  9. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/cellranger/CellRangerCount.py +3 -3
  10. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/cellranger/CellRangerSummary.R +2 -1
  11. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/cnv/AneuploidyScore.R +1 -1
  12. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/cnv/AneuploidyScoreSummary.R +2 -2
  13. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/delim/RowsBinder.R +1 -1
  14. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/delim/SampleInfo.R +3 -2
  15. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/gene/GeneNameConversion.R +2 -2
  16. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/gsea/Enrichr.R +3 -3
  17. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/gsea/FGSEA.R +2 -2
  18. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/gsea/GSEA.R +2 -2
  19. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/gsea/PreRank.R +2 -2
  20. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/plot/Heatmap.R +3 -3
  21. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/plot/Manhattan.R +2 -1
  22. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/plot/QQPlot.R +1 -1
  23. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/plot/ROC.R +1 -1
  24. biopipen-0.31.0/biopipen/scripts/plot/Scatter.R +112 -0
  25. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/plot/VennDiagram.R +3 -3
  26. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/regulatory/MotifAffinityTest.R +3 -7
  27. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/rnaseq/Simulation.R +1 -1
  28. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/rnaseq/UnitConversion.R +2 -1
  29. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/scrna/AnnData2Seurat.R +1 -1
  30. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/scrna/CellTypeAnnotation-celltypist.R +24 -8
  31. biopipen-0.31.0/biopipen/scripts/scrna/CellTypeAnnotation-common.R +10 -0
  32. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/scrna/CellTypeAnnotation-direct.R +9 -1
  33. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/scrna/CellTypeAnnotation-hitype.R +12 -8
  34. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/scrna/CellTypeAnnotation-sccatch.R +15 -2
  35. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/scrna/CellTypeAnnotation-sctype.R +38 -15
  36. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/scrna/CellTypeAnnotation.R +3 -0
  37. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/scrna/CellsDistribution.R +4 -3
  38. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/scrna/DimPlots.R +1 -1
  39. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/scrna/ExprImputation-alra.R +1 -1
  40. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/scrna/MarkersFinder.R +5 -5
  41. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/scrna/MetaMarkers.R +4 -4
  42. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/scrna/ModuleScoreCalculator.R +2 -1
  43. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/scrna/RadarPlots.R +1 -1
  44. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/scrna/ScFGSEA.R +4 -3
  45. biopipen-0.31.0/biopipen/scripts/scrna/ScSimulation.R +64 -0
  46. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/scrna/Seurat2AnnData.R +1 -1
  47. biopipen-0.31.0/biopipen/scripts/scrna/SeuratClusterStats-clustree.R +73 -0
  48. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/scrna/SeuratClusterStats-dimplots.R +4 -3
  49. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/scrna/SeuratClusterStats-features.R +6 -5
  50. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/scrna/SeuratClusterStats-hists.R +6 -5
  51. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/scrna/SeuratClusterStats-ngenes.R +4 -3
  52. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/scrna/SeuratClusterStats-stats.R +20 -25
  53. biopipen-0.31.0/biopipen/scripts/scrna/SeuratClusterStats.R +60 -0
  54. biopipen-0.31.0/biopipen/scripts/scrna/SeuratClustering-common.R +213 -0
  55. biopipen-0.31.0/biopipen/scripts/scrna/SeuratClustering.R +56 -0
  56. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/scrna/SeuratMap2Ref.R +98 -54
  57. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/scrna/SeuratMetadataMutater.R +2 -2
  58. biopipen-0.31.0/biopipen/scripts/scrna/SeuratPreparing-common.R +452 -0
  59. biopipen-0.31.0/biopipen/scripts/scrna/SeuratPreparing-doublet_detection.R +201 -0
  60. biopipen-0.31.0/biopipen/scripts/scrna/SeuratPreparing.R +142 -0
  61. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/scrna/SeuratSubClustering.R +24 -39
  62. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/scrna/TopExpressingGenes.R +1 -1
  63. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/scrna_metabolic_landscape/MetabolicFeatures.R +2 -2
  64. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/scrna_metabolic_landscape/MetabolicFeaturesIntraSubset.R +2 -2
  65. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/scrna_metabolic_landscape/MetabolicPathwayActivity.R +3 -3
  66. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/scrna_metabolic_landscape/MetabolicPathwayHeterogeneity.R +3 -3
  67. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/snp/MatrixEQTL.R +1 -1
  68. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/snp/PlinkCallRate.R +2 -2
  69. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/snp/PlinkFreq.R +2 -2
  70. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/snp/PlinkHWE.R +2 -2
  71. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/snp/PlinkHet.R +2 -2
  72. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/snp/PlinkIBD.R +2 -2
  73. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/stats/ChowTest.R +1 -1
  74. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/stats/DiffCoexpr.R +1 -1
  75. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/stats/LiquidAssoc.R +1 -1
  76. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/stats/Mediation.R +11 -9
  77. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/stats/MetaPvalue.R +4 -1
  78. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/stats/MetaPvalue1.R +4 -1
  79. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/tcr/Attach2Seurat.R +1 -1
  80. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/tcr/CDR3AAPhyschem.R +1 -1
  81. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/tcr/CloneResidency.R +2 -2
  82. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/tcr/CloneSizeQQPlot.R +2 -2
  83. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/tcr/Immunarch-basic.R +0 -4
  84. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/tcr/Immunarch-clonality.R +0 -4
  85. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/tcr/Immunarch-diversity.R +2 -24
  86. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/tcr/Immunarch-geneusage.R +0 -2
  87. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/tcr/Immunarch-kmer.R +0 -2
  88. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/tcr/Immunarch-overlap.R +0 -2
  89. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/tcr/Immunarch-spectratyping.R +0 -2
  90. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/tcr/Immunarch-tracking.R +0 -2
  91. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/tcr/Immunarch-vjjunc.R +0 -2
  92. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/tcr/Immunarch.R +43 -11
  93. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/tcr/ImmunarchFilter.R +1 -1
  94. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/tcr/ImmunarchLoading.R +2 -2
  95. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/tcr/SampleDiversity.R +1 -1
  96. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/tcr/TCRClusterStats.R +2 -2
  97. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/tcr/TCRClustering.R +2 -2
  98. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/tcr/TESSA.R +2 -2
  99. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/vcf/TruvariBenchSummary.R +2 -2
  100. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/vcf/TruvariConsistency.R +1 -1
  101. biopipen-0.31.0/biopipen/scripts/web/GCloudStorageDownloadBucket.py +82 -0
  102. biopipen-0.31.0/biopipen/scripts/web/GCloudStorageDownloadFile.py +23 -0
  103. biopipen-0.31.0/biopipen/scripts/web/gcloud_common.py +49 -0
  104. {biopipen-0.29.2 → biopipen-0.31.0}/pyproject.toml +9 -9
  105. {biopipen-0.29.2 → biopipen-0.31.0}/setup.py +7 -7
  106. biopipen-0.29.2/biopipen/__init__.py +0 -1
  107. biopipen-0.29.2/biopipen/ns/web.py +0 -78
  108. biopipen-0.29.2/biopipen/scripts/scrna/SeuratClusterStats.R +0 -44
  109. biopipen-0.29.2/biopipen/scripts/scrna/SeuratClustering.R +0 -216
  110. biopipen-0.29.2/biopipen/scripts/scrna/SeuratPreparing.R +0 -682
  111. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/core/__init__.py +0 -0
  112. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/core/config.py +0 -0
  113. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/core/defaults.py +0 -0
  114. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/core/proc.py +0 -0
  115. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/core/testing.py +0 -0
  116. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/ns/__init__.py +0 -0
  117. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/ns/bam.py +0 -0
  118. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/ns/bed.py +0 -0
  119. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/ns/cellranger.py +0 -0
  120. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/ns/cellranger_pipeline.py +0 -0
  121. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/ns/cnv.py +0 -0
  122. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/ns/cnvkit.py +0 -0
  123. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/ns/cnvkit_pipeline.py +0 -0
  124. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/ns/delim.py +0 -0
  125. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/ns/gene.py +0 -0
  126. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/ns/gsea.py +0 -0
  127. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/ns/misc.py +0 -0
  128. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/ns/regulatory.py +0 -0
  129. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/ns/rnaseq.py +0 -0
  130. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/ns/scrna_metabolic_landscape.py +0 -0
  131. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/ns/snp.py +0 -0
  132. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/ns/stats.py +0 -0
  133. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/ns/tcgamaf.py +0 -0
  134. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/ns/tcr.py +0 -0
  135. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/ns/vcf.py +0 -0
  136. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/reports/bam/CNAClinic.svelte +0 -0
  137. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/reports/bam/CNVpytor.svelte +0 -0
  138. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/reports/bam/ControlFREEC.svelte +0 -0
  139. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/reports/cellranger/CellRangerCount.svelte +0 -0
  140. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/reports/cellranger/CellRangerSummary.svelte +0 -0
  141. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/reports/cellranger/CellRangerVdj.svelte +0 -0
  142. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/reports/cnv/AneuploidyScore.svelte +0 -0
  143. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/reports/cnv/AneuploidyScoreSummary.svelte +0 -0
  144. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/reports/cnv/TMADScoreSummary.svelte +0 -0
  145. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/reports/cnvkit/CNVkitDiagram.svelte +0 -0
  146. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/reports/cnvkit/CNVkitHeatmap.svelte +0 -0
  147. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/reports/cnvkit/CNVkitScatter.svelte +0 -0
  148. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/reports/delim/SampleInfo.svelte +0 -0
  149. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/reports/gsea/FGSEA.svelte +0 -0
  150. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/reports/gsea/GSEA.svelte +0 -0
  151. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/reports/scrna/CellsDistribution.svelte +0 -0
  152. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/reports/scrna/DimPlots.svelte +0 -0
  153. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/reports/scrna/MarkersFinder.svelte +0 -0
  154. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/reports/scrna/MetaMarkers.svelte +0 -0
  155. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/reports/scrna/RadarPlots.svelte +0 -0
  156. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/reports/scrna/ScFGSEA.svelte +0 -0
  157. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/reports/scrna/SeuratClusterStats.svelte +0 -0
  158. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/reports/scrna/SeuratMap2Ref.svelte +0 -0
  159. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/reports/scrna/SeuratPreparing.svelte +0 -0
  160. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/reports/scrna/TopExpressingGenes.svelte +0 -0
  161. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/reports/scrna_metabolic_landscape/MetabolicFeatures.svelte +0 -0
  162. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/reports/scrna_metabolic_landscape/MetabolicFeaturesIntraSubset.svelte +0 -0
  163. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/reports/scrna_metabolic_landscape/MetabolicPathwayActivity.svelte +0 -0
  164. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/reports/scrna_metabolic_landscape/MetabolicPathwayHeterogeneity.svelte +0 -0
  165. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/reports/snp/PlinkCallRate.svelte +0 -0
  166. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/reports/snp/PlinkFreq.svelte +0 -0
  167. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/reports/snp/PlinkHWE.svelte +0 -0
  168. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/reports/snp/PlinkHet.svelte +0 -0
  169. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/reports/snp/PlinkIBD.svelte +0 -0
  170. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/reports/tcr/CDR3AAPhyschem.svelte +0 -0
  171. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/reports/tcr/CloneResidency.svelte +0 -0
  172. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/reports/tcr/Immunarch.svelte +0 -0
  173. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/reports/tcr/SampleDiversity.svelte +0 -0
  174. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/reports/tcr/TCRClusterStats.svelte +0 -0
  175. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/reports/tcr/TESSA.svelte +0 -0
  176. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/reports/tcr/VJUsage.svelte +0 -0
  177. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/reports/utils/gsea.liq +0 -0
  178. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/reports/utils/misc.liq +0 -0
  179. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/reports/vcf/TruvariBenchSummary.svelte +0 -0
  180. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/reports/vcf/TruvariConsistency.svelte +0 -0
  181. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/bam/BamMerge.py +0 -0
  182. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/bam/BamSplitChroms.py +0 -0
  183. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/bam/CNVpytor.py +0 -0
  184. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/bam/ControlFREEC.py +0 -0
  185. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/bed/Bed2Vcf.py +0 -0
  186. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/bed/BedConsensus.py +0 -0
  187. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/bed/BedLiftOver.sh +0 -0
  188. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/bed/BedtoolsIntersect.py +0 -0
  189. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/bed/BedtoolsMerge.py +0 -0
  190. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/cellranger/CellRangerVdj.py +0 -0
  191. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/cnv/TMADScore.R +0 -0
  192. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/cnv/TMADScoreSummary.R +0 -0
  193. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/cnvkit/CNVkitAccess.py +0 -0
  194. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/cnvkit/CNVkitAutobin.py +0 -0
  195. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/cnvkit/CNVkitBatch.py +0 -0
  196. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/cnvkit/CNVkitCall.py +0 -0
  197. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/cnvkit/CNVkitCoverage.py +0 -0
  198. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/cnvkit/CNVkitDiagram.py +0 -0
  199. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/cnvkit/CNVkitFix.py +0 -0
  200. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/cnvkit/CNVkitGuessBaits.py +0 -0
  201. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/cnvkit/CNVkitHeatmap.py +0 -0
  202. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/cnvkit/CNVkitReference.py +0 -0
  203. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/cnvkit/CNVkitScatter.py +0 -0
  204. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/cnvkit/CNVkitSegment.py +0 -0
  205. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/cnvkit/guess_baits.py +0 -0
  206. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/gene/GenePromoters.R +0 -0
  207. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/misc/Config2File.py +0 -0
  208. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/misc/Shell.sh +0 -0
  209. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/misc/Str2File.py +0 -0
  210. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/regulatory/MotifAffinityTest_AtSNP.R +0 -0
  211. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/regulatory/MotifAffinityTest_MotifBreakR.R +0 -0
  212. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/regulatory/MotifScan.py +0 -0
  213. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/regulatory/atSNP.R +0 -0
  214. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/regulatory/motifBreakR.R +0 -0
  215. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/rnaseq/Simulation-ESCO.R +0 -0
  216. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/rnaseq/Simulation-RUVcorr.R +0 -0
  217. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/scrna/ExprImputation-rmagic.R +0 -0
  218. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/scrna/ExprImputation-scimpute.R +0 -0
  219. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/scrna/ExprImputation.R +0 -0
  220. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/scrna/SCImpute.R +0 -0
  221. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/scrna/SeuratFilter.R +0 -0
  222. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/scrna/SeuratLoading.R +0 -0
  223. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/scrna/SeuratSplit.R +0 -0
  224. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/scrna/SeuratSubset.R +0 -0
  225. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/scrna/SeuratTo10X.R +0 -0
  226. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/scrna/Subset10X.R +0 -0
  227. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/scrna/celltypist-wrapper.py +0 -0
  228. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/scrna/sctype.R +0 -0
  229. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/snp/Plink2GTMat.py +0 -0
  230. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/snp/PlinkFilter.py +0 -0
  231. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/snp/PlinkFromVcf.py +0 -0
  232. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/snp/PlinkSimulation.py +0 -0
  233. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/snp/PlinkUpdateName.py +0 -0
  234. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/tcgamaf/Maf2Vcf.py +0 -0
  235. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/tcgamaf/MafAddChr.py +0 -0
  236. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/tcgamaf/maf2vcf.pl +0 -0
  237. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/tcr/GIANA/GIANA.py +0 -0
  238. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/tcr/GIANA/GIANA4.py +0 -0
  239. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/tcr/GIANA/Imgt_Human_TRBV.fasta +0 -0
  240. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/tcr/GIANA/query.py +0 -0
  241. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/tcr/Immunarch2VDJtools.R +0 -0
  242. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/tcr/ImmunarchSplitIdents.R +0 -0
  243. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/tcr/TCRDock.py +0 -0
  244. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/tcr/TESSA_source/Atchley_factors.csv +0 -0
  245. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/tcr/TESSA_source/BriseisEncoder.py +0 -0
  246. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/tcr/TESSA_source/MCMC_control.R +0 -0
  247. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/tcr/TESSA_source/TrainedEncoder.h5 +0 -0
  248. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/tcr/TESSA_source/fixed_b.csv +0 -0
  249. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/tcr/TESSA_source/initialization.R +0 -0
  250. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/tcr/TESSA_source/post_analysis.R +0 -0
  251. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/tcr/TESSA_source/real_data.R +0 -0
  252. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/tcr/TESSA_source/update.R +0 -0
  253. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/tcr/TESSA_source/utility.R +0 -0
  254. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/tcr/VJUsage.R +0 -0
  255. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/tcr/immunarch-patched.R +0 -0
  256. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/tcr/vdjtools-patch.sh +0 -0
  257. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/vcf/BcftoolsAnnotate.py +0 -0
  258. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/vcf/BcftoolsFilter.py +0 -0
  259. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/vcf/BcftoolsSort.py +0 -0
  260. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/vcf/BcftoolsView.py +0 -0
  261. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/vcf/TruvariBench.sh +0 -0
  262. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/vcf/Vcf2Bed.py +0 -0
  263. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/vcf/VcfAnno.py +0 -0
  264. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/vcf/VcfDownSample.sh +0 -0
  265. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/vcf/VcfFilter.py +0 -0
  266. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/vcf/VcfFix.py +0 -0
  267. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/vcf/VcfFix_utils.py +0 -0
  268. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/vcf/VcfIndex.py +0 -0
  269. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/vcf/VcfIntersect.py +0 -0
  270. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/vcf/VcfLiftOver.sh +0 -0
  271. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/vcf/VcfSplitSamples.py +0 -0
  272. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/vcf/bcftools_utils.py +0 -0
  273. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/web/Download.py +0 -0
  274. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/scripts/web/DownloadList.py +0 -0
  275. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/utils/__init__.py +0 -0
  276. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/utils/caching.R +0 -0
  277. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/utils/common_docstrs.py +0 -0
  278. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/utils/gene.R +0 -0
  279. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/utils/gene.py +0 -0
  280. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/utils/gsea.R +0 -0
  281. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/utils/io.R +0 -0
  282. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/utils/misc.R +0 -0
  283. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/utils/misc.py +0 -0
  284. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/utils/mutate_helpers.R +0 -0
  285. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/utils/plot.R +0 -0
  286. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/utils/reference.py +0 -0
  287. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/utils/rnaseq.R +0 -0
  288. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/utils/single_cell.R +0 -0
  289. {biopipen-0.29.2 → biopipen-0.31.0}/biopipen/utils/vcf.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: biopipen
3
- Version: 0.29.2
3
+ Version: 0.31.0
4
4
  Summary: Bioinformatics processes/pipelines that can be run from `pipen run`
5
5
  License: MIT
6
6
  Author: pwwang
@@ -14,9 +14,9 @@ Classifier: Programming Language :: Python :: 3.11
14
14
  Classifier: Programming Language :: Python :: 3.12
15
15
  Provides-Extra: runinfo
16
16
  Requires-Dist: datar[pandas] (>=0.15.6,<0.16.0)
17
- Requires-Dist: pipen-board[report] (>=0.15,<0.16)
18
- Requires-Dist: pipen-cli-run (>=0.13,<0.14)
19
- Requires-Dist: pipen-filters (>=0.13,<0.14)
20
- Requires-Dist: pipen-poplog (>=0.1.2,<0.2.0)
21
- Requires-Dist: pipen-runinfo (>=0.6,<0.7) ; extra == "runinfo"
22
- Requires-Dist: pipen-verbose (>=0.11,<0.12)
17
+ Requires-Dist: pipen-board[report] (>=0.16,<0.17)
18
+ Requires-Dist: pipen-cli-run (>=0.14,<0.15)
19
+ Requires-Dist: pipen-filters (>=0.14,<0.15)
20
+ Requires-Dist: pipen-poplog (>=0.2.0,<0.3.0)
21
+ Requires-Dist: pipen-runinfo (>=0.7,<0.8) ; extra == "runinfo"
22
+ Requires-Dist: pipen-verbose (>=0.12,<0.13)
@@ -0,0 +1 @@
1
+ __version__ = "0.31.0"
@@ -13,6 +13,8 @@ liftover = "liftOver"
13
13
  # gatk, installed via conda
14
14
  gatk = "gatk"
15
15
  gatk4 = "gatk"
16
+ # google cloud sdk
17
+ gcloud = "gcloud"
16
18
  # vdjtools, installed via conda
17
19
  vdjtools = "vdjtools"
18
20
  # cnvkit.py
@@ -221,6 +221,27 @@ def r(
221
221
  return repr(obj)
222
222
 
223
223
 
224
+ @filtermanager.register
225
+ def source_r(path: str | Path) -> str:
226
+ """Source an R script.
227
+
228
+ In addition to generating `source(path)`, we also include the mtime for the script
229
+ to trigger the job not cached when the script is updated.
230
+
231
+ Args:
232
+ path: The path to the R script
233
+
234
+ Returns:
235
+ The R code to source the script
236
+ """
237
+ path = Path(path)
238
+ mtime = int(path.stat().st_mtime)
239
+ return (
240
+ f"# Last modified: {mtime}\n"
241
+ f"source('{path}')"
242
+ )
243
+
244
+
224
245
  @register_component("fgsea")
225
246
  def _render_fgsea(
226
247
  cont: Mapping[str, Any],
@@ -354,3 +354,58 @@ class QQPlot(Proc):
354
354
  "ggs": None,
355
355
  }
356
356
  script = "file://../scripts/plot/QQPlot.R"
357
+
358
+
359
+ class Scatter(Proc):
360
+ """Generate scatter plot using ggplot2.
361
+
362
+ [`ggpmisc`](https://cran.r-project.org/web/packages/ggpmisc/index.html) is used
363
+ for the stats and labels.
364
+ See also https://cran.r-project.org/web/packages/ggpmisc/vignettes/model-based-annotations.html
365
+
366
+ Input:
367
+ infile: The input file for data
368
+ It should contain at least two columns for x and y values.
369
+ Header is required.
370
+
371
+ Output:
372
+ outfile: The output figure file
373
+
374
+ Envs:
375
+ x_col: The column for x values
376
+ An integer (1-based) or a string indicating the column name.
377
+ y_col: The column for y values
378
+ An integer (1-based) or a string indicating the column name.
379
+ devpars (ns): The parameters for `png()`
380
+ - res (type=int): The resolution
381
+ - width (type=int): The width
382
+ - height (type=int): The height
383
+ args (ns): Additional arguments for `geom_point()`
384
+ See <https://ggplot2.tidyverse.org/reference/geom_point.html>.
385
+ - <more>: Additional arguments for `geom_point()`
386
+ mapping: Extra mapping for all geoms, including `stats`.
387
+ Should be `aes(color = group)` but all these are valid: `color = group` or
388
+ `(color = group)`.
389
+ ggs (list): Additional ggplot expression to adjust the plot.
390
+ formula: The formula for the model
391
+ stats (type=json): The stats to add to the plot.
392
+ A dict with keys available stats in `ggpmisc` (without `stat_`).
393
+ See <https://cran.r-project.org/web/packages/ggpmisc/vignettes/model-based-annotations.html#statistics>.
394
+ The values should be the arguments for the stats.
395
+ If you want a stat to be added multiple times, add a suffix `#x` to the key.
396
+ For example, `poly_line#1` and `poly_line#2` will add two polynomial lines.
397
+ """ # noqa: E501
398
+ input = "infile:file"
399
+ output = "outfile:file:{{in.infile | stem}}.scatter.png"
400
+ lang = config.lang.rscript
401
+ envs = {
402
+ "x_col": 1,
403
+ "y_col": 2,
404
+ "devpars": {"res": 100, "width": 1000, "height": 800},
405
+ "args": {},
406
+ "mapping": None,
407
+ "ggs": [],
408
+ "formula": "y ~ x",
409
+ "stats": {},
410
+ }
411
+ script = "file://../scripts/plot/Scatter.R"
@@ -204,9 +204,15 @@ class SeuratPreparing(Proc):
204
204
  - scvi: Same as `scVIIntegration`.
205
205
  - <more>: See <https://satijalab.org/seurat/reference/integratelayers>
206
206
 
207
+ doublet_detector (choice): The doublet detector to use.
208
+ - none: Do not use any doublet detector.
209
+ - DoubletFinder: Use `DoubletFinder` to detect doublets.
210
+ - doubletfinder: Same as `DoubletFinder`.
211
+ - scDblFinder: Use `scDblFinder` to detect doublets.
212
+ - scdblfinder: Same as `scDblFinder`.
213
+
207
214
  DoubletFinder (ns): Arguments to run [`DoubletFinder`](https://github.com/chris-mcginnis-ucsf/DoubletFinder).
208
215
  See also <https://demultiplexing-doublet-detecting-docs.readthedocs.io/en/latest/DoubletFinder.html>.
209
- To disable `DoubletFinder`, set `envs.DoubletFinder` to `None` or `False`; or set `pcs` to `0`.
210
216
  - PCs (type=int): Number of PCs to use for 'doubletFinder' function.
211
217
  - doublets (type=float): Number of expected doublets as a proportion of the pool size.
212
218
  - pN (type=float): Number of doublets to simulate as a proportion of the pool size.
@@ -215,6 +221,12 @@ class SeuratPreparing(Proc):
215
221
  Since parallelization of the function usually exhausts memory, if big `envs.ncores` does not work
216
222
  for `DoubletFinder`, set this to a smaller number.
217
223
 
224
+ scDblFinder (ns): Arguments to run [`scDblFinder`](https://rdrr.io/bioc/scDblFinder/man/scDblFinder.html).
225
+ - dbr (type=float): The expected doublet rate.
226
+ - ncores (type=int): Number of cores to use for `scDblFinder`.
227
+ Set to `None` to use `envs.ncores`.
228
+ - <more>: See <https://rdrr.io/bioc/scDblFinder/man/scDblFinder.html>.
229
+
218
230
  cache (type=auto): Whether to cache the information at different steps.
219
231
  If `True`, the seurat object will be cached in the job output directory, which will be not cleaned up when job is rerunning.
220
232
  The cached seurat object will be saved as `<signature>.<kind>.RDS` file, where `<signature>` is the signature determined by
@@ -251,7 +263,9 @@ class SeuratPreparing(Proc):
251
263
  "min_cells": 5,
252
264
  },
253
265
  "IntegrateLayers": {"method": "harmony"},
254
- "DoubletFinder": {"PCs": 0, "pN": 0.25, "doublets": 0.075, "ncores": 1},
266
+ "doublet_detector": "none",
267
+ "DoubletFinder": {"PCs": 10, "pN": 0.25, "doublets": 0.075, "ncores": 1},
268
+ "scDblFinder": {"dbr": 0.075, "ncores": 1},
255
269
  "cache": config.path.tmpdir,
256
270
  }
257
271
  script = "file://../scripts/scrna/SeuratPreparing.R"
@@ -307,10 +321,6 @@ class SeuratClustering(Proc):
307
321
  The results will be saved in `seurat_clusters_<resolution>`.
308
322
  The final resolution will be used to define the clusters at `seurat_clusters`.
309
323
  - <more>: See <https://satijalab.org/seurat/reference/findclusters>
310
- clustree_devpars (ns): The device parameters for the clustree plots.
311
- - res (type=int): The resolution of the plots.
312
- - height (type=int): The height of the plots.
313
- - width (type=int): The width of the plots.
314
324
  cache (type=auto): Whether to cache the information at different steps.
315
325
  If `True`, the seurat object will be cached in the job output directory, which will be not cleaned up when job is rerunning.
316
326
  The cached seurat object will be saved as `<signature>.<kind>.RDS` file, where `<signature>` is the signature determined by
@@ -338,7 +348,6 @@ class SeuratClustering(Proc):
338
348
  "RunUMAP": {"dims": 30},
339
349
  "FindNeighbors": {},
340
350
  "FindClusters": {"resolution": 0.8},
341
- "clustree_devpars": {"res": 100, "height": 1000, "width": 800},
342
351
  "cache": config.path.tmpdir,
343
352
  }
344
353
  script = "file://../scripts/scrna/SeuratClustering.R"
@@ -392,10 +401,6 @@ class SeuratSubClustering(Proc):
392
401
  The results will be saved in `<casename>_<resolution>`.
393
402
  The final resolution will be used to define the clusters at `<casename>`.
394
403
  - <more>: See <https://satijalab.org/seurat/reference/findclusters>
395
- clustree_devpars (ns): The device parameters for the clustree plots.
396
- - res (type=int): The resolution of the plots.
397
- - height (type=int): The height of the plots.
398
- - width (type=int): The width of the plots.
399
404
  cache (type=auto): Whether to cache the information at different steps.
400
405
  If `True`, the seurat object will be cached in the job output directory, which will be not cleaned up when job is rerunning.
401
406
  The cached seurat object will be saved as `<signature>.<kind>.RDS` file, where `<signature>` is the signature determined by
@@ -419,7 +424,6 @@ class SeuratSubClustering(Proc):
419
424
  "RunUMAP": {"dims": 30},
420
425
  "FindNeighbors": {},
421
426
  "FindClusters": {"resolution": 0.8},
422
- "clustree_devpars": {"res": 100, "height": 1000, "width": 800},
423
427
  "cache": config.path.tmpdir,
424
428
  "cases": {"subcluster": {}},
425
429
  }
@@ -488,6 +492,22 @@ class SeuratClusterStats(Proc):
488
492
  Envs:
489
493
  mutaters (type=json): The mutaters to mutate the metadata to subset the cells.
490
494
  The mutaters will be applied in the order specified.
495
+ clustrees_defaults (ns): The parameters for the clustree plots.
496
+ - devpars (ns): The device parameters for the clustree plot.
497
+ - res (type=int): The resolution of the plots.
498
+ - height (type=int): The height of the plots.
499
+ - width (type=int): The width of the plots.
500
+ - prefix: string indicating columns containing clustering information.
501
+ The trailing dot is not necessary and will be added automatically.
502
+ When `_auto`, clustrees will be plotted when there is `FindClusters` or
503
+ `FindClusters.*` in the `obj@commands`.
504
+ The latter is generated by `SeuratSubClustering`.
505
+ This will be ignored when `envs.clustrees` is specified.
506
+ - <more>: Other arguments passed to `clustree::clustree()`.
507
+ See <https://rdrr.io/cran/clustree/man/clustree.html>
508
+ clustrees (type=json): The cases for clustree plots.
509
+ Keys are the names of the plots and values are the dicts inherited from `env.clustrees_defaults` except `prefix`.
510
+ There is no default case for `clustrees`.
491
511
  hists_defaults (ns): The default parameters for histograms.
492
512
  This will plot histograms for the number of cells along `x`.
493
513
  For example, you can plot the number of cells along cell activity score.
@@ -521,14 +541,19 @@ class SeuratClusterStats(Proc):
521
541
  This is to do some basic statistics on the clusters. For more comprehensive analysis,
522
542
  see `RadarPlots` and `CellsDistribution`.
523
543
  The parameters from the cases can overwrite the default parameters.
524
- - frac (flag): Whether to output the fraction of cells instead of number.
544
+ - frac (choice): How to calculate the fraction of cells.
545
+ - group: calculate the fraction in each group.
546
+ The total fraction of the cells of idents in each group will be 1.
547
+ When `group-by` is not specified, it will be the same as `all`.
548
+ - ident: calculate the fraction in each ident.
549
+ The total fraction of the cells of groups in each ident will be 1.
550
+ Only works when `group-by` is specified.
551
+ - cluster: alias of `ident`.
552
+ - all: calculate the fraction against all cells.
553
+ - none: do not calculate the fraction, use the number of cells instead.
525
554
  - pie (flag): Also output a pie chart?
526
555
  - circos (flag): Also output a circos plot?
527
556
  - table (flag): Whether to output a table (in tab-delimited format) and in the report.
528
- - frac_ofall (flag): Whether to output the fraction against all cells,
529
- instead of the fraction in each group.
530
- Does not work for circos plot.
531
- Only works when `frac` is `True` and `group-by` is specified.
532
557
  - transpose (flag): Whether to transpose the cluster and group, that is,
533
558
  using group as the x-axis and cluster to fill the plot.
534
559
  For circos plot, when transposed, the arrows will be drawn from the idents (by `ident`) to the
@@ -667,6 +692,11 @@ class SeuratClusterStats(Proc):
667
692
  lang = config.lang.rscript
668
693
  envs = {
669
694
  "mutaters": {},
695
+ "clustrees_defaults": {
696
+ "devpars": {"res": 100, "height": 1000, "width": 800},
697
+ "prefix": "_auto",
698
+ },
699
+ "clustrees": {},
670
700
  "hists_defaults": {
671
701
  "x": None,
672
702
  "x_order": [],
@@ -683,12 +713,11 @@ class SeuratClusterStats(Proc):
683
713
  },
684
714
  "hists": {},
685
715
  "stats_defaults": {
686
- "frac": False,
716
+ "frac": "none",
687
717
  "pie": False,
688
718
  "circos": False,
689
719
  "table": False,
690
720
  "position": "auto",
691
- "frac_ofall": False,
692
721
  "transpose": False,
693
722
  "ident": "seurat_clusters",
694
723
  "group-by": None,
@@ -706,7 +735,7 @@ class SeuratClusterStats(Proc):
706
735
  "Number of cells in each cluster by Sample": {
707
736
  "group-by": "Sample",
708
737
  "table": True,
709
- "frac": True,
738
+ "frac": "group",
710
739
  },
711
740
  },
712
741
  "ngenes_defaults": {
@@ -1733,6 +1762,8 @@ class CellTypeAnnotation(Proc):
1733
1762
  - assay: When converting a Seurat object to AnnData, the assay to use.
1734
1763
  If input is h5seurat, this defaults to RNA.
1735
1764
  If input is Seurat object in RDS, this defaults to the default assay.
1765
+ merge (flag): Whether to merge the clusters with the same cell types.
1766
+ Otherwise, a suffix will be added to the cell types (ie. `.1`, `.2`, etc).
1736
1767
  newcol: The new column name to store the cell types.
1737
1768
  If not specified, the `seurat_clusters` column will be overwritten.
1738
1769
  If specified, the original `seurat_clusters` column will be kept and `Idents` will be kept as the original `seurat_clusters`.
@@ -1785,6 +1816,7 @@ class CellTypeAnnotation(Proc):
1785
1816
  "over_clustering": "seurat_clusters",
1786
1817
  "assay": None,
1787
1818
  },
1819
+ "merge": False,
1788
1820
  "newcol": None,
1789
1821
  "outtype": "input",
1790
1822
  }
@@ -1831,6 +1863,14 @@ class SeuratMap2Ref(Proc):
1831
1863
  If the default assay of reference is `SCT`, then `SCTransform` will be used.
1832
1864
  split_by: The column name in metadata to split the query into multiple objects.
1833
1865
  This helps when the original query is too large to process.
1866
+ skip_if_normalized: Skip normalization if the query is already normalized.
1867
+ Since the object is supposed to be generated by `SeuratPreparing`, it is already normalized.
1868
+ However, a different normalization method may be used.
1869
+ If the reference is normalized by the same method as the query, the normalization can be skipped.
1870
+ Otherwise, the normalization cannot be skipped.
1871
+ The normalization method used for the query set is determined by the default assay.
1872
+ If `SCT`, then `SCTransform` is used; otherwise, `NormalizeData` is used.
1873
+ You can set this to `False` to force re-normalization (with or without the arguments previously used).
1834
1874
  SCTransform (ns): Arguments for [`SCTransform()`](https://satijalab.org/seurat/reference/sctransform)
1835
1875
  - do-correct-umi (flag): Place corrected UMI matrix in assay counts layer?
1836
1876
  - do-scale (flag): Whether to scale residuals to have unit variance?
@@ -1876,6 +1916,7 @@ class SeuratMap2Ref(Proc):
1876
1916
  "ref": None,
1877
1917
  "refnorm": "auto",
1878
1918
  "split_by": None,
1919
+ "skip_if_normalized": True,
1879
1920
  "SCTransform": {
1880
1921
  "do-correct-umi": False,
1881
1922
  "do-scale": False,
@@ -2174,7 +2215,6 @@ class MetaMarkers(Proc):
2174
2215
  plugin_opts = {
2175
2216
  "report": "file://../reports/scrna/MetaMarkers.svelte",
2176
2217
  "report_paging": 8,
2177
- "poplog_max": 15,
2178
2218
  }
2179
2219
 
2180
2220
 
@@ -2225,3 +2265,52 @@ class AnnData2Seurat(Proc):
2225
2265
  lang = config.lang.rscript
2226
2266
  envs = {"outtype": "rds", "assay": "RNA", "dotplot_check": True}
2227
2267
  script = "file://../scripts/scrna/AnnData2Seurat.R"
2268
+
2269
+
2270
+ class ScSimulation(Proc):
2271
+ """Simulate single-cell data using splatter.
2272
+
2273
+ See <https://www.bioconductor.org/packages/devel/bioc/vignettes/splatter/inst/doc/splatter.html#2_Quickstart>
2274
+
2275
+ Input:
2276
+ seed: The seed for the simulation
2277
+ You could also use string as the seed, and the seed will be
2278
+ generated by `digest::digest2int()`.
2279
+ So this could also work as a unique identifier for the simulation (ie. Sample ID).
2280
+
2281
+ Output:
2282
+ outfile: The output Seurat object/SingleCellExperiment in RDS format
2283
+
2284
+ Envs:
2285
+ ngenes (type=int): The number of genes to simulate
2286
+ ncells (type=int): The number of cells to simulate
2287
+ nspikes (type=int): The number of spike-ins to simulate
2288
+ When `ngenes`, `ncells`, and `nspikes` are not specified, the default
2289
+ params from `mockSCE()` will be used. By default, `ngenes = 2000`,
2290
+ `ncells = 200`, and `nspikes = 100`.
2291
+ outtype (choice): The output file type.
2292
+ - seurat: Seurat object
2293
+ - singlecellexperiment: SingleCellExperiment object
2294
+ - sce: alias for `singlecellexperiment`
2295
+ method (choice): which simulation method to use. Options are:
2296
+ - single: produces a single population
2297
+ - groups: produces distinct groups (eg. cell types), or
2298
+ - paths: selects cells from continuous trajectories (eg. differentiation processes)
2299
+ params (ns): Other parameters for simulation.
2300
+ The parameters are initialized `splitEstimate(mockSCE())` and then
2301
+ updated with the given parameters.
2302
+ See <https://rdrr.io/bioc/splatter/man/SplatParams.html>.
2303
+ Hyphens (`-`) will be transformed into dots (`.`) for the keys.
2304
+ """ # noqa: E501
2305
+ input = "seed:var"
2306
+ output = "outfile:file:simulatied_{{in.seed}}.RDS"
2307
+ lang = config.lang.rscript
2308
+ envs = {
2309
+ "ngenes": None,
2310
+ "ncells": None,
2311
+ "nspikes": None,
2312
+ "outtype": "seurat",
2313
+ "method": "single",
2314
+ "params": {},
2315
+ }
2316
+ script = "file://../scripts/scrna/ScSimulation.R"
@@ -0,0 +1,160 @@
1
+ """Get data from the web"""
2
+ from ..core.proc import Proc
3
+ from ..core.config import config
4
+
5
+
6
+ class Download(Proc):
7
+ """Download data from URLs
8
+
9
+ Input:
10
+ url: The URL to download data from
11
+
12
+ Output:
13
+ outfile: The file downloaded
14
+
15
+ Envs:
16
+ tool (choice): Which tool to use to download the data
17
+ - wget: Use wget
18
+ - aria2c: Use aria2c
19
+ - urllib: Use python's urllib
20
+ - aria: Alias for aria2c
21
+ wget: Path to wget
22
+ aria2c: Path to aria2c
23
+ args: The arguments to pass to the tool
24
+ ncores: The number of cores to use
25
+
26
+ Requires:
27
+ wget: Only required when envs.tool == "wget"
28
+ - check: {{proc.envs.wget}} --version
29
+ aria2c: Only required when envs.tool == "aria2c"
30
+ - check: {{proc.envs.aria2c}} --version
31
+ """
32
+ input = "url"
33
+ output = (
34
+ "outfile:file:"
35
+ "{{in.url | basename | replace: '%2E', '.' | slugify: separator='.'}}"
36
+ )
37
+ lang = config.lang.python
38
+ envs = {
39
+ "tool": "wget", # or aria2c, python
40
+ "wget": config.exe.wget,
41
+ "aria2c": config.exe.aria2c,
42
+ "args": {},
43
+ "ncores": config.misc.ncores,
44
+ }
45
+ script = "file://../scripts/web/Download.py"
46
+
47
+
48
+ class DownloadList(Proc):
49
+ """Download data from URLs in a file.
50
+
51
+ This does not work by iterating over the URLs in the file. The whole file is
52
+ passed to `wget` or `aria2c` at once.
53
+
54
+ Input:
55
+ urlfile: The file containing the URLs to download data from
56
+
57
+ Output:
58
+ outdir: The directory containing the downloaded files
59
+
60
+ Envs:
61
+ tool (choice): Which tool to use to download the data
62
+ - wget: Use wget
63
+ - aria2c: Use aria2c
64
+ - urllib: Use python's urllib
65
+ - aria: Alias for aria2c
66
+ wget: Path to wget
67
+ aria2c: Path to aria2c
68
+ args: The arguments to pass to the tool
69
+ ncores: The number of cores to use
70
+
71
+ Requires:
72
+ wget: Only required when envs.tool == "wget"
73
+ - check: {{proc.envs.wget}} --version
74
+ aria2c: Only required when envs.tool == "aria2c"
75
+ - check: {{proc.envs.aria2c}} --version
76
+ """
77
+ input = "urlfile:file"
78
+ output = "outdir:dir:{{in.urlfile | stem}}.downloaded"
79
+ lang = config.lang.python
80
+ envs = {
81
+ "tool": "wget", # or aria2c
82
+ "wget": config.exe.wget,
83
+ "aria2c": config.exe.aria2c,
84
+ "args": {},
85
+ "ncores": config.misc.ncores,
86
+ }
87
+ script = "file://../scripts/web/DownloadList.py"
88
+
89
+
90
+ class GCloudStorageDownloadFile(Proc):
91
+ """Download file from Google Cloud Storage
92
+
93
+ Before using this, make sure you have the `gcloud` tool installed and
94
+ logged in with the appropriate credentials using `gcloud auth login`.
95
+
96
+ Also make sure you have [`google-crc32c`](https://pypi.org/project/google-crc32c/)
97
+ installed to verify the integrity of the downloaded files.
98
+
99
+ Input:
100
+ url: The URL to download data from.
101
+ It should be in the format gs://bucket/path/to/file
102
+
103
+ Output:
104
+ outfile: The file downloaded
105
+
106
+ Envs:
107
+ gcloud: Path to gcloud
108
+ args (ns): Other arguments to pass to the `gcloud storage cp` command
109
+ - do_not_decompress (flag): Do not decompress the file.
110
+ - <more>: More arguments to pass to the `gcloud storage cp` command
111
+ See `gcloud storage cp --help` for more information
112
+ """
113
+ input = "url:var"
114
+ output = "outfile:file:{{in.url | replace: 'gs://', '/' | basename}}"
115
+ lang = config.lang.python
116
+ envs = {
117
+ "gcloud": config.exe.gcloud,
118
+ "args": {"do_not_decompress": True},
119
+ }
120
+ script = "file://../scripts/web/GCloudStorageDownloadFile.py"
121
+
122
+
123
+ class GCloudStorageDownloadBucket(Proc):
124
+ """Download all files from a Google Cloud Storage bucket
125
+
126
+ Before using this, make sure you have the `gcloud` tool installed and
127
+ logged in with the appropriate credentials using `gcloud auth login`.
128
+
129
+ Note that this will not use the `--recursive` flag of `gcloud storage cp`.
130
+ The files will be listed and downloaded one by one so that they can be parallelized.
131
+
132
+ Also make sure you have [`google-crc32c`](https://pypi.org/project/google-crc32c/)
133
+ installed to verify the integrity of the downloaded files.
134
+
135
+ Input:
136
+ url: The URL to download data from.
137
+ It should be in the format gs://bucket
138
+
139
+ Output:
140
+ outdir: The directory containing the downloaded files
141
+
142
+ Envs:
143
+ gcloud: Path to gcloud
144
+ keep_structure (flag): Keep the directory structure of the bucket
145
+ ncores (type=int): The number of cores to use to download the files in parallel
146
+ args (ns): Other arguments to pass to the `gcloud storage cp` command
147
+ - do_not_decompress (flag): Do not decompress the file.
148
+ - <more>: More arguments to pass to the `gcloud storage cp` command
149
+ See `gcloud storage cp --help` for more information
150
+ """
151
+ input = "url:var"
152
+ output = "outdir:dir:{{in.url | replace: 'gs://', ''}}"
153
+ lang = config.lang.python
154
+ envs = {
155
+ "gcloud": config.exe.gcloud,
156
+ "keep_structure": True,
157
+ "ncores": config.misc.ncores,
158
+ "args": {"do_not_decompress": True},
159
+ }
160
+ script = "file://../scripts/web/GCloudStorageDownloadBucket.py"
@@ -1,4 +1,5 @@
1
- source("{{biopipen_dir}}/utils/misc.R")
1
+ {{ biopipen_dir | joinpaths: "utils", "misc.R" | source_r }}
2
+
2
3
  library(parallel)
3
4
  library(dplyr)
4
5
  library(CNAclinic)
@@ -11,8 +11,8 @@ cellranger = {{envs.cellranger | quote}} # pyright: ignore
11
11
  tmpdir = Path({{envs.tmpdir | quote}}) # pyright: ignore
12
12
  ref = {{envs.ref | quote}} # pyright: ignore
13
13
  ncores = {{envs.ncores | int}} # pyright: ignore
14
- include_introns = {{envs.include_introns | repr}}
15
- create_bam = {{envs.create_bam | repr}}
14
+ include_introns = {{envs.include_introns | repr}} # pyright: ignore
15
+ create_bam = {{envs.create_bam | repr}} # pyright: ignore
16
16
 
17
17
  include_introns = str(include_introns).lower()
18
18
  create_bam = str(create_bam).lower()
@@ -54,7 +54,7 @@ version = version.replace("cellranger", "").replace("-", "").strip()
54
54
  version = list(map(int, version.split(".")))
55
55
  if version[0] >= 8:
56
56
  command += ["--create-bam", create_bam]
57
- elif not create_bam:
57
+ elif create_bam != "true":
58
58
  command += ["--no-bam"]
59
59
 
60
60
  run_command(command, fg=True, cwd=str(Path(outdir).parent))
@@ -1,4 +1,5 @@
1
- source("{{biopipen_dir}}/utils/misc.R")
1
+ {{ biopipen_dir | joinpaths: "utils", "misc.R" | source_r }}
2
+
2
3
  library(rlang)
3
4
  library(dplyr)
4
5
  library(ggplot2)
@@ -1,4 +1,4 @@
1
- source("{{biopipen_dir}}/utils/misc.R")
1
+ {{ biopipen_dir | joinpaths: "utils", "misc.R" | source_r }}
2
2
 
3
3
  library(AneuploidyScore)
4
4
  library(dplyr)
@@ -1,5 +1,5 @@
1
- source("{{biopipen_dir}}/utils/misc.R")
2
- source("{{biopipen_dir}}/utils/plot.R")
1
+ {{ biopipen_dir | joinpaths: "utils", "misc.R" | source_r }}
2
+ {{ biopipen_dir | joinpaths: "utils", "plot.R" | source_r }}
3
3
 
4
4
  library(ggplot2)
5
5
  library(ggprism)
@@ -1,4 +1,4 @@
1
- source("{{biopipen_dir}}/utils/misc.R")
1
+ {{ biopipen_dir | joinpaths: "utils", "misc.R" | source_r }}
2
2
 
3
3
  infiles <- {{in.infiles | r}}
4
4
  outfile <- {{out.outfile | r}}
@@ -1,5 +1,6 @@
1
- source("{{biopipen_dir}}/utils/misc.R")
2
- source("{{biopipen_dir}}/utils/mutate_helpers.R")
1
+ {{ biopipen_dir | joinpaths: "utils", "misc.R" | source_r }}
2
+ {{ biopipen_dir | joinpaths: "utils", "mutate_helpers.R" | source_r }}
3
+
3
4
  library(rlang)
4
5
  library(dplyr)
5
6
  library(ggplot2)
@@ -1,5 +1,5 @@
1
- source("{{biopipen_dir}}/utils/misc.R")
2
- source("{{biopipen_dir}}/utils/gene.R")
1
+ {{ biopipen_dir | joinpaths: "utils", "misc.R" | source_r }}
2
+ {{ biopipen_dir | joinpaths: "utils", "gene.R" | source_r }}
3
3
 
4
4
  infile <- {{in.infile | quote}}
5
5
  outfile <- {{out.outfile | quote}}
@@ -1,6 +1,6 @@
1
- source("{{biopipen_dir}}/utils/io.R")
2
- source("{{biopipen_dir}}/utils/gene.R")
3
- source("{{biopipen_dir}}/utils/gsea.R")
1
+ {{ biopipen_dir | joinpaths: "utils", "io.R" | source_r }}
2
+ {{ biopipen_dir | joinpaths: "utils", "gene.R" | source_r }}
3
+ {{ biopipen_dir | joinpaths: "utils", "gsea.R" | source_r }}
4
4
 
5
5
  infile = {{in.infile | quote}}
6
6
  outdir = {{out.outdir | quote}}
@@ -1,7 +1,7 @@
1
1
  # PreRank the genes for GSEA analysis
2
2
  # See: https://gseapy.readthedocs.io/en/latest/_modules/gseapy/algorithm.html#ranking_metric
3
- source("{{biopipen_dir}}/utils/io.R")
4
- source("{{biopipen_dir}}/utils/gsea.R")
3
+ {{ biopipen_dir | joinpaths: "utils", "io.R" | source_r }}
4
+ {{ biopipen_dir | joinpaths: "utils", "gsea.R" | source_r }}
5
5
 
6
6
  infile = {{in.infile | quote}}
7
7
  metafile = {{in.metafile | quote}}
@@ -1,7 +1,7 @@
1
1
  # devtools::install_github("GSEA-MSigDB/GSEA_R")
2
2
 
3
- source("{{biopipen_dir}}/utils/io.R")
4
- source("{{biopipen_dir}}/utils/gsea.R")
3
+ {{ biopipen_dir | joinpaths: "utils", "io.R" | source_r }}
4
+ {{ biopipen_dir | joinpaths: "utils", "gsea.R" | source_r }}
5
5
 
6
6
  library(dplyr)
7
7
  library(tibble)