biopipen 0.34.7__tar.gz → 0.34.9__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 (290) hide show
  1. {biopipen-0.34.7 → biopipen-0.34.9}/PKG-INFO +3 -2
  2. biopipen-0.34.9/biopipen/__init__.py +1 -0
  3. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/ns/regulatory.py +4 -0
  4. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/ns/scrna.py +23 -1
  5. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/regulatory/MotifAffinityTest.R +21 -5
  6. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/regulatory/MotifAffinityTest_AtSNP.R +9 -2
  7. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/regulatory/MotifAffinityTest_MotifBreakR.R +15 -6
  8. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/regulatory/VariantMotifPlot.R +1 -1
  9. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/regulatory/motifs-common.R +3 -2
  10. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/scrna/CellCellCommunication.py +4 -0
  11. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/scrna/CellCellCommunicationPlots.R +23 -4
  12. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/scrna/CellTypeAnnotation-direct.R +33 -11
  13. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/scrna/MarkersFinder.R +37 -19
  14. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/scrna/ModuleScoreCalculator.R +9 -1
  15. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/scrna/PseudoBulkDEG.R +39 -21
  16. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/scrna/ScFGSEA.R +18 -22
  17. {biopipen-0.34.7 → biopipen-0.34.9}/pyproject.toml +1 -1
  18. {biopipen-0.34.7 → biopipen-0.34.9}/setup.py +1 -1
  19. biopipen-0.34.7/biopipen/__init__.py +0 -1
  20. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/core/__init__.py +0 -0
  21. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/core/config.py +0 -0
  22. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/core/config.toml +0 -0
  23. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/core/defaults.py +0 -0
  24. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/core/filters.py +0 -0
  25. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/core/proc.py +0 -0
  26. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/core/testing.py +0 -0
  27. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/ns/__init__.py +0 -0
  28. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/ns/bam.py +0 -0
  29. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/ns/bed.py +0 -0
  30. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/ns/cellranger.py +0 -0
  31. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/ns/cellranger_pipeline.py +0 -0
  32. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/ns/cnv.py +0 -0
  33. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/ns/cnvkit.py +0 -0
  34. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/ns/cnvkit_pipeline.py +0 -0
  35. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/ns/delim.py +0 -0
  36. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/ns/gene.py +0 -0
  37. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/ns/gsea.py +0 -0
  38. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/ns/misc.py +0 -0
  39. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/ns/plot.py +0 -0
  40. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/ns/protein.py +0 -0
  41. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/ns/rnaseq.py +0 -0
  42. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/ns/scrna_metabolic_landscape.py +0 -0
  43. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/ns/snp.py +0 -0
  44. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/ns/stats.py +0 -0
  45. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/ns/tcgamaf.py +0 -0
  46. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/ns/tcr.py +0 -0
  47. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/ns/vcf.py +0 -0
  48. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/ns/web.py +0 -0
  49. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/reports/bam/CNAClinic.svelte +0 -0
  50. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/reports/bam/CNVpytor.svelte +0 -0
  51. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/reports/bam/ControlFREEC.svelte +0 -0
  52. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/reports/cellranger/CellRangerCount.svelte +0 -0
  53. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/reports/cellranger/CellRangerSummary.svelte +0 -0
  54. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/reports/cellranger/CellRangerVdj.svelte +0 -0
  55. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/reports/cnv/AneuploidyScore.svelte +0 -0
  56. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/reports/cnv/AneuploidyScoreSummary.svelte +0 -0
  57. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/reports/cnv/TMADScoreSummary.svelte +0 -0
  58. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/reports/cnvkit/CNVkitDiagram.svelte +0 -0
  59. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/reports/cnvkit/CNVkitHeatmap.svelte +0 -0
  60. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/reports/cnvkit/CNVkitScatter.svelte +0 -0
  61. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/reports/common.svelte +0 -0
  62. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/reports/gsea/FGSEA.svelte +0 -0
  63. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/reports/gsea/GSEA.svelte +0 -0
  64. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/reports/protein/ProdigySummary.svelte +0 -0
  65. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/reports/scrna/CellsDistribution.svelte +0 -0
  66. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/reports/scrna/DimPlots.svelte +0 -0
  67. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/reports/scrna/MarkersFinder.svelte +0 -0
  68. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/reports/scrna/MetaMarkers.svelte +0 -0
  69. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/reports/scrna/RadarPlots.svelte +0 -0
  70. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/reports/scrna_metabolic_landscape/MetabolicFeatures.svelte +0 -0
  71. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/reports/scrna_metabolic_landscape/MetabolicPathwayActivity.svelte +0 -0
  72. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/reports/scrna_metabolic_landscape/MetabolicPathwayHeterogeneity.svelte +0 -0
  73. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/reports/snp/PlinkCallRate.svelte +0 -0
  74. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/reports/snp/PlinkFreq.svelte +0 -0
  75. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/reports/snp/PlinkHWE.svelte +0 -0
  76. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/reports/snp/PlinkHet.svelte +0 -0
  77. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/reports/snp/PlinkIBD.svelte +0 -0
  78. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/reports/tcr/CDR3AAPhyschem.svelte +0 -0
  79. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/reports/tcr/ClonalStats.svelte +0 -0
  80. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/reports/tcr/CloneResidency.svelte +0 -0
  81. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/reports/tcr/Immunarch.svelte +0 -0
  82. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/reports/tcr/SampleDiversity.svelte +0 -0
  83. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/reports/tcr/TCRClusterStats.svelte +0 -0
  84. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/reports/tcr/TESSA.svelte +0 -0
  85. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/reports/tcr/VJUsage.svelte +0 -0
  86. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/reports/utils/misc.liq +0 -0
  87. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/reports/vcf/TruvariBenchSummary.svelte +0 -0
  88. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/reports/vcf/TruvariConsistency.svelte +0 -0
  89. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/bam/BamMerge.py +0 -0
  90. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/bam/BamSampling.py +0 -0
  91. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/bam/BamSort.py +0 -0
  92. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/bam/BamSplitChroms.py +0 -0
  93. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/bam/BamSubsetByBed.py +0 -0
  94. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/bam/CNAClinic.R +0 -0
  95. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/bam/CNVpytor.py +0 -0
  96. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/bam/ControlFREEC.py +0 -0
  97. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/bam/SamtoolsView.py +0 -0
  98. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/bed/Bed2Vcf.py +0 -0
  99. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/bed/BedConsensus.py +0 -0
  100. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/bed/BedLiftOver.sh +0 -0
  101. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/bed/BedtoolsIntersect.py +0 -0
  102. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/bed/BedtoolsMakeWindows.py +0 -0
  103. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/bed/BedtoolsMerge.py +0 -0
  104. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/cellranger/CellRangerCount.py +0 -0
  105. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/cellranger/CellRangerSummary.R +0 -0
  106. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/cellranger/CellRangerVdj.py +0 -0
  107. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/cnv/AneuploidyScore.R +0 -0
  108. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/cnv/AneuploidyScoreSummary.R +0 -0
  109. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/cnv/TMADScore.R +0 -0
  110. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/cnv/TMADScoreSummary.R +0 -0
  111. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/cnvkit/CNVkitAccess.py +0 -0
  112. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/cnvkit/CNVkitAutobin.py +0 -0
  113. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/cnvkit/CNVkitBatch.py +0 -0
  114. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/cnvkit/CNVkitCall.py +0 -0
  115. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/cnvkit/CNVkitCoverage.py +0 -0
  116. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/cnvkit/CNVkitDiagram.py +0 -0
  117. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/cnvkit/CNVkitFix.py +0 -0
  118. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/cnvkit/CNVkitGuessBaits.py +0 -0
  119. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/cnvkit/CNVkitHeatmap.py +0 -0
  120. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/cnvkit/CNVkitReference.py +0 -0
  121. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/cnvkit/CNVkitScatter.py +0 -0
  122. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/cnvkit/CNVkitSegment.py +0 -0
  123. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/cnvkit/guess_baits.py +0 -0
  124. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/delim/RowsBinder.R +0 -0
  125. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/delim/SampleInfo.R +0 -0
  126. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/gene/GeneNameConversion.R +0 -0
  127. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/gene/GenePromoters.R +0 -0
  128. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/gsea/Enrichr.R +0 -0
  129. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/gsea/FGSEA.R +0 -0
  130. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/gsea/GSEA.R +0 -0
  131. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/gsea/PreRank.R +0 -0
  132. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/misc/Config2File.py +0 -0
  133. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/misc/Plot.R +0 -0
  134. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/misc/Shell.sh +0 -0
  135. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/misc/Str2File.py +0 -0
  136. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/plot/Heatmap.R +0 -0
  137. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/plot/Manhattan.R +0 -0
  138. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/plot/QQPlot.R +0 -0
  139. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/plot/ROC.R +0 -0
  140. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/plot/Scatter.R +0 -0
  141. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/plot/VennDiagram.R +0 -0
  142. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/protein/MMCIF2PDB.py +0 -0
  143. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/protein/PDB2Fasta.py +0 -0
  144. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/protein/Prodigy.py +0 -0
  145. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/protein/ProdigySummary.R +0 -0
  146. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/protein/RMSD.py +0 -0
  147. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/regulatory/MotifScan.py +0 -0
  148. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/rnaseq/Simulation-ESCO.R +0 -0
  149. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/rnaseq/Simulation-RUVcorr.R +0 -0
  150. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/rnaseq/Simulation.R +0 -0
  151. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/rnaseq/UnitConversion.R +0 -0
  152. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/scrna/AnnData2Seurat.R +0 -0
  153. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/scrna/CCPlotR-patch.R +0 -0
  154. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/scrna/CellTypeAnnotation-celltypist.R +0 -0
  155. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/scrna/CellTypeAnnotation-hitype.R +0 -0
  156. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/scrna/CellTypeAnnotation-sccatch.R +0 -0
  157. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/scrna/CellTypeAnnotation-sctype.R +0 -0
  158. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/scrna/CellTypeAnnotation.R +0 -0
  159. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/scrna/CellsDistribution.R +0 -0
  160. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/scrna/DimPlots.R +0 -0
  161. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/scrna/ExprImputation-alra.R +0 -0
  162. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/scrna/ExprImputation-rmagic.R +0 -0
  163. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/scrna/ExprImputation-scimpute.R +0 -0
  164. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/scrna/ExprImputation.R +0 -0
  165. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/scrna/LoomTo10X.R +0 -0
  166. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/scrna/MetaMarkers.R +0 -0
  167. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/scrna/RadarPlots.R +0 -0
  168. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/scrna/SCImpute.R +0 -0
  169. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/scrna/ScSimulation.R +0 -0
  170. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/scrna/ScVelo.py +0 -0
  171. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/scrna/Seurat2AnnData.R +0 -0
  172. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/scrna/SeuratClusterStats-clustree.R +0 -0
  173. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/scrna/SeuratClusterStats-dimplots.R +0 -0
  174. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/scrna/SeuratClusterStats-features.R +0 -0
  175. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/scrna/SeuratClusterStats-ngenes.R +0 -0
  176. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/scrna/SeuratClusterStats-stats.R +0 -0
  177. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/scrna/SeuratClusterStats.R +0 -0
  178. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/scrna/SeuratClustering.R +0 -0
  179. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/scrna/SeuratFilter.R +0 -0
  180. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/scrna/SeuratLoading.R +0 -0
  181. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/scrna/SeuratMap2Ref.R +0 -0
  182. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/scrna/SeuratMetadataMutater.R +0 -0
  183. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/scrna/SeuratPreparing.R +0 -0
  184. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/scrna/SeuratSplit.R +0 -0
  185. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/scrna/SeuratSubClustering.R +0 -0
  186. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/scrna/SeuratSubset.R +0 -0
  187. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/scrna/SeuratTo10X.R +0 -0
  188. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/scrna/Slingshot.R +0 -0
  189. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/scrna/Subset10X.R +0 -0
  190. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/scrna/TopExpressingGenes.R +0 -0
  191. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/scrna/celltypist-wrapper.py +0 -0
  192. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/scrna/sctype.R +0 -0
  193. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/scrna/seurat_anndata_conversion.py +0 -0
  194. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/scrna_metabolic_landscape/MetabolicFeatures.R +0 -0
  195. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/scrna_metabolic_landscape/MetabolicPathwayActivity.R +0 -0
  196. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/scrna_metabolic_landscape/MetabolicPathwayHeterogeneity.R +0 -0
  197. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/snp/MatrixEQTL.R +0 -0
  198. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/snp/Plink2GTMat.py +0 -0
  199. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/snp/PlinkCallRate.R +0 -0
  200. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/snp/PlinkFilter.py +0 -0
  201. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/snp/PlinkFreq.R +0 -0
  202. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/snp/PlinkFromVcf.py +0 -0
  203. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/snp/PlinkHWE.R +0 -0
  204. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/snp/PlinkHet.R +0 -0
  205. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/snp/PlinkIBD.R +0 -0
  206. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/snp/PlinkSimulation.py +0 -0
  207. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/snp/PlinkUpdateName.py +0 -0
  208. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/stats/ChowTest.R +0 -0
  209. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/stats/DiffCoexpr.R +0 -0
  210. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/stats/LiquidAssoc.R +0 -0
  211. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/stats/Mediation.R +0 -0
  212. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/stats/MetaPvalue.R +0 -0
  213. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/stats/MetaPvalue1.R +0 -0
  214. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/tcgamaf/Maf2Vcf.py +0 -0
  215. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/tcgamaf/MafAddChr.py +0 -0
  216. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/tcgamaf/maf2vcf.pl +0 -0
  217. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/tcr/Attach2Seurat.R +0 -0
  218. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/tcr/CDR3AAPhyschem.R +0 -0
  219. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/tcr/ClonalStats.R +0 -0
  220. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/tcr/CloneResidency.R +0 -0
  221. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/tcr/CloneSizeQQPlot.R +0 -0
  222. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/tcr/GIANA/GIANA.py +0 -0
  223. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/tcr/GIANA/GIANA4.py +0 -0
  224. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/tcr/GIANA/Imgt_Human_TRBV.fasta +0 -0
  225. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/tcr/GIANA/query.py +0 -0
  226. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/tcr/Immunarch-basic.R +0 -0
  227. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/tcr/Immunarch-clonality.R +0 -0
  228. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/tcr/Immunarch-diversity.R +0 -0
  229. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/tcr/Immunarch-geneusage.R +0 -0
  230. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/tcr/Immunarch-kmer.R +0 -0
  231. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/tcr/Immunarch-overlap.R +0 -0
  232. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/tcr/Immunarch-spectratyping.R +0 -0
  233. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/tcr/Immunarch-tracking.R +0 -0
  234. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/tcr/Immunarch-vjjunc.R +0 -0
  235. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/tcr/Immunarch.R +0 -0
  236. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/tcr/Immunarch2VDJtools.R +0 -0
  237. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/tcr/ImmunarchFilter.R +0 -0
  238. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/tcr/ImmunarchLoading.R +0 -0
  239. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/tcr/ImmunarchSplitIdents.R +0 -0
  240. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/tcr/SampleDiversity.R +0 -0
  241. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/tcr/ScRepCombiningExpression.R +0 -0
  242. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/tcr/ScRepLoading.R +0 -0
  243. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/tcr/TCRClusterStats.R +0 -0
  244. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/tcr/TCRClustering.R +0 -0
  245. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/tcr/TCRDock.py +0 -0
  246. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/tcr/TESSA.R +0 -0
  247. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/tcr/TESSA_source/Atchley_factors.csv +0 -0
  248. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/tcr/TESSA_source/BriseisEncoder.py +0 -0
  249. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/tcr/TESSA_source/MCMC_control.R +0 -0
  250. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/tcr/TESSA_source/TrainedEncoder.h5 +0 -0
  251. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/tcr/TESSA_source/fixed_b.csv +0 -0
  252. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/tcr/TESSA_source/initialization.R +0 -0
  253. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/tcr/TESSA_source/post_analysis.R +0 -0
  254. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/tcr/TESSA_source/real_data.R +0 -0
  255. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/tcr/TESSA_source/update.R +0 -0
  256. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/tcr/TESSA_source/utility.R +0 -0
  257. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/tcr/VJUsage.R +0 -0
  258. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/tcr/immunarch-patched.R +0 -0
  259. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/tcr/vdjtools-patch.sh +0 -0
  260. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/vcf/BcftoolsAnnotate.py +0 -0
  261. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/vcf/BcftoolsFilter.py +0 -0
  262. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/vcf/BcftoolsMerge.py +0 -0
  263. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/vcf/BcftoolsSort.py +0 -0
  264. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/vcf/BcftoolsView.py +0 -0
  265. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/vcf/TruvariBench.sh +0 -0
  266. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/vcf/TruvariBenchSummary.R +0 -0
  267. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/vcf/TruvariConsistency.R +0 -0
  268. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/vcf/Vcf2Bed.py +0 -0
  269. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/vcf/VcfAnno.py +0 -0
  270. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/vcf/VcfDownSample.sh +0 -0
  271. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/vcf/VcfFilter.py +0 -0
  272. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/vcf/VcfFix.py +0 -0
  273. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/vcf/VcfFix_utils.py +0 -0
  274. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/vcf/VcfIndex.py +0 -0
  275. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/vcf/VcfIntersect.py +0 -0
  276. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/vcf/VcfLiftOver.sh +0 -0
  277. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/vcf/VcfSplitSamples.py +0 -0
  278. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/vcf/bcftools_utils.py +0 -0
  279. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/web/Download.py +0 -0
  280. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/web/DownloadList.py +0 -0
  281. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/web/GCloudStorageDownloadBucket.py +0 -0
  282. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/web/GCloudStorageDownloadFile.py +0 -0
  283. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/scripts/web/gcloud_common.py +0 -0
  284. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/utils/__init__.py +0 -0
  285. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/utils/common_docstrs.py +0 -0
  286. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/utils/gene.py +0 -0
  287. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/utils/misc.py +0 -0
  288. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/utils/reference.py +0 -0
  289. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/utils/reporter.py +0 -0
  290. {biopipen-0.34.7 → biopipen-0.34.9}/biopipen/utils/vcf.py +0 -0
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.3
1
+ Metadata-Version: 2.4
2
2
  Name: biopipen
3
- Version: 0.34.7
3
+ Version: 0.34.9
4
4
  Summary: Bioinformatics processes/pipelines that can be run from `pipen run`
5
5
  License: MIT
6
6
  Author: pwwang
@@ -13,6 +13,7 @@ Classifier: Programming Language :: Python :: 3.10
13
13
  Classifier: Programming Language :: Python :: 3.11
14
14
  Classifier: Programming Language :: Python :: 3.12
15
15
  Classifier: Programming Language :: Python :: 3.13
16
+ Classifier: Programming Language :: Python :: 3.14
16
17
  Provides-Extra: runinfo
17
18
  Requires-Dist: datar[pandas] (>=0.15.8,<0.16.0)
18
19
  Requires-Dist: pipen-board[report] (>=0.17,<0.18)
@@ -0,0 +1 @@
1
+ __version__ = "0.34.9"
@@ -132,6 +132,9 @@ class MotifAffinityTest(Proc):
132
132
  If no `regulator_col` is provided, no regulator information is written in
133
133
  the output. Otherwise, the regulator information is written in the output in
134
134
  the `Regulator` column.
135
+ var_col: The column names in the `in.motiffile` containing the variant information.
136
+ It has to be matching the names in the `in.varfile`. This is helpful when
137
+ we only need to test the pairs of variants and motifs in the `in.motiffile`.
135
138
  notfound (choice): What to do if a motif is not found in the database,
136
139
  or a regulator is not found in the regulator-motif mapping (envs.regmotifs)
137
140
  file.
@@ -200,6 +203,7 @@ class MotifAffinityTest(Proc):
200
203
  "bcftools": config.exe.bcftools,
201
204
  "motif_col": None,
202
205
  "regulator_col": None,
206
+ "var_col": None,
203
207
  "notfound": "error",
204
208
  "motifdb": config.ref.tf_motifdb,
205
209
  "regmotifs": config.ref.tf_motifs,
@@ -787,6 +787,11 @@ class ModuleScoreCalculator(Proc):
787
787
  `reduction = "DC"` in `env.dimplots` in `SeuratClusterStats`.
788
788
  This requires [`SingleCellExperiment`](https://bioconductor.org/packages/release/bioc/html/SingleCellExperiment.html)
789
789
  and [`destiny`](https://bioconductor.org/packages/release/bioc/html/destiny.html) R packages.
790
+ post_mutaters (type=json): The mutaters to mutate the metadata after
791
+ calculating the module scores.
792
+ The mutaters will be applied in the order specified.
793
+ This is useful when you want to create new scores based on the
794
+ calculated module scores.
790
795
  """ # noqa: E501
791
796
 
792
797
  input = "srtobj:file"
@@ -810,6 +815,7 @@ class ModuleScoreCalculator(Proc):
810
815
  # "Activation": {"features": "IFNG"},
811
816
  # "Proliferation": {"features": "STMN1,TUBB"},
812
817
  },
818
+ "post_mutaters": {},
813
819
  }
814
820
  script = "file://../scripts/scrna/ModuleScoreCalculator.R"
815
821
 
@@ -1131,7 +1137,7 @@ class MarkersFinder(Proc):
1131
1137
  - res (type=int): The resolution of the plots.
1132
1138
  - height (type=int): The height of the plots.
1133
1139
  - width (type=int): The width of the plots.
1134
- - <more>: See <https://pwwang.github.io/scplotter/reference/EnrichmentPlot.htmll>.
1140
+ - <more>: See <https://pwwang.github.io/scplotter/reference/EnrichmentPlot.html>.
1135
1141
  enrich_plots (type=json): Cases of the plots to generate for the enrichment analysis.
1136
1142
  The keys are the names of the cases and the values are the dicts inherited from `enrich_plots_defaults`.
1137
1143
  The cases under `envs.cases` can inherit this options.
@@ -1781,6 +1787,11 @@ class CellTypeAnnotation(Proc):
1781
1787
  the original cell types will be kept and nothing will be changed.
1782
1788
  ///
1783
1789
 
1790
+ more_cell_types (type=json): The additional cell type annotations to add to the metadata.
1791
+ The keys are the new column names and the values are the cell types lists.
1792
+ The cell type lists work the same as `cell_types` above.
1793
+ This is useful when you want to keep multiple annotations of cell types.
1794
+
1784
1795
  sccatch_args (ns): The arguments for `scCATCH::findmarkergene()` if `tool` is `sccatch`.
1785
1796
  - species: The specie of cells.
1786
1797
  - cancer: If the sample is from cancer tissue, then the cancer type may be defined.
@@ -1842,6 +1853,7 @@ class CellTypeAnnotation(Proc):
1842
1853
  "sctype_tissue": None,
1843
1854
  "sctype_db": config.ref.sctype_db,
1844
1855
  "cell_types": [],
1856
+ "more_cell_types": None,
1845
1857
  "sccatch_args": {
1846
1858
  "species": None,
1847
1859
  "cancer": "Normal",
@@ -2524,6 +2536,10 @@ class CellCellCommunicationPlots(Proc):
2524
2536
  cases (type=json): The cases for the plots.
2525
2537
  The keys are the names of the cases and the values are the arguments for
2526
2538
  the plots. The arguments include the ones inherited from `envs`.
2539
+ You can have a special `plot_type` `"table"` to generate a table for the
2540
+ ccc data to save as a text file and show in the report.
2541
+ If no cases are given, a default case will be used, with the
2542
+ key `Cell-Cell Communication`.
2527
2543
  <more>: Other arguments passed to
2528
2544
  [scplotter::CCCPlot](https://pwwang.github.io/scplotter/reference/CCCPlot.html)
2529
2545
  """ # noqa: E501
@@ -2706,6 +2722,7 @@ class PseudoBulkDEG(Proc):
2706
2722
  analysis.
2707
2723
 
2708
2724
  Envs:
2725
+ ncores (type=int): Number of cores to use for parallelization.
2709
2726
  mutaters (type=json): Mutaters to mutate the metadata of the
2710
2727
  seurat object. Keys are the new column names and values are the
2711
2728
  expressions to mutate the columns. These new columns can be
@@ -2715,6 +2732,9 @@ class PseudoBulkDEG(Proc):
2715
2732
  each: The column name in metadata to separate the cells into different cases.
2716
2733
  When specified, the case will be expanded to multiple cases for
2717
2734
  each value in the column.
2735
+ cache (type=auto): Where to cache the results.
2736
+ If `True`, cache to `outdir` of the job. If `False`, don't cache.
2737
+ Otherwise, specify the directory to cache to.
2718
2738
  subset: An expression in string to subset the cells.
2719
2739
  aggregate_by: The column names in metadata to aggregate the cells.
2720
2740
  layer: The layer to pull and aggregate the data.
@@ -2844,7 +2864,9 @@ class PseudoBulkDEG(Proc):
2844
2864
  lang = config.lang.rscript
2845
2865
  script = "file://../scripts/scrna/PseudoBulkDEG.R"
2846
2866
  envs = {
2867
+ "ncores": config.misc.ncores,
2847
2868
  "mutaters": {},
2869
+ "cache": config.path.tmpdir,
2848
2870
  "each": None,
2849
2871
  "subset": None,
2850
2872
  "aggregate_by": None,
@@ -14,6 +14,7 @@ bcftools <- {{envs.bcftools | r}}
14
14
  genome <- {{envs.genome | r}}
15
15
  motif_col <- {{envs.motif_col | r}}
16
16
  regulator_col <- {{envs.regulator_col | r}}
17
+ var_col <- {{envs.var_col | r}}
17
18
  notfound <- {{envs.notfound | r}}
18
19
  motifdb <- {{envs.motifdb | r}}
19
20
  regmotifs <- {{envs.regmotifs | r}}
@@ -21,6 +22,7 @@ devpars <- {{envs.devpars | r}}
21
22
  plot_nvars <- {{envs.plot_nvars | r}}
22
23
  plots <- {{envs.plots | r}}
23
24
  cutoff <- {{envs.cutoff | r}}
25
+ set.seed(8525)
24
26
 
25
27
  if (is.null(motifdb) || !file.exists(motifdb)) {
26
28
  stop("Motif database (envs.motifdb) is required and must exist")
@@ -47,10 +49,21 @@ log <- get_logger()
47
49
  log$info("Reading input regulator/motif file ...")
48
50
  in_motifs <- read.table(motiffile, header=TRUE, sep="\t", stringsAsFactors=FALSE, check.names = FALSE)
49
51
 
52
+
50
53
  log$info("Ensuring motifs and regulators in the input data ...")
51
- in_motifs <- ensure_regulator_motifs(in_motifs, outdir, motif_col, regulator_col, regmotifs, notfound = notfound)
54
+ in_motifs <- ensure_regulator_motifs(in_motifs, outdir, motif_col, regulator_col, var_col, regmotifs, notfound = notfound)
52
55
  genome_pkg <- get_genome_pkg(genome)
53
56
 
57
+ motif_var_pairs <- NULL
58
+ if (!is.null(var_col)) {
59
+ log$info("Obtaining motif-variant pairs to test ...")
60
+ if (!var_col %in% colnames(in_motifs)) {
61
+ stop("Variant column (envs.var_col) not found in the input motif file")
62
+ }
63
+
64
+ motif_var_pairs <- unique(paste0(in_motifs[[motif_col]], " // ", in_motifs[[var_col]]))
65
+ }
66
+
54
67
  log$info("Reading variant file ...")
55
68
  if (grepl("\\.vcf$", varfile) || grepl("\\.vcf\\.gz$", varfile)) {
56
69
  log$info("Converting VCF file to BED file ...")
@@ -77,10 +90,13 @@ mdb <- read_meme_to_motifdb(motifdb, in_motifs, motif_col, regulator_col, notfou
77
90
  tool <- tolower(tool)
78
91
  tool <- match.arg(tool, c("motifbreakr", "atsnp"))
79
92
 
80
- if (tool == "motifbreakr") {
93
+ {% if envs.tool == "motifbreakr" %}
81
94
  motifbreakr_args <- {{envs.motifbreakr_args | r}}
82
95
  {% include biopipen_dir + "/scripts/regulatory/MotifAffinityTest_MotifBreakR.R" %}
83
- } else { # atsnp
84
- atsnp_args <- {{envs.atsnp_args | r}}
96
+ {% else %}
97
+ atsnp_args <- list_update(
98
+ list(padj_cutoff = TRUE, padj = "BH", p = "Pval_diff"),
99
+ {{envs.atsnp_args | r}}
100
+ )
85
101
  {% include biopipen_dir + "/scripts/regulatory/MotifAffinityTest_AtSNP.R" %}
86
- }
102
+ {% endif %}
@@ -46,6 +46,13 @@ atsnp_result <- ComputePValues(
46
46
  testing.mc = TRUE
47
47
  )
48
48
 
49
+ if (!is.null(motif_var_pairs)) {
50
+ log$info("Filtering motif-variant pairs ...")
51
+ atsnp_result$motifs_vars <- paste0(atsnp_result$motif, " // ", atsnp_result$snpid)
52
+ atsnp_result <- atsnp_result[atsnp_result$motifs_vars %in% motif_var_pairs, , drop = FALSE]
53
+ atsnp_result$motifs_vars <- NULL
54
+ }
55
+
49
56
  padj_col <- paste0(atsnp_args$p, "_adj")
50
57
  atsnp_result[[padj_col]] <- p.adjust(atsnp_result[[atsnp_args$p]], method = atsnp_args$padj)
51
58
  cutoff_col <- if (atsnp_args$padj_cutoff) padj_col else atsnp_args$p
@@ -87,7 +94,8 @@ write.table(
87
94
 
88
95
  log$info("Plotting variants ...")
89
96
  # Convert result to GRanges object
90
- atsnp_result$alleleDiff <- -atsnp_result[[cutoff_col]]
97
+ atsnp_result$alleleDiff <- -log10(atsnp_result[[cutoff_col]])
98
+ atsnp_result <- atsnp_result[order(-atsnp_result$alleleDiff), , drop = FALSE]
91
99
  atsnp_result$effect <- "strong"
92
100
  atsnp_result$motifPos <- lapply(atsnp_result$motifPos, function(x) as.integer(unlist(strsplit(x, ","))))
93
101
  atsnp_result <- makeGRangesFromDataFrame(atsnp_result, keep.extra.columns = TRUE, starts.in.df.are.0based = TRUE)
@@ -96,7 +104,6 @@ attributes(atsnp_result)$genome.package <- genome_pkg
96
104
  attributes(atsnp_result)$motifs <- mdb
97
105
 
98
106
  if (is.null(plots) || length(plots) == 0) {
99
- atsnp_result <- atsnp_result[order(-abs(atsnp_result$alleleDiff)), , drop = FALSE]
100
107
  atsnp_result <- atsnp_result[1:min(plot_nvars, length(atsnp_result)), , drop = FALSE]
101
108
  variants <- unique(atsnp_result$SNP_id)
102
109
  } else {
@@ -50,6 +50,7 @@ results <- motifbreakR(
50
50
 
51
51
  log$info("Calculating p values ...")
52
52
  results <- calculatePvalue(results)
53
+ results$.id <- 1:length(results)
53
54
  results_to_save <- as.data.frame(unname(results))
54
55
  results_to_save$motifPos <- lapply(results_to_save$motifPos, function(x) paste(x, collapse = ","))
55
56
  results_to_save$altPos <- lapply(results_to_save$altPos, function(x) paste(x, collapse = ","))
@@ -60,20 +61,28 @@ if (!is.null(regulator_col)) {
60
61
  drop = TRUE
61
62
  ]
62
63
  }
63
- results_to_save <- apply(results_to_save, 2, as.character)
64
+ results_to_save <- as.data.frame(apply(results_to_save, 2, as.character))
65
+
66
+ if (!is.null(motif_var_pairs)) {
67
+ log$info("Filtering motif-variant pairs ...")
68
+ results_to_save$motifs_vars <- paste0(results_to_save$providerId, " // ", results_to_save$SNP_id)
69
+ results_to_save <- results_to_save[results_to_save$motifs_vars %in% motif_var_pairs, , drop = FALSE]
70
+ results_to_save$motifs_vars <- NULL
71
+ }
64
72
 
65
73
  write.table(
66
74
  results_to_save,
67
75
  file = file.path(outdir, "motifbreakr.txt"),
68
76
  sep = "\t", quote = FALSE, row.names = FALSE
69
77
  )
70
- rm(results_to_save)
78
+ # rm(results_to_save)
71
79
 
72
80
  log$info("Plotting variants ...")
73
81
  if (is.null(plots) || length(plots) == 0) {
74
- results <- results[order(-abs(results$alleleDiff)), , drop = FALSE]
75
- results <- results[1:min(plot_nvars, length(results)), , drop = FALSE]
76
- variants <- unique(results$SNP_id)
82
+ results_to_save$alleleDiff <- as.numeric(results_to_save$alleleDiff)
83
+ results_to_save <- results_to_save[order(-abs(results_to_save$alleleDiff)), , drop = FALSE]
84
+ results_to_save <- results_to_save[1:min(plot_nvars, nrow(results_to_save)), , drop = FALSE]
85
+ variants <- unique(results_to_save$SNP_id)
77
86
  } else {
78
87
  variants <- names(plots)
79
88
  }
@@ -88,7 +97,7 @@ for (variant in variants) {
88
97
  if (is.null(plots[[variant]]$devpars)) {
89
98
  plots[[variant]]$devpars <- devpars
90
99
  }
91
- res <- results[results$SNP_id == variant, , drop = FALSE]
100
+ res <- results[results$SNP_id == variant & results$.id %in% results_to_save$.id, , drop = FALSE]
92
101
  res <- subset(res, subset = eval(parse(text = plots[[variant]]$which)))
93
102
 
94
103
  plot_variant_motifs(res, variant, plots[[variant]]$devpars, outdir)
@@ -33,7 +33,7 @@ log$info("Reading input data ...")
33
33
  indata <- read.table(infile, header=TRUE, sep="\t", stringsAsFactors=FALSE, check.names = FALSE)
34
34
 
35
35
  log$info("Ensuring regulators in the input data ...")
36
- indata <- ensure_regulator_motifs(indata, outdir, motif_col, regulator_col, regmotifs, notfound = notfound)
36
+ indata <- ensure_regulator_motifs(indata, outdir, motif_col, regulator_col, "SNP_id", regmotifs, notfound = notfound)
37
37
  genome_pkg <- get_genome_pkg(genome)
38
38
 
39
39
  log$info("Reading motif database ...")
@@ -138,12 +138,13 @@ motifdb_to_motiflib <- function(motifdb) {
138
138
  #' @param outdir Output directory, used to save un-matched regulators
139
139
  #' @param motif_col Column name for the motif
140
140
  #' @param regulator_col Column name for the regulator
141
+ #' @param var_col Column name for the variant
141
142
  #' @param regmotifs Regulator-motif mapping file
142
143
  #' @param log_indent Indentation for log messages
143
144
  #' @param notfound Action to take if regulators are not found in the mapping file
144
145
  #' @return Data frame with regulators and motifs
145
146
  #' @export
146
- ensure_regulator_motifs <- function (indata, outdir, motif_col, regulator_col, regmotifs, log_indent = "", notfound = "error", log = NULL) {
147
+ ensure_regulator_motifs <- function (indata, outdir, motif_col, regulator_col, var_col, regmotifs, log_indent = "", notfound = "error", log = NULL) {
147
148
  if (is.null(motif_col)) {
148
149
  if (is.null(regmotifs)) {
149
150
  stop("Regulator-motif mapping file (envs.regmotifs) is required when no motif column (envs.motif_col) is provided")
@@ -198,7 +199,7 @@ ensure_regulator_motifs <- function (indata, outdir, motif_col, regulator_col, r
198
199
  regulator_col <<- rm_reg_col
199
200
  }
200
201
  } else {
201
- indata <- indata[!duplicated(indata[, c(regulator_col, motif_col), drop = FALSE]), , drop = FALSE]
202
+ indata <- indata[!duplicated(indata[, c(regulator_col, motif_col, var_col), drop = FALSE]), , drop = FALSE]
202
203
  }
203
204
 
204
205
  return(indata)
@@ -7,6 +7,10 @@ import scanpy
7
7
  import liana
8
8
  import liana.method.sc._liana_pipe as _liana_pipe
9
9
 
10
+ # AttributeError: module 'numpy' has no attribute 'product'
11
+ if not hasattr(np, "product"):
12
+ np.product = np.prod
13
+
10
14
  # monkey-patch liana.method.sc._liana_pipe._trimean due to the updates by scipy 1.14
11
15
  # https://github.com/scipy/scipy/commit/a660202652deead0f3b4b688eb9fdcdf9f74066c
12
16
  def _trimean(a, axis=0):
@@ -27,7 +27,7 @@ defaults <- list(
27
27
  devpars = list(res = 100)
28
28
  )
29
29
 
30
- cases <- expand_cases(cases, defaults)
30
+ cases <- expand_cases(cases, defaults, default_case = "Cell-Cell Communication")
31
31
  log <- get_logger()
32
32
  reporter <- get_reporter()
33
33
 
@@ -35,12 +35,31 @@ do_case <- function(name) {
35
35
  log$info("- Case: {name}")
36
36
  case <- cases[[name]]
37
37
  info <- case_info(name, outdir, is_dir = FALSE)
38
- case <- extract_vars(case, "subset", "devpars", "more_formats", "descr")
38
+ case <- extract_vars(case, subset_ = "subset", "devpars", "more_formats", "descr")
39
39
 
40
40
  case$data <- ccc
41
- if (!is.null(case$subset)) {
42
- case$data <- ccc %>% dplyr::filter(!!parse_expr(case$subset))
41
+ if (!is.null(subset_)) {
42
+ case$data <- ccc %>% dplyr::filter(!!parse_expr(subset_))
43
43
  }
44
+
45
+ if (identical(case$plot_type, "table")) {
46
+ write.table(
47
+ case$data,
48
+ file = paste0(info$prefix, ".txt"),
49
+ sep = "\t",
50
+ row.names = FALSE,
51
+ col.names = TRUE,
52
+ quote = FALSE
53
+ )
54
+ report <- list(
55
+ kind = "table",
56
+ data = list(nrows = 100),
57
+ src = paste0(info$prefix, ".txt")
58
+ )
59
+ reporter$add2(report, hs = c(info$section, info$name))
60
+ return()
61
+ }
62
+
44
63
  if (is.null(case$magnitude)) {
45
64
  case$magnitude <- NULL
46
65
  }
@@ -5,11 +5,15 @@ outfile <- {{out.outfile | r}}
5
5
  celltypes <- {{envs.cell_types | r}}
6
6
  newcol <- {{envs.newcol | r}}
7
7
  merge_same_labels <- {{envs.merge | r}}
8
+ more_cell_types <- {{envs.more_cell_types | r}}
8
9
 
9
10
  log <- biopipen.utils::get_logger()
10
11
 
11
12
  if (is.null(celltypes) || length(celltypes) == 0) {
12
13
  log$warn("No cell types are given!")
14
+ if (!is.null(more_cell_types) && length(more_cell_types) > 0) {
15
+ log$warn("`envs.celltypes` is not given, won't process `envs.more_cell_types`!")
16
+ }
13
17
 
14
18
  if (merge_same_labels) {
15
19
  log$warn("Ignoring 'envs.merge' because no cell types are given!")
@@ -25,26 +29,43 @@ if (is.null(celltypes) || length(celltypes) == 0) {
25
29
  } else {
26
30
  idents <- as.character(unique(idents))
27
31
  }
28
-
29
- if (length(celltypes) < length(idents)) {
30
- celltypes <- c(celltypes, idents[(length(celltypes) + 1):length(idents)])
31
- } else if (length(celltypes) > length(idents)) {
32
- celltypes <- celltypes[1:length(idents)]
33
- log$warn("The length of cell types is longer than the number of clusters!")
32
+ process_celltypes <- function(ct, key = NULL) {
33
+ if (length(ct) < length(idents)) {
34
+ ct <- c(ct, idents[(length(ct) + 1):length(idents)])
35
+ } else if (length(ct) > length(idents)) {
36
+ ct <- ct[1:length(idents)]
37
+ if (is.null(key)) {
38
+ log$warn("The length of cell types is longer than the number of clusters!")
39
+ } else {
40
+ log$warn(paste0("The length of cell types for '", key, "' is longer than the number of clusters!"))
41
+ }
42
+ }
43
+ for (i in seq_along(ct)) {
44
+ if (ct[i] == "-" || ct[i] == "") {
45
+ ct[i] <- idents[i]
46
+ }
47
+ }
48
+ names(ct) <- idents
49
+ return(ct)
34
50
  }
35
- for (i in seq_along(celltypes)) {
36
- if (celltypes[i] == "-" || celltypes[i] == "") {
37
- celltypes[i] <- idents[i]
51
+
52
+ if (!is.null(more_cell_types) && length(more_cell_types) > 0) {
53
+ for (key in names(more_cell_types)) {
54
+ ct <- more_cell_types[[key]]
55
+ ct <- process_celltypes(ct, key)
56
+ log$info(paste0("Adding additional cell type annotation: '", key, "' ..."))
57
+ sobj@meta.data[[key]] <- ct[as.character(Idents(sobj))]
38
58
  }
39
59
  }
40
- names(celltypes) <- idents
60
+
61
+ celltypes <- process_celltypes(celltypes)
41
62
 
42
63
  log$info("Renaming cell types ...")
43
64
  if (is.null(newcol)) {
44
65
  has_na <- "NA" %in% unlist(celltypes) || anyNA(unlist(celltypes))
45
66
  sobj$seurat_clusters_id <- Idents(sobj)
46
67
  celltypes$object <- sobj
47
- sobj <- do_call(RenameIdents, celltypes)
68
+ sobj <- biopipen.utils::do_call(RenameIdents, celltypes)
48
69
  sobj$seurat_clusters <- Idents(sobj)
49
70
  if (has_na) {
50
71
  log$info("Filtering clusters if NA ...")
@@ -65,5 +86,6 @@ if (is.null(celltypes) || length(celltypes) == 0) {
65
86
  sobj <- merge_clusters_with_same_labels(sobj, newcol)
66
87
  }
67
88
 
89
+ log$info("Saving Seurat object ...")
68
90
  biopipen.utils::save_obj(sobj, outfile)
69
91
  }
@@ -268,20 +268,22 @@ process_markers <- function(markers, info, case) {
268
268
  ui = "tabs"
269
269
  )
270
270
 
271
- for (plotname in names(case$marker_plots)) {
272
- plotargs <- case$marker_plots[[plotname]]
273
- plotargs$degs <- markers
274
- rownames(plotargs$degs) <- make.unique(markers$gene)
275
- plotargs$outprefix <- file.path(info$prefix, paste0("markers.", slugify(plotname)))
276
- do_call(VizDEGs, plotargs)
277
- reporter$add2(
278
- list(
279
- name = plotname,
280
- contents = list(reporter$image(plotargs$outprefix, plotargs$more_formats, plotargs$save_code))),
281
- hs = c(info$section, info$name),
282
- hs2 = ifelse(is.null(case$ident), "Markers", paste0("Markers (", case$ident, ")")),
283
- ui = "tabs"
284
- )
271
+ if (nrow(markers) > 0) {
272
+ for (plotname in names(case$marker_plots)) {
273
+ plotargs <- case$marker_plots[[plotname]]
274
+ plotargs$degs <- markers
275
+ rownames(plotargs$degs) <- make.unique(markers$gene)
276
+ plotargs$outprefix <- file.path(info$prefix, paste0("markers.", slugify(plotname)))
277
+ do_call(VizDEGs, plotargs)
278
+ reporter$add2(
279
+ list(
280
+ name = plotname,
281
+ contents = list(reporter$image(plotargs$outprefix, plotargs$more_formats, plotargs$save_code))),
282
+ hs = c(info$section, info$name),
283
+ hs2 = ifelse(is.null(case$ident), "Markers", paste0("Markers (", case$ident, ")")),
284
+ ui = "tabs"
285
+ )
286
+ }
285
287
  }
286
288
 
287
289
  # Do enrichment analysis
@@ -351,16 +353,24 @@ process_markers <- function(markers, info, case) {
351
353
  for (db in case$dbs) {
352
354
  plots <- list()
353
355
  for (plotname in names(case$enrich_plots)) {
354
- plotargs <- case$enrich_plots[[plotname]]
356
+ plotargs <- extract_vars(case$enrich_plots[[plotname]], "descr", allow_nonexisting = TRUE)
355
357
  plotargs$data <- enrich[enrich$Database == db, , drop = FALSE]
356
358
 
357
359
  p <- do_call(VizEnrichment, plotargs)
358
360
 
359
361
  if (plotargs$plot_type == "bar") {
360
362
  attr(p, "height") <- attr(p, "height") / 1.5
363
+ descr <- descr %||% glue::glue(
364
+ "The bar plot shows the top enriched terms in database '{db}', ",
365
+ "the x-axis shows the -log10 of the adjusted p-values, ",
366
+ "and the y-axis shows the term names. The number next to each bar indicates the overlap gene count."
367
+ )
361
368
  }
362
369
  outprefix <- file.path(info$prefix, paste0("enrich.", slugify(db), ".", slugify(plotname)))
363
370
  save_plot(p, outprefix, plotargs$devpars, formats = "png")
371
+ if (!is.null(descr)) {
372
+ plots[[length(plots) + 1]] <- list(kind = "descr", content = glue::glue(descr))
373
+ }
364
374
  plots[[length(plots) + 1]] <- reporter$image(outprefix, c(), FALSE)
365
375
  }
366
376
  reporter$add2(
@@ -399,6 +409,10 @@ process_allmarkers <- function(markers, plotcases, casename, groupname) {
399
409
  plotargs <- plotcases[[plotname]]
400
410
  plotargs$degs <- markers
401
411
  plotargs$outprefix <- file.path(info$prefix, slugify(plotname))
412
+ if (identical(plotargs$plot_type, "heatmap")) {
413
+ plotargs$show_row_names = plotargs$show_row_names %||% TRUE
414
+ plotargs$show_column_names = plotargs$show_column_names %||% TRUE
415
+ }
402
416
  do_call(VizDEGs, plotargs)
403
417
  reporter$add2(
404
418
  list(
@@ -547,7 +561,9 @@ run_case <- function(name) {
547
561
  attr(markers, "group_by") <- each
548
562
  attr(markers, "ident_1") <- NULL
549
563
  attr(markers, "ident_2") <- NULL
550
- process_allmarkers(markers, allmarker_plots, name, each)
564
+ if (!is.null(markers) && nrow(markers) > 0) {
565
+ process_allmarkers(markers, allmarker_plots, name, each)
566
+ }
551
567
  }
552
568
 
553
569
  if (length(overlaps) > 0) {
@@ -557,7 +573,7 @@ run_case <- function(name) {
557
573
 
558
574
  }
559
575
 
560
- if (!is.null(enriches)) {
576
+ if (!is.null(enriches) && length(enriches) > 0) {
561
577
  log$info("- Summarizing enrichments in subcases (by each: {each}) ...")
562
578
  if (!is.data.frame(enriches)) {
563
579
  each_levels <- names(enriches)
@@ -573,7 +589,7 @@ run_case <- function(name) {
573
589
  enriches[[each]] <- factor(enriches[[each]], levels = each_levels)
574
590
  }
575
591
 
576
- if (length(allenrich_plots) > 0) {
592
+ if (length(allenrich_plots) > 0 && !is.null(enriches) && nrow(enriches) > 0) {
577
593
  log$info("- Visualizing all enrichments together ...")
578
594
  process_allenriches(enriches, allenrich_plots, name, each)
579
595
  }
@@ -636,7 +652,9 @@ run_case <- function(name) {
636
652
  ))
637
653
 
638
654
  if (!is.null(original_case) && !is.null(cases[[original_case]])) {
639
- markers[[each_name]] <- each
655
+ if (nrow(markers) > 0) {
656
+ markers[[each_name]] <- each
657
+ }
640
658
  cases[[original_case]]$markers[[each]] <<- markers
641
659
  cases[[original_case]]$enriches[[each]] <<- enrich
642
660
  }
@@ -1,11 +1,13 @@
1
- library(Seurat)
1
+ library(rlang)
2
2
  library(dplyr)
3
+ library(Seurat)
3
4
  library(biopipen.utils)
4
5
 
5
6
  sobjfile <- {{in.srtobj | r}}
6
7
  outfile <- {{out.rdsfile | r}}
7
8
  defaults <- {{envs.defaults | r}}
8
9
  modules <- {{envs.modules | r}}
10
+ post_mutaters <- {{envs.post_mutaters | r}}
9
11
 
10
12
  log <- get_logger()
11
13
 
@@ -134,6 +136,12 @@ for (key in names(modules)) {
134
136
  }
135
137
  }
136
138
 
139
+ if (!is.null(post_mutaters) && length(post_mutaters) > 0) {
140
+ log$info("Applying post mutaters ...")
141
+ sobj@meta.data <- sobj@meta.data %>%
142
+ mutate(!!!lapply(post_mutaters, parse_expr))
143
+ }
144
+
137
145
  # save seurat object
138
146
  log$info("Saving Seurat object ...")
139
147
  save_obj(sobj, outfile)