biopipen 0.30.0__tar.gz → 0.31.1__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 (285) hide show
  1. {biopipen-0.30.0 → biopipen-0.31.1}/PKG-INFO +7 -7
  2. biopipen-0.31.1/biopipen/__init__.py +1 -0
  3. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/ns/scrna.py +61 -8
  4. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/scrna/CellsDistribution.R +1 -1
  5. biopipen-0.31.1/biopipen/scripts/scrna/ScSimulation.R +64 -0
  6. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/scrna/SeuratClusterStats-stats.R +16 -22
  7. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/scrna/SeuratMap2Ref.R +63 -36
  8. {biopipen-0.30.0 → biopipen-0.31.1}/pyproject.toml +9 -9
  9. {biopipen-0.30.0 → biopipen-0.31.1}/setup.py +7 -7
  10. biopipen-0.30.0/biopipen/__init__.py +0 -1
  11. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/core/__init__.py +0 -0
  12. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/core/config.py +0 -0
  13. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/core/config.toml +0 -0
  14. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/core/defaults.py +0 -0
  15. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/core/filters.py +0 -0
  16. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/core/proc.py +0 -0
  17. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/core/testing.py +0 -0
  18. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/ns/__init__.py +0 -0
  19. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/ns/bam.py +0 -0
  20. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/ns/bed.py +0 -0
  21. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/ns/cellranger.py +0 -0
  22. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/ns/cellranger_pipeline.py +0 -0
  23. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/ns/cnv.py +0 -0
  24. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/ns/cnvkit.py +0 -0
  25. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/ns/cnvkit_pipeline.py +0 -0
  26. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/ns/delim.py +0 -0
  27. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/ns/gene.py +0 -0
  28. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/ns/gsea.py +0 -0
  29. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/ns/misc.py +0 -0
  30. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/ns/plot.py +0 -0
  31. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/ns/regulatory.py +0 -0
  32. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/ns/rnaseq.py +0 -0
  33. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/ns/scrna_metabolic_landscape.py +0 -0
  34. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/ns/snp.py +0 -0
  35. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/ns/stats.py +0 -0
  36. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/ns/tcgamaf.py +0 -0
  37. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/ns/tcr.py +0 -0
  38. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/ns/vcf.py +0 -0
  39. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/ns/web.py +0 -0
  40. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/reports/bam/CNAClinic.svelte +0 -0
  41. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/reports/bam/CNVpytor.svelte +0 -0
  42. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/reports/bam/ControlFREEC.svelte +0 -0
  43. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/reports/cellranger/CellRangerCount.svelte +0 -0
  44. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/reports/cellranger/CellRangerSummary.svelte +0 -0
  45. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/reports/cellranger/CellRangerVdj.svelte +0 -0
  46. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/reports/cnv/AneuploidyScore.svelte +0 -0
  47. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/reports/cnv/AneuploidyScoreSummary.svelte +0 -0
  48. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/reports/cnv/TMADScoreSummary.svelte +0 -0
  49. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/reports/cnvkit/CNVkitDiagram.svelte +0 -0
  50. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/reports/cnvkit/CNVkitHeatmap.svelte +0 -0
  51. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/reports/cnvkit/CNVkitScatter.svelte +0 -0
  52. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/reports/delim/SampleInfo.svelte +0 -0
  53. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/reports/gsea/FGSEA.svelte +0 -0
  54. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/reports/gsea/GSEA.svelte +0 -0
  55. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/reports/scrna/CellsDistribution.svelte +0 -0
  56. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/reports/scrna/DimPlots.svelte +0 -0
  57. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/reports/scrna/MarkersFinder.svelte +0 -0
  58. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/reports/scrna/MetaMarkers.svelte +0 -0
  59. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/reports/scrna/RadarPlots.svelte +0 -0
  60. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/reports/scrna/ScFGSEA.svelte +0 -0
  61. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/reports/scrna/SeuratClusterStats.svelte +0 -0
  62. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/reports/scrna/SeuratMap2Ref.svelte +0 -0
  63. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/reports/scrna/SeuratPreparing.svelte +0 -0
  64. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/reports/scrna/TopExpressingGenes.svelte +0 -0
  65. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/reports/scrna_metabolic_landscape/MetabolicFeatures.svelte +0 -0
  66. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/reports/scrna_metabolic_landscape/MetabolicFeaturesIntraSubset.svelte +0 -0
  67. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/reports/scrna_metabolic_landscape/MetabolicPathwayActivity.svelte +0 -0
  68. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/reports/scrna_metabolic_landscape/MetabolicPathwayHeterogeneity.svelte +0 -0
  69. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/reports/snp/PlinkCallRate.svelte +0 -0
  70. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/reports/snp/PlinkFreq.svelte +0 -0
  71. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/reports/snp/PlinkHWE.svelte +0 -0
  72. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/reports/snp/PlinkHet.svelte +0 -0
  73. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/reports/snp/PlinkIBD.svelte +0 -0
  74. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/reports/tcr/CDR3AAPhyschem.svelte +0 -0
  75. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/reports/tcr/CloneResidency.svelte +0 -0
  76. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/reports/tcr/Immunarch.svelte +0 -0
  77. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/reports/tcr/SampleDiversity.svelte +0 -0
  78. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/reports/tcr/TCRClusterStats.svelte +0 -0
  79. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/reports/tcr/TESSA.svelte +0 -0
  80. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/reports/tcr/VJUsage.svelte +0 -0
  81. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/reports/utils/gsea.liq +0 -0
  82. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/reports/utils/misc.liq +0 -0
  83. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/reports/vcf/TruvariBenchSummary.svelte +0 -0
  84. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/reports/vcf/TruvariConsistency.svelte +0 -0
  85. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/bam/BamMerge.py +0 -0
  86. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/bam/BamSplitChroms.py +0 -0
  87. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/bam/CNAClinic.R +0 -0
  88. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/bam/CNVpytor.py +0 -0
  89. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/bam/ControlFREEC.py +0 -0
  90. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/bed/Bed2Vcf.py +0 -0
  91. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/bed/BedConsensus.py +0 -0
  92. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/bed/BedLiftOver.sh +0 -0
  93. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/bed/BedtoolsIntersect.py +0 -0
  94. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/bed/BedtoolsMerge.py +0 -0
  95. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/cellranger/CellRangerCount.py +0 -0
  96. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/cellranger/CellRangerSummary.R +0 -0
  97. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/cellranger/CellRangerVdj.py +0 -0
  98. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/cnv/AneuploidyScore.R +0 -0
  99. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/cnv/AneuploidyScoreSummary.R +0 -0
  100. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/cnv/TMADScore.R +0 -0
  101. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/cnv/TMADScoreSummary.R +0 -0
  102. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/cnvkit/CNVkitAccess.py +0 -0
  103. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/cnvkit/CNVkitAutobin.py +0 -0
  104. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/cnvkit/CNVkitBatch.py +0 -0
  105. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/cnvkit/CNVkitCall.py +0 -0
  106. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/cnvkit/CNVkitCoverage.py +0 -0
  107. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/cnvkit/CNVkitDiagram.py +0 -0
  108. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/cnvkit/CNVkitFix.py +0 -0
  109. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/cnvkit/CNVkitGuessBaits.py +0 -0
  110. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/cnvkit/CNVkitHeatmap.py +0 -0
  111. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/cnvkit/CNVkitReference.py +0 -0
  112. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/cnvkit/CNVkitScatter.py +0 -0
  113. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/cnvkit/CNVkitSegment.py +0 -0
  114. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/cnvkit/guess_baits.py +0 -0
  115. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/delim/RowsBinder.R +0 -0
  116. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/delim/SampleInfo.R +0 -0
  117. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/gene/GeneNameConversion.R +0 -0
  118. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/gene/GenePromoters.R +0 -0
  119. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/gsea/Enrichr.R +0 -0
  120. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/gsea/FGSEA.R +0 -0
  121. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/gsea/GSEA.R +0 -0
  122. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/gsea/PreRank.R +0 -0
  123. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/misc/Config2File.py +0 -0
  124. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/misc/Shell.sh +0 -0
  125. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/misc/Str2File.py +0 -0
  126. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/plot/Heatmap.R +0 -0
  127. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/plot/Manhattan.R +0 -0
  128. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/plot/QQPlot.R +0 -0
  129. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/plot/ROC.R +0 -0
  130. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/plot/Scatter.R +0 -0
  131. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/plot/VennDiagram.R +0 -0
  132. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/regulatory/MotifAffinityTest.R +0 -0
  133. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/regulatory/MotifAffinityTest_AtSNP.R +0 -0
  134. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/regulatory/MotifAffinityTest_MotifBreakR.R +0 -0
  135. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/regulatory/MotifScan.py +0 -0
  136. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/regulatory/atSNP.R +0 -0
  137. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/regulatory/motifBreakR.R +0 -0
  138. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/rnaseq/Simulation-ESCO.R +0 -0
  139. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/rnaseq/Simulation-RUVcorr.R +0 -0
  140. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/rnaseq/Simulation.R +0 -0
  141. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/rnaseq/UnitConversion.R +0 -0
  142. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/scrna/AnnData2Seurat.R +0 -0
  143. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/scrna/CellTypeAnnotation-celltypist.R +0 -0
  144. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/scrna/CellTypeAnnotation-common.R +0 -0
  145. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/scrna/CellTypeAnnotation-direct.R +0 -0
  146. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/scrna/CellTypeAnnotation-hitype.R +0 -0
  147. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/scrna/CellTypeAnnotation-sccatch.R +0 -0
  148. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/scrna/CellTypeAnnotation-sctype.R +0 -0
  149. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/scrna/CellTypeAnnotation.R +0 -0
  150. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/scrna/DimPlots.R +0 -0
  151. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/scrna/ExprImputation-alra.R +0 -0
  152. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/scrna/ExprImputation-rmagic.R +0 -0
  153. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/scrna/ExprImputation-scimpute.R +0 -0
  154. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/scrna/ExprImputation.R +0 -0
  155. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/scrna/MarkersFinder.R +0 -0
  156. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/scrna/MetaMarkers.R +0 -0
  157. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/scrna/ModuleScoreCalculator.R +0 -0
  158. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/scrna/RadarPlots.R +0 -0
  159. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/scrna/SCImpute.R +0 -0
  160. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/scrna/ScFGSEA.R +0 -0
  161. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/scrna/Seurat2AnnData.R +0 -0
  162. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/scrna/SeuratClusterStats-clustree.R +0 -0
  163. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/scrna/SeuratClusterStats-dimplots.R +0 -0
  164. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/scrna/SeuratClusterStats-features.R +0 -0
  165. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/scrna/SeuratClusterStats-hists.R +0 -0
  166. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/scrna/SeuratClusterStats-ngenes.R +0 -0
  167. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/scrna/SeuratClusterStats.R +0 -0
  168. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/scrna/SeuratClustering-common.R +0 -0
  169. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/scrna/SeuratClustering.R +0 -0
  170. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/scrna/SeuratFilter.R +0 -0
  171. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/scrna/SeuratLoading.R +0 -0
  172. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/scrna/SeuratMetadataMutater.R +0 -0
  173. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/scrna/SeuratPreparing-common.R +0 -0
  174. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/scrna/SeuratPreparing-doublet_detection.R +0 -0
  175. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/scrna/SeuratPreparing.R +0 -0
  176. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/scrna/SeuratSplit.R +0 -0
  177. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/scrna/SeuratSubClustering.R +0 -0
  178. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/scrna/SeuratSubset.R +0 -0
  179. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/scrna/SeuratTo10X.R +0 -0
  180. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/scrna/Subset10X.R +0 -0
  181. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/scrna/TopExpressingGenes.R +0 -0
  182. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/scrna/celltypist-wrapper.py +0 -0
  183. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/scrna/sctype.R +0 -0
  184. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/scrna_metabolic_landscape/MetabolicFeatures.R +0 -0
  185. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/scrna_metabolic_landscape/MetabolicFeaturesIntraSubset.R +0 -0
  186. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/scrna_metabolic_landscape/MetabolicPathwayActivity.R +0 -0
  187. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/scrna_metabolic_landscape/MetabolicPathwayHeterogeneity.R +0 -0
  188. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/snp/MatrixEQTL.R +0 -0
  189. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/snp/Plink2GTMat.py +0 -0
  190. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/snp/PlinkCallRate.R +0 -0
  191. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/snp/PlinkFilter.py +0 -0
  192. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/snp/PlinkFreq.R +0 -0
  193. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/snp/PlinkFromVcf.py +0 -0
  194. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/snp/PlinkHWE.R +0 -0
  195. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/snp/PlinkHet.R +0 -0
  196. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/snp/PlinkIBD.R +0 -0
  197. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/snp/PlinkSimulation.py +0 -0
  198. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/snp/PlinkUpdateName.py +0 -0
  199. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/stats/ChowTest.R +0 -0
  200. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/stats/DiffCoexpr.R +0 -0
  201. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/stats/LiquidAssoc.R +0 -0
  202. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/stats/Mediation.R +0 -0
  203. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/stats/MetaPvalue.R +0 -0
  204. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/stats/MetaPvalue1.R +0 -0
  205. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/tcgamaf/Maf2Vcf.py +0 -0
  206. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/tcgamaf/MafAddChr.py +0 -0
  207. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/tcgamaf/maf2vcf.pl +0 -0
  208. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/tcr/Attach2Seurat.R +0 -0
  209. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/tcr/CDR3AAPhyschem.R +0 -0
  210. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/tcr/CloneResidency.R +0 -0
  211. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/tcr/CloneSizeQQPlot.R +0 -0
  212. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/tcr/GIANA/GIANA.py +0 -0
  213. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/tcr/GIANA/GIANA4.py +0 -0
  214. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/tcr/GIANA/Imgt_Human_TRBV.fasta +0 -0
  215. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/tcr/GIANA/query.py +0 -0
  216. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/tcr/Immunarch-basic.R +0 -0
  217. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/tcr/Immunarch-clonality.R +0 -0
  218. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/tcr/Immunarch-diversity.R +0 -0
  219. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/tcr/Immunarch-geneusage.R +0 -0
  220. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/tcr/Immunarch-kmer.R +0 -0
  221. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/tcr/Immunarch-overlap.R +0 -0
  222. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/tcr/Immunarch-spectratyping.R +0 -0
  223. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/tcr/Immunarch-tracking.R +0 -0
  224. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/tcr/Immunarch-vjjunc.R +0 -0
  225. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/tcr/Immunarch.R +0 -0
  226. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/tcr/Immunarch2VDJtools.R +0 -0
  227. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/tcr/ImmunarchFilter.R +0 -0
  228. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/tcr/ImmunarchLoading.R +0 -0
  229. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/tcr/ImmunarchSplitIdents.R +0 -0
  230. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/tcr/SampleDiversity.R +0 -0
  231. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/tcr/TCRClusterStats.R +0 -0
  232. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/tcr/TCRClustering.R +0 -0
  233. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/tcr/TCRDock.py +0 -0
  234. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/tcr/TESSA.R +0 -0
  235. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/tcr/TESSA_source/Atchley_factors.csv +0 -0
  236. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/tcr/TESSA_source/BriseisEncoder.py +0 -0
  237. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/tcr/TESSA_source/MCMC_control.R +0 -0
  238. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/tcr/TESSA_source/TrainedEncoder.h5 +0 -0
  239. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/tcr/TESSA_source/fixed_b.csv +0 -0
  240. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/tcr/TESSA_source/initialization.R +0 -0
  241. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/tcr/TESSA_source/post_analysis.R +0 -0
  242. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/tcr/TESSA_source/real_data.R +0 -0
  243. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/tcr/TESSA_source/update.R +0 -0
  244. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/tcr/TESSA_source/utility.R +0 -0
  245. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/tcr/VJUsage.R +0 -0
  246. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/tcr/immunarch-patched.R +0 -0
  247. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/tcr/vdjtools-patch.sh +0 -0
  248. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/vcf/BcftoolsAnnotate.py +0 -0
  249. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/vcf/BcftoolsFilter.py +0 -0
  250. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/vcf/BcftoolsSort.py +0 -0
  251. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/vcf/BcftoolsView.py +0 -0
  252. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/vcf/TruvariBench.sh +0 -0
  253. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/vcf/TruvariBenchSummary.R +0 -0
  254. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/vcf/TruvariConsistency.R +0 -0
  255. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/vcf/Vcf2Bed.py +0 -0
  256. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/vcf/VcfAnno.py +0 -0
  257. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/vcf/VcfDownSample.sh +0 -0
  258. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/vcf/VcfFilter.py +0 -0
  259. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/vcf/VcfFix.py +0 -0
  260. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/vcf/VcfFix_utils.py +0 -0
  261. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/vcf/VcfIndex.py +0 -0
  262. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/vcf/VcfIntersect.py +0 -0
  263. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/vcf/VcfLiftOver.sh +0 -0
  264. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/vcf/VcfSplitSamples.py +0 -0
  265. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/vcf/bcftools_utils.py +0 -0
  266. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/web/Download.py +0 -0
  267. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/web/DownloadList.py +0 -0
  268. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/web/GCloudStorageDownloadBucket.py +0 -0
  269. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/web/GCloudStorageDownloadFile.py +0 -0
  270. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/scripts/web/gcloud_common.py +0 -0
  271. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/utils/__init__.py +0 -0
  272. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/utils/caching.R +0 -0
  273. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/utils/common_docstrs.py +0 -0
  274. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/utils/gene.R +0 -0
  275. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/utils/gene.py +0 -0
  276. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/utils/gsea.R +0 -0
  277. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/utils/io.R +0 -0
  278. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/utils/misc.R +0 -0
  279. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/utils/misc.py +0 -0
  280. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/utils/mutate_helpers.R +0 -0
  281. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/utils/plot.R +0 -0
  282. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/utils/reference.py +0 -0
  283. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/utils/rnaseq.R +0 -0
  284. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/utils/single_cell.R +0 -0
  285. {biopipen-0.30.0 → biopipen-0.31.1}/biopipen/utils/vcf.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: biopipen
3
- Version: 0.30.0
3
+ Version: 0.31.1
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.1"
@@ -541,14 +541,19 @@ class SeuratClusterStats(Proc):
541
541
  This is to do some basic statistics on the clusters. For more comprehensive analysis,
542
542
  see `RadarPlots` and `CellsDistribution`.
543
543
  The parameters from the cases can overwrite the default parameters.
544
- - 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.
545
554
  - pie (flag): Also output a pie chart?
546
555
  - circos (flag): Also output a circos plot?
547
556
  - table (flag): Whether to output a table (in tab-delimited format) and in the report.
548
- - frac_ofall (flag): Whether to output the fraction against all cells,
549
- instead of the fraction in each group.
550
- Does not work for circos plot.
551
- Only works when `frac` is `True` and `group-by` is specified.
552
557
  - transpose (flag): Whether to transpose the cluster and group, that is,
553
558
  using group as the x-axis and cluster to fill the plot.
554
559
  For circos plot, when transposed, the arrows will be drawn from the idents (by `ident`) to the
@@ -708,12 +713,11 @@ class SeuratClusterStats(Proc):
708
713
  },
709
714
  "hists": {},
710
715
  "stats_defaults": {
711
- "frac": False,
716
+ "frac": "none",
712
717
  "pie": False,
713
718
  "circos": False,
714
719
  "table": False,
715
720
  "position": "auto",
716
- "frac_ofall": False,
717
721
  "transpose": False,
718
722
  "ident": "seurat_clusters",
719
723
  "group-by": None,
@@ -731,7 +735,7 @@ class SeuratClusterStats(Proc):
731
735
  "Number of cells in each cluster by Sample": {
732
736
  "group-by": "Sample",
733
737
  "table": True,
734
- "frac": True,
738
+ "frac": "group",
735
739
  },
736
740
  },
737
741
  "ngenes_defaults": {
@@ -2261,3 +2265,52 @@ class AnnData2Seurat(Proc):
2261
2265
  lang = config.lang.rscript
2262
2266
  envs = {"outtype": "rds", "assay": "RNA", "dotplot_check": True}
2263
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"
@@ -325,7 +325,7 @@ do_case <- function(name, case) {
325
325
  geom_col(width=.01, position="fill", color = "#888888") +
326
326
  geom_bar(stat = "identity", position = position_fill(reverse = TRUE)) +
327
327
  coord_polar("y", start = 0) +
328
- scale_fill_biopipen(name = "Cluster", limits = levels(all_clusters)) +
328
+ scale_fill_manual(name = "Cluster", values = pal_biopipen()(length(levels(all_clusters)))) +
329
329
  theme_void() +
330
330
  theme(
331
331
  plot.margin = plot.margin,
@@ -0,0 +1,64 @@
1
+ {{ biopipen_dir | joinpaths: "utils", "misc.R" | source_r }}
2
+
3
+ library(rlang)
4
+ library(splatter)
5
+ library(scater)
6
+
7
+ # Load template variables
8
+ seed <- {{ in.seed | r }}
9
+ outfile <- {{ out.outfile | r }}
10
+ ngenes <- {{ envs.ngenes | r }}
11
+ ncells <- {{ envs.ncells | r }}
12
+ nspikes <- {{ envs.nspikes | r }}
13
+ outtype <- {{ envs.outtype | r }}
14
+ method <- {{ envs.method | r }}
15
+ user_params <- {{ envs.params | r: todot="-" }}
16
+
17
+ log_info("Generating simulation parameters ...")
18
+
19
+ seed <- seed %||% 1
20
+ if (length(seed) > 1) {
21
+ log_warn("- multiple seeds provided, using the first one")
22
+ seed <- seed[1]
23
+ }
24
+ if (is.character(seed)) {
25
+ library(digest)
26
+ proj <- seed
27
+ seed <- digest2int(seed)
28
+ } else {
29
+ proj <- paste0("S", seed)
30
+ }
31
+
32
+ set.seed(seed)
33
+ mock_sce_params <- list()
34
+ if (!is.null(ngenes)) mock_sce_params$ngenes <- ngenes
35
+ if (!is.null(ncells)) mock_sce_params$ncells <- ncells
36
+ if (!is.null(nspikes)) mock_sce_params$nspikes <- nspikes
37
+ sce <- do.call(mockSCE, mock_sce_params)
38
+ params <- splatEstimate(sce)
39
+ user_params$seed <- seed
40
+ user_params$object = params
41
+ do_call(setParams, user_params)
42
+
43
+
44
+ log_info("Saving simulation parameters to file ...")
45
+
46
+ sim <- splatSimulate(params, method = method, verbose = TRUE)
47
+
48
+ outtype <- tolower(outtype)
49
+ if (outtype == "sce") outtype <- "singlecellexperiment"
50
+
51
+ if (outtype == "singlecellexperiment") {
52
+ log_info("Saving simulation to file ...")
53
+ saveRDS(sim, file = outfile)
54
+ } else {
55
+ log_info("Converting simulation to Seurat object ...")
56
+ cnts <- SingleCellExperiment::counts(sim)
57
+ sobj <- Seurat::CreateSeuratObject(counts = cnts, project = proj)
58
+ rm(sim)
59
+ rm(cnts)
60
+ gc()
61
+
62
+ log_info("Saving simulation to file ...")
63
+ saveRDS(sobj, file = outfile)
64
+ }
@@ -18,12 +18,6 @@ do_one_stats = function(name) {
18
18
  if (isTRUE(case$pie) && !is.null(case$group.by)) {
19
19
  stop(paste0(name, ": pie charts are not supported for group-by"))
20
20
  }
21
- if (!isTRUE(case$frac) && isTRUE(case$frac_ofall)) {
22
- stop(paste0(name, ": frac_ofall is only supported when frac is true"))
23
- }
24
- if (isTRUE(case$frac_ofall) && is.null(case$group.by)) {
25
- stop(paste0(name, ": frac_ofall is only supported for group-by"))
26
- }
27
21
  if (isTRUE(case$transpose) && is.null(case$group.by)) {
28
22
  stop(paste0(name, ": transpose is only supported for group-by"))
29
23
  }
@@ -46,28 +40,28 @@ do_one_stats = function(name) {
46
40
  !!!syms(case$split.by)
47
41
  ), function(df) {
48
42
  out <- df %>% group_by(!!!syms(select_cols)) %>% summarise(.n = n(), .groups = "drop")
49
- if (!is.null(case$group.by) && isTRUE(case$frac)) {
50
- if (isTRUE(case$frac_ofall)) {
43
+ if (!is.null(case$group.by) && case$frac != "none") {
44
+ if (case$frac == "all") {
51
45
  out <- out %>% mutate(.frac = .n / sum(.n))
52
- } else if (isTRUE(case$transpose)) {
53
- out <- out %>% group_by(!!sym(case$ident)) %>% mutate(.frac = .n / sum(.n))
54
- } else {
46
+ } else if (case$frac == "group") {
55
47
  out <- out %>% group_by(!!sym(case$group.by)) %>% mutate(.frac = .n / sum(.n))
48
+ } else { # case$frac == "ident" or "cluster"
49
+ out <- out %>% group_by(!!sym(case$ident)) %>% mutate(.frac = .n / sum(.n))
56
50
  }
57
51
  }
58
52
  out
59
53
  }))
60
- } else if (!is.null(case$group.by) && isTRUE(case$frac)) {
54
+ } else if (!is.null(case$group.by) && case$frac != "none") { # no split.by
61
55
  plot_df <- df_cells %>%
62
56
  select(all_of(select_cols)) %>%
63
57
  group_by(!!!syms(select_cols)) %>%
64
58
  summarise(.n = n(), .groups = "drop")
65
- if (isTRUE(case$frac_ofall)) {
59
+ if (case$frac == "all") {
66
60
  plot_df = plot_df %>% mutate(.frac = .n / sum(.n))
67
- } else {
68
- plot_df = plot_df %>%
69
- group_by(!!sym(ifelse(isTRUE(case$transpose), case$group.by, case$ident))) %>%
70
- mutate(.frac = .n / sum(.n))
61
+ } else if (case$frac == "group") {
62
+ plot_df = plot_df %>% group_by(!!sym(case$group.by)) %>% mutate(.frac = .n / sum(.n))
63
+ } else { # case$frac == "ident" or "cluster"
64
+ plot_df = plot_df %>% group_by(!!sym(case$ident)) %>% mutate(.frac = .n / sum(.n))
71
65
  }
72
66
  } else {
73
67
  plot_df <- df_cells %>%
@@ -75,7 +69,7 @@ do_one_stats = function(name) {
75
69
  group_by(!!!syms(select_cols)) %>%
76
70
  summarise(.n = n(), .groups = "drop")
77
71
 
78
- if (isTRUE(case$frac) || isTRUE(case$frac_ofall)) {
72
+ if (case$frac != "none") {
79
73
  plot_df <- plot_df %>% mutate(.frac = .n / sum(.n))
80
74
  }
81
75
  }
@@ -88,13 +82,13 @@ do_one_stats = function(name) {
88
82
  p = plot_df %>%
89
83
  ggplot(aes(
90
84
  x=!!sym(ifelse(case$transpose, case$group.by, case$ident)),
91
- y=if (isTRUE(case$frac)) .frac else .n,
85
+ y=if (case$frac != "none") .frac else .n,
92
86
  fill=!!sym(ifelse(is.null(case$group.by) || isTRUE(case$transpose), case$ident, case$group.by))
93
87
  )) +
94
88
  geom_bar(stat="identity", position=bar_position, alpha=.8) +
95
89
  theme_prism(axis_text_angle = 90) +
96
90
  scale_fill_biopipen() +
97
- ylab(ifelse(isTRUE(case$frac), "Fraction of cells", "Number of cells"))
91
+ ylab(ifelse(case$frac != "none", "Fraction of cells", "Number of cells"))
98
92
 
99
93
  if (!is.null(case$split.by)) {
100
94
  p = p + facet_wrap(case$split.by)
@@ -109,7 +103,7 @@ do_one_stats = function(name) {
109
103
  kind = "descr",
110
104
  content = paste0(
111
105
  "Plots showing the ",
112
- ifelse(isTRUE(case$frac), "number/faction", "number"),
106
+ ifelse(case$frac != "none", "number/faction", "number"),
113
107
  " of cells per cluster",
114
108
  ifelse(
115
109
  is.null(case$group.by),
@@ -150,7 +144,7 @@ do_one_stats = function(name) {
150
144
  guides(fill = guide_legend(title = case$ident)) +
151
145
  theme_void() +
152
146
  geom_label(
153
- if (isTRUE(case$frac))
147
+ if (case$frac != "none")
154
148
  aes(label=sprintf("%.1f%%", .frac * 100))
155
149
  else
156
150
  aes(label=.n),
@@ -45,6 +45,10 @@ if (is.null(split_by)) {
45
45
  future::plan(strategy = "multicore", workers = ncores)
46
46
  }
47
47
 
48
+ .is_sct <- function(x) {
49
+ return(Seurat:::IsSCT(assay = x@assays[[DefaultAssay(x)]]))
50
+ }
51
+
48
52
  .expand_dims = function(args, name = "dims") {
49
53
  # Expand dims from 30 to 1:30
50
54
  if (is.numeric(args[[name]]) && length(args[[name]] == 1)) {
@@ -63,6 +67,8 @@ if (endsWith(ref, ".rds") || endsWith(ref, ".RDS")) {
63
67
  } else {
64
68
  reference = LoadH5Seurat(ref)
65
69
  }
70
+ reference = UpdateSeuratObject(reference)
71
+ reference = UpdateSCTAssays(reference)
66
72
 
67
73
  # check if refdata exists in the reference
68
74
  for (rname in names(mapquery_args$refdata)) {
@@ -84,9 +90,20 @@ for (rname in names(mapquery_args$refdata)) {
84
90
  }
85
91
  }
86
92
 
87
- if (refnorm == "auto" && DefaultAssay(reference) == "SCT") {
93
+ if (refnorm == "auto" && .is_sct(reference)) {
88
94
  refnorm = "SCTransform"
89
95
  }
96
+ if (refnorm == "SCTransform") {
97
+ # Check if the reference is SCTransform'ed
98
+ if (!.is_sct(reference)) {
99
+ stop("Reference is not SCTransform'ed")
100
+ }
101
+ n_models = length(x = slot(object = reference[[DefaultAssay(reference)]], name = "SCTModel.list"))
102
+ if (n_models == 0) {
103
+ stop("Reference doesn't contain SCTModel.")
104
+ }
105
+ }
106
+
90
107
  log_info(" Normalization method used: {refnorm}")
91
108
  if (refnorm == "SCTransform") {
92
109
  findtransferanchors_args$normalization.method = "SCT"
@@ -130,18 +147,17 @@ log_info("- Normalizing data")
130
147
  if (refnorm == "SCTransform") {
131
148
  if (defassay == "SCT" && skip_if_normalized) {
132
149
  log_warn(" Skipping normalization as the object is already SCTransform'ed")
133
- query = sobj
134
150
  } else {
135
151
  log_info(" Using SCTransform normalization")
136
152
  sctransform_args$residual.features = rownames(x = reference)
137
153
  if (is.null(split_by)) {
138
154
  sctransform_args$object = sobj
139
- query = do_call(SCTransform, sctransform_args)
155
+ sobj = do_call(SCTransform, sctransform_args)
140
156
  sctransform_args$object <- NULL
141
157
  rm(sctransform_args)
142
158
  gc()
143
159
  } else {
144
- query = mclapply(
160
+ sobj = mclapply(
145
161
  X = sobj,
146
162
  FUN = function(x) {
147
163
  sctransform_args$object = x
@@ -149,22 +165,21 @@ if (refnorm == "SCTransform") {
149
165
  },
150
166
  mc.cores = ncores
151
167
  )
152
- if (any(unlist(lapply(query, class)) == "try-error")) {
153
- stop(paste0("\nmclapply (SCTransform) error:", query))
168
+ if (any(unlist(lapply(sobj, class)) == "try-error")) {
169
+ stop(paste0("\nmclapply (SCTransform) error:", sobj))
154
170
  }
155
171
  }
156
172
  }
157
173
  } else {
158
174
  if (defassay == "RNA" && skip_if_normalized) {
159
175
  log_warn(" Skipping normalization as the object is already LogNormalize'd")
160
- query = sobj
161
176
  } else {
162
177
  log_info(" Using NormalizeData normalization")
163
178
  if (is.null(split_by)) {
164
179
  normalizedata_args$object = sobj
165
- query = do_call(NormalizeData, normalizedata_args)
180
+ sobj = do_call(NormalizeData, normalizedata_args)
166
181
  } else {
167
- query = mclapply(
182
+ sobj = mclapply(
168
183
  X = sobj,
169
184
  FUN = function(x) {
170
185
  normalizedata_args$object = x
@@ -172,8 +187,8 @@ if (refnorm == "SCTransform") {
172
187
  },
173
188
  mc.cores = ncores
174
189
  )
175
- if (any(unlist(lapply(query, class)) == "try-error")) {
176
- stop(paste0("\nmclapply (NormalizeData) error:", query))
190
+ if (any(unlist(lapply(sobj, class)) == "try-error")) {
191
+ stop(paste0("\nmclapply (NormalizeData) error:", sobj))
177
192
  }
178
193
  }
179
194
  normalizedata_args$object <- NULL
@@ -181,14 +196,12 @@ if (refnorm == "SCTransform") {
181
196
  gc()
182
197
  }
183
198
  }
184
- rm(sobj)
185
- gc()
186
199
 
187
200
  # Find anchors between query and reference
188
201
  log_info("- Finding anchors")
189
202
  findtransferanchors_args$reference = reference
190
203
  if (is.null(split_by)) {
191
- findtransferanchors_args$query = query
204
+ findtransferanchors_args$query = sobj
192
205
  anchors = do_call(FindTransferAnchors, findtransferanchors_args)
193
206
  findtransferanchors_args$reference = NULL
194
207
  findtransferanchors_args$query = NULL
@@ -196,7 +209,7 @@ if (is.null(split_by)) {
196
209
  gc()
197
210
  } else {
198
211
  anchors = mclapply(
199
- X = query,
212
+ X = sobj,
200
213
  FUN = function(x) {
201
214
  findtransferanchors_args$query = x
202
215
  do_call(FindTransferAnchors, findtransferanchors_args)
@@ -212,25 +225,25 @@ if (is.null(split_by)) {
212
225
  log_info("- Mapping query to reference")
213
226
  mapquery_args$reference = reference
214
227
  if (is.null(split_by)) {
215
- mapquery_args$query = query
228
+ mapquery_args$query = sobj
216
229
  mapquery_args$anchorset = anchors
217
- query = do_call(MapQuery, mapquery_args)
230
+ sobj = do_call(MapQuery, mapquery_args)
218
231
  mapquery_args$reference = NULL
219
232
  mapquery_args$query = NULL
220
233
  mapquery_args$anchorset = NULL
221
234
  gc()
222
235
  } else {
223
- query = mclapply(
224
- X = seq_along(query),
236
+ sobj = mclapply(
237
+ X = seq_along(sobj),
225
238
  FUN = function(i) {
226
- mapquery_args$query = query[[i]]
239
+ mapquery_args$query = sobj[[i]]
227
240
  mapquery_args$anchorset = anchors[[i]]
228
241
  do_call(MapQuery, mapquery_args)
229
242
  },
230
243
  mc.cores = ncores
231
244
  )
232
- if (any(unlist(lapply(query, class)) == "try-error")) {
233
- stop(paste0("\nmclapply (MapQuery) error:", query))
245
+ if (any(unlist(lapply(sobj, class)) == "try-error")) {
246
+ stop(paste0("\nmclapply (MapQuery) error:", sobj))
234
247
  }
235
248
  }
236
249
 
@@ -254,7 +267,7 @@ if (is.null(split_by)) {
254
267
  gc()
255
268
  } else {
256
269
  mappingscore = mclapply(
257
- X = seq_along(query),
270
+ X = seq_along(sobj),
258
271
  FUN = function(i) {
259
272
  mappingscore_args$anchors = anchors[[i]]
260
273
  tryCatch({
@@ -274,25 +287,25 @@ if (is.null(split_by)) {
274
287
  # Calculate mapping score and add to metadata
275
288
  log_info("- Adding mapping score to metadata")
276
289
  if (is.null(split_by)) {
277
- query = AddMetaData(
278
- object = query,
290
+ sobj = AddMetaData(
291
+ object = sobj,
279
292
  metadata = mappingscore,
280
293
  col.name = "mapping.score"
281
294
  )
282
295
  } else {
283
- query = mclapply(
284
- X = seq_along(query),
296
+ sobj = mclapply(
297
+ X = seq_along(sobj),
285
298
  FUN = function(i) {
286
299
  AddMetaData(
287
- object = query[[i]],
300
+ object = sobj[[i]],
288
301
  metadata = mappingscore[[i]],
289
302
  col.name = "mapping.score"
290
303
  )
291
304
  },
292
305
  mc.cores = ncores
293
306
  )
294
- if (any(unlist(lapply(query, class)) == "try-error")) {
295
- stop(paste0("\nmclapply (AddMetaData) error:", query))
307
+ if (any(unlist(lapply(sobj, class)) == "try-error")) {
308
+ stop(paste0("\nmclapply (AddMetaData) error:", sobj))
296
309
  }
297
310
 
298
311
  # Combine the results
@@ -300,19 +313,33 @@ if (is.null(split_by)) {
300
313
  gc()
301
314
  # Memory efficient way to merge the results
302
315
  # query = Reduce(function(x, y) merge(x, y, merge.dr = "ref.umap"), query)
303
- query = merge(query[[1]], query[2:length(query)], merge.dr = "ref.umap")
316
+ sobj = merge(sobj[[1]], sobj[2:length(sobj)], merge.dr = "ref.umap")
304
317
  }
305
318
 
306
319
  # Add the alias to the metadata for the clusters
307
320
  log_info("- Adding ident to metadata and set as ident")
308
- query@meta.data = query@meta.data %>% mutate(
321
+ sobj@meta.data = sobj@meta.data %>% mutate(
309
322
  !!sym(ident) := as.factor(!!parse_expr(paste0("predicted.", use)))
310
323
  )
311
- Idents(query) = ident
324
+ Idents(sobj) = ident
325
+
326
+ # Check if PrepSCTFindMarkers is done
327
+ if (.is_sct(sobj) && is.null(sobj@commands$PrepSCTFindMarkers)) {
328
+ log_info("- Running PrepSCTFindMarkers ...")
329
+ sobj <- PrepSCTFindMarkers(sobj)
330
+ # compose a new SeuratCommand to record it to sobj@commands
331
+ commands <- names(pbmc_small@commands)
332
+ scommand <- pbmc_small@commands[[commands[length(commands)]]]
333
+ scommand@time.stamp <- Sys.time()
334
+ scommand@assay.used <- DefaultAssay(sobj)
335
+ scommand@call.string <- "PrepSCTFindMarkers(object = sobj)"
336
+ scommand@params <- list()
337
+ sobj@commands$PrepSCTFindMarkers <- scommand
338
+ }
312
339
 
313
340
  # Save
314
341
  log_info("- Saving result ...")
315
- saveRDS(query, file = outfile)
342
+ saveRDS(sobj, file = outfile)
316
343
 
317
344
 
318
345
  # ############################
@@ -325,7 +352,7 @@ ref.reduction = mapquery_args$reduction.model %||% "wnn.umap"
325
352
  for (qname in names(mapquery_args$refdata)) {
326
353
  rname <- mapquery_args$refdata[[qname]]
327
354
 
328
- if (grepl("Array", class(reference[[rname]])) && grepl("Array", class(query[[qname]]))) {
355
+ if (grepl("Array", class(reference[[rname]])) && grepl("Array", class(sobj[[qname]]))) {
329
356
  log_warn(" Skipping transferred array: {qname} -> {rname}")
330
357
  next
331
358
  }
@@ -342,7 +369,7 @@ for (qname in names(mapquery_args$refdata)) {
342
369
  ) + NoLegend()
343
370
 
344
371
  query_p <- DimPlot(
345
- object = query,
372
+ object = sobj,
346
373
  reduction = "ref.umap",
347
374
  group.by = paste0("predicted.", qname),
348
375
  label = TRUE,
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "biopipen"
3
- version = "0.30.0"
3
+ version = "0.31.1"
4
4
  description = "Bioinformatics processes/pipelines that can be run from `pipen run`"
5
5
  authors = ["pwwang <pwwang@pwwang.com>"]
6
6
  license = "MIT"
@@ -11,14 +11,14 @@ generate-setup-file = true
11
11
  [tool.poetry.dependencies]
12
12
  python = "^3.9"
13
13
  # # required by other plugins
14
- # pipen = "^0.14"
15
- pipen-filters = "^0.13"
16
- pipen-cli-run = "^0.13"
17
- pipen-verbose = "^0.11"
18
- pipen-poplog = "^0.1.2"
14
+ # pipen = "^0.15"
15
+ pipen-filters = "^0.14"
16
+ pipen-cli-run = "^0.14"
17
+ pipen-verbose = "^0.12"
18
+ pipen-poplog = "^0.2.0"
19
19
  datar = { version = "^0.15.6", extras = ["pandas"] }
20
- pipen-board = { version = "^0.15", extras = ["report"] }
21
- pipen-runinfo = { version = "^0.6", optional = true }
20
+ pipen-board = { version = "^0.16", extras = ["report"] }
21
+ pipen-runinfo = { version = "^0.7", optional = true }
22
22
 
23
23
  [tool.poetry.extras]
24
24
  runinfo = ["pipen-runinfo"]
@@ -55,5 +55,5 @@ build-backend = "poetry.core.masonry.api"
55
55
 
56
56
  [tool.black]
57
57
  line-length = 88
58
- target-version = ['py38', 'py39', 'py310', 'py311']
58
+ target-version = ['py39', 'py310', 'py311', 'py312']
59
59
  include = '\.pyi?$'
@@ -46,14 +46,14 @@ package_data = \
46
46
 
47
47
  install_requires = \
48
48
  ['datar[pandas]>=0.15.6,<0.16.0',
49
- 'pipen-board[report]>=0.15,<0.16',
50
- 'pipen-cli-run>=0.13,<0.14',
51
- 'pipen-filters>=0.13,<0.14',
52
- 'pipen-poplog>=0.1.2,<0.2.0',
53
- 'pipen-verbose>=0.11,<0.12']
49
+ 'pipen-board[report]>=0.16,<0.17',
50
+ 'pipen-cli-run>=0.14,<0.15',
51
+ 'pipen-filters>=0.14,<0.15',
52
+ 'pipen-poplog>=0.2.0,<0.3.0',
53
+ 'pipen-verbose>=0.12,<0.13']
54
54
 
55
55
  extras_require = \
56
- {'runinfo': ['pipen-runinfo>=0.6,<0.7']}
56
+ {'runinfo': ['pipen-runinfo>=0.7,<0.8']}
57
57
 
58
58
  entry_points = \
59
59
  {'pipen_cli_run': ['bam = biopipen.ns.bam',
@@ -82,7 +82,7 @@ entry_points = \
82
82
 
83
83
  setup_kwargs = {
84
84
  'name': 'biopipen',
85
- 'version': '0.30.0',
85
+ 'version': '0.31.1',
86
86
  'description': 'Bioinformatics processes/pipelines that can be run from `pipen run`',
87
87
  'long_description': 'None',
88
88
  'author': 'pwwang',
@@ -1 +0,0 @@
1
- __version__ = "0.30.0"
File without changes
File without changes
File without changes
File without changes