biopipen 0.29.0__tar.gz → 0.29.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 (276) hide show
  1. {biopipen-0.29.0 → biopipen-0.29.1}/PKG-INFO +1 -1
  2. biopipen-0.29.1/biopipen/__init__.py +1 -0
  3. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/ns/plot.py +66 -8
  4. biopipen-0.29.0/biopipen/ns/regulation.py → biopipen-0.29.1/biopipen/ns/regulatory.py +3 -3
  5. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/ns/scrna.py +16 -2
  6. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/ns/stats.py +93 -1
  7. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/delim/SampleInfo.R +10 -5
  8. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/plot/Manhattan.R +6 -0
  9. biopipen-0.29.1/biopipen/scripts/plot/QQPlot.R +146 -0
  10. {biopipen-0.29.0/biopipen/scripts/regulation → biopipen-0.29.1/biopipen/scripts/regulatory}/MotifAffinityTest.R +3 -3
  11. {biopipen-0.29.0/biopipen/scripts/regulation → biopipen-0.29.1/biopipen/scripts/regulatory}/MotifScan.py +1 -1
  12. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/scrna/MarkersFinder.R +28 -18
  13. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/scrna/SeuratClustering.R +8 -0
  14. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/scrna/SeuratPreparing.R +252 -122
  15. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/snp/MatrixEQTL.R +2 -2
  16. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/snp/PlinkIBD.R +3 -0
  17. biopipen-0.29.1/biopipen/scripts/stats/Mediation.R +94 -0
  18. {biopipen-0.29.0 → biopipen-0.29.1}/pyproject.toml +2 -2
  19. {biopipen-0.29.0 → biopipen-0.29.1}/setup.py +3 -3
  20. biopipen-0.29.0/biopipen/__init__.py +0 -1
  21. biopipen-0.29.0/biopipen/scripts/plot/QQPlot.R +0 -62
  22. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/core/__init__.py +0 -0
  23. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/core/config.py +0 -0
  24. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/core/config.toml +0 -0
  25. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/core/defaults.py +0 -0
  26. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/core/filters.py +0 -0
  27. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/core/proc.py +0 -0
  28. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/core/testing.py +0 -0
  29. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/ns/__init__.py +0 -0
  30. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/ns/bam.py +0 -0
  31. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/ns/bed.py +0 -0
  32. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/ns/cellranger.py +0 -0
  33. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/ns/cellranger_pipeline.py +0 -0
  34. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/ns/cnv.py +0 -0
  35. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/ns/cnvkit.py +0 -0
  36. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/ns/cnvkit_pipeline.py +0 -0
  37. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/ns/delim.py +0 -0
  38. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/ns/gene.py +0 -0
  39. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/ns/gsea.py +0 -0
  40. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/ns/misc.py +0 -0
  41. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/ns/rnaseq.py +0 -0
  42. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/ns/scrna_metabolic_landscape.py +0 -0
  43. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/ns/snp.py +0 -0
  44. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/ns/tcgamaf.py +0 -0
  45. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/ns/tcr.py +0 -0
  46. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/ns/vcf.py +0 -0
  47. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/ns/web.py +0 -0
  48. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/reports/bam/CNAClinic.svelte +0 -0
  49. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/reports/bam/CNVpytor.svelte +0 -0
  50. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/reports/bam/ControlFREEC.svelte +0 -0
  51. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/reports/cellranger/CellRangerCount.svelte +0 -0
  52. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/reports/cellranger/CellRangerSummary.svelte +0 -0
  53. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/reports/cellranger/CellRangerVdj.svelte +0 -0
  54. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/reports/cnv/AneuploidyScore.svelte +0 -0
  55. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/reports/cnv/AneuploidyScoreSummary.svelte +0 -0
  56. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/reports/cnv/TMADScoreSummary.svelte +0 -0
  57. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/reports/cnvkit/CNVkitDiagram.svelte +0 -0
  58. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/reports/cnvkit/CNVkitHeatmap.svelte +0 -0
  59. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/reports/cnvkit/CNVkitScatter.svelte +0 -0
  60. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/reports/delim/SampleInfo.svelte +0 -0
  61. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/reports/gsea/FGSEA.svelte +0 -0
  62. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/reports/gsea/GSEA.svelte +0 -0
  63. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/reports/scrna/CellsDistribution.svelte +0 -0
  64. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/reports/scrna/DimPlots.svelte +0 -0
  65. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/reports/scrna/MarkersFinder.svelte +0 -0
  66. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/reports/scrna/MetaMarkers.svelte +0 -0
  67. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/reports/scrna/RadarPlots.svelte +0 -0
  68. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/reports/scrna/ScFGSEA.svelte +0 -0
  69. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/reports/scrna/SeuratClusterStats.svelte +0 -0
  70. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/reports/scrna/SeuratMap2Ref.svelte +0 -0
  71. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/reports/scrna/SeuratPreparing.svelte +0 -0
  72. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/reports/scrna/TopExpressingGenes.svelte +0 -0
  73. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/reports/scrna_metabolic_landscape/MetabolicFeatures.svelte +0 -0
  74. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/reports/scrna_metabolic_landscape/MetabolicFeaturesIntraSubset.svelte +0 -0
  75. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/reports/scrna_metabolic_landscape/MetabolicPathwayActivity.svelte +0 -0
  76. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/reports/scrna_metabolic_landscape/MetabolicPathwayHeterogeneity.svelte +0 -0
  77. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/reports/snp/PlinkCallRate.svelte +0 -0
  78. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/reports/snp/PlinkFreq.svelte +0 -0
  79. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/reports/snp/PlinkHWE.svelte +0 -0
  80. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/reports/snp/PlinkHet.svelte +0 -0
  81. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/reports/snp/PlinkIBD.svelte +0 -0
  82. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/reports/tcr/CDR3AAPhyschem.svelte +0 -0
  83. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/reports/tcr/CloneResidency.svelte +0 -0
  84. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/reports/tcr/Immunarch.svelte +0 -0
  85. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/reports/tcr/SampleDiversity.svelte +0 -0
  86. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/reports/tcr/TCRClusterStats.svelte +0 -0
  87. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/reports/tcr/TESSA.svelte +0 -0
  88. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/reports/tcr/VJUsage.svelte +0 -0
  89. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/reports/utils/gsea.liq +0 -0
  90. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/reports/utils/misc.liq +0 -0
  91. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/reports/vcf/TruvariBenchSummary.svelte +0 -0
  92. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/reports/vcf/TruvariConsistency.svelte +0 -0
  93. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/bam/BamMerge.py +0 -0
  94. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/bam/BamSplitChroms.py +0 -0
  95. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/bam/CNAClinic.R +0 -0
  96. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/bam/CNVpytor.py +0 -0
  97. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/bam/ControlFREEC.py +0 -0
  98. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/bed/Bed2Vcf.py +0 -0
  99. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/bed/BedConsensus.py +0 -0
  100. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/bed/BedLiftOver.sh +0 -0
  101. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/bed/BedtoolsIntersect.py +0 -0
  102. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/bed/BedtoolsMerge.py +0 -0
  103. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/cellranger/CellRangerCount.py +0 -0
  104. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/cellranger/CellRangerSummary.R +0 -0
  105. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/cellranger/CellRangerVdj.py +0 -0
  106. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/cnv/AneuploidyScore.R +0 -0
  107. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/cnv/AneuploidyScoreSummary.R +0 -0
  108. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/cnv/TMADScore.R +0 -0
  109. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/cnv/TMADScoreSummary.R +0 -0
  110. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/cnvkit/CNVkitAccess.py +0 -0
  111. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/cnvkit/CNVkitAutobin.py +0 -0
  112. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/cnvkit/CNVkitBatch.py +0 -0
  113. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/cnvkit/CNVkitCall.py +0 -0
  114. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/cnvkit/CNVkitCoverage.py +0 -0
  115. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/cnvkit/CNVkitDiagram.py +0 -0
  116. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/cnvkit/CNVkitFix.py +0 -0
  117. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/cnvkit/CNVkitGuessBaits.py +0 -0
  118. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/cnvkit/CNVkitHeatmap.py +0 -0
  119. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/cnvkit/CNVkitReference.py +0 -0
  120. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/cnvkit/CNVkitScatter.py +0 -0
  121. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/cnvkit/CNVkitSegment.py +0 -0
  122. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/cnvkit/guess_baits.py +0 -0
  123. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/delim/RowsBinder.R +0 -0
  124. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/gene/GeneNameConversion.R +0 -0
  125. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/gene/GenePromoters.R +0 -0
  126. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/gsea/Enrichr.R +0 -0
  127. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/gsea/FGSEA.R +0 -0
  128. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/gsea/GSEA.R +0 -0
  129. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/gsea/PreRank.R +0 -0
  130. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/misc/Config2File.py +0 -0
  131. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/misc/Shell.sh +0 -0
  132. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/misc/Str2File.py +0 -0
  133. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/plot/Heatmap.R +0 -0
  134. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/plot/ROC.R +0 -0
  135. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/plot/VennDiagram.R +0 -0
  136. {biopipen-0.29.0/biopipen/scripts/regulation → biopipen-0.29.1/biopipen/scripts/regulatory}/MotifAffinityTest_AtSNP.R +0 -0
  137. {biopipen-0.29.0/biopipen/scripts/regulation → biopipen-0.29.1/biopipen/scripts/regulatory}/MotifAffinityTest_MotifBreakR.R +0 -0
  138. {biopipen-0.29.0/biopipen/scripts/regulation → biopipen-0.29.1/biopipen/scripts/regulatory}/atSNP.R +0 -0
  139. {biopipen-0.29.0/biopipen/scripts/regulation → biopipen-0.29.1/biopipen/scripts/regulatory}/motifBreakR.R +0 -0
  140. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/rnaseq/Simulation-ESCO.R +0 -0
  141. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/rnaseq/Simulation-RUVcorr.R +0 -0
  142. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/rnaseq/Simulation.R +0 -0
  143. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/rnaseq/UnitConversion.R +0 -0
  144. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/scrna/AnnData2Seurat.R +0 -0
  145. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/scrna/CellTypeAnnotation-celltypist.R +0 -0
  146. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/scrna/CellTypeAnnotation-direct.R +0 -0
  147. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/scrna/CellTypeAnnotation-hitype.R +0 -0
  148. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/scrna/CellTypeAnnotation-sccatch.R +0 -0
  149. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/scrna/CellTypeAnnotation-sctype.R +0 -0
  150. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/scrna/CellTypeAnnotation.R +0 -0
  151. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/scrna/CellsDistribution.R +0 -0
  152. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/scrna/DimPlots.R +0 -0
  153. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/scrna/ExprImputation-alra.R +0 -0
  154. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/scrna/ExprImputation-rmagic.R +0 -0
  155. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/scrna/ExprImputation-scimpute.R +0 -0
  156. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/scrna/ExprImputation.R +0 -0
  157. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/scrna/MetaMarkers.R +0 -0
  158. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/scrna/ModuleScoreCalculator.R +0 -0
  159. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/scrna/RadarPlots.R +0 -0
  160. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/scrna/SCImpute.R +0 -0
  161. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/scrna/ScFGSEA.R +0 -0
  162. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/scrna/Seurat2AnnData.R +0 -0
  163. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/scrna/SeuratClusterStats-dimplots.R +0 -0
  164. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/scrna/SeuratClusterStats-features.R +0 -0
  165. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/scrna/SeuratClusterStats-hists.R +0 -0
  166. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/scrna/SeuratClusterStats-ngenes.R +0 -0
  167. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/scrna/SeuratClusterStats-stats.R +0 -0
  168. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/scrna/SeuratClusterStats.R +0 -0
  169. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/scrna/SeuratFilter.R +0 -0
  170. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/scrna/SeuratLoading.R +0 -0
  171. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/scrna/SeuratMap2Ref.R +0 -0
  172. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/scrna/SeuratMetadataMutater.R +0 -0
  173. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/scrna/SeuratSplit.R +0 -0
  174. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/scrna/SeuratSubClustering.R +0 -0
  175. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/scrna/SeuratSubset.R +0 -0
  176. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/scrna/SeuratTo10X.R +0 -0
  177. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/scrna/Subset10X.R +0 -0
  178. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/scrna/TopExpressingGenes.R +0 -0
  179. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/scrna/celltypist-wrapper.py +0 -0
  180. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/scrna/sctype.R +0 -0
  181. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/scrna_metabolic_landscape/MetabolicFeatures.R +0 -0
  182. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/scrna_metabolic_landscape/MetabolicFeaturesIntraSubset.R +0 -0
  183. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/scrna_metabolic_landscape/MetabolicPathwayActivity.R +0 -0
  184. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/scrna_metabolic_landscape/MetabolicPathwayHeterogeneity.R +0 -0
  185. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/snp/Plink2GTMat.py +0 -0
  186. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/snp/PlinkCallRate.R +0 -0
  187. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/snp/PlinkFilter.py +0 -0
  188. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/snp/PlinkFreq.R +0 -0
  189. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/snp/PlinkFromVcf.py +0 -0
  190. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/snp/PlinkHWE.R +0 -0
  191. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/snp/PlinkHet.R +0 -0
  192. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/snp/PlinkSimulation.py +0 -0
  193. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/snp/PlinkUpdateName.py +0 -0
  194. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/stats/ChowTest.R +0 -0
  195. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/stats/DiffCoexpr.R +0 -0
  196. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/stats/LiquidAssoc.R +0 -0
  197. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/stats/MetaPvalue.R +0 -0
  198. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/stats/MetaPvalue1.R +0 -0
  199. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/tcgamaf/Maf2Vcf.py +0 -0
  200. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/tcgamaf/MafAddChr.py +0 -0
  201. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/tcgamaf/maf2vcf.pl +0 -0
  202. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/tcr/Attach2Seurat.R +0 -0
  203. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/tcr/CDR3AAPhyschem.R +0 -0
  204. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/tcr/CloneResidency.R +0 -0
  205. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/tcr/CloneSizeQQPlot.R +0 -0
  206. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/tcr/GIANA/GIANA.py +0 -0
  207. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/tcr/GIANA/GIANA4.py +0 -0
  208. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/tcr/GIANA/Imgt_Human_TRBV.fasta +0 -0
  209. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/tcr/GIANA/query.py +0 -0
  210. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/tcr/Immunarch-basic.R +0 -0
  211. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/tcr/Immunarch-clonality.R +0 -0
  212. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/tcr/Immunarch-diversity.R +0 -0
  213. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/tcr/Immunarch-geneusage.R +0 -0
  214. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/tcr/Immunarch-kmer.R +0 -0
  215. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/tcr/Immunarch-overlap.R +0 -0
  216. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/tcr/Immunarch-spectratyping.R +0 -0
  217. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/tcr/Immunarch-tracking.R +0 -0
  218. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/tcr/Immunarch-vjjunc.R +0 -0
  219. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/tcr/Immunarch.R +0 -0
  220. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/tcr/Immunarch2VDJtools.R +0 -0
  221. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/tcr/ImmunarchFilter.R +0 -0
  222. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/tcr/ImmunarchLoading.R +0 -0
  223. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/tcr/ImmunarchSplitIdents.R +0 -0
  224. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/tcr/SampleDiversity.R +0 -0
  225. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/tcr/TCRClusterStats.R +0 -0
  226. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/tcr/TCRClustering.R +0 -0
  227. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/tcr/TCRDock.py +0 -0
  228. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/tcr/TESSA.R +0 -0
  229. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/tcr/TESSA_source/Atchley_factors.csv +0 -0
  230. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/tcr/TESSA_source/BriseisEncoder.py +0 -0
  231. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/tcr/TESSA_source/MCMC_control.R +0 -0
  232. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/tcr/TESSA_source/TrainedEncoder.h5 +0 -0
  233. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/tcr/TESSA_source/fixed_b.csv +0 -0
  234. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/tcr/TESSA_source/initialization.R +0 -0
  235. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/tcr/TESSA_source/post_analysis.R +0 -0
  236. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/tcr/TESSA_source/real_data.R +0 -0
  237. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/tcr/TESSA_source/update.R +0 -0
  238. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/tcr/TESSA_source/utility.R +0 -0
  239. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/tcr/VJUsage.R +0 -0
  240. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/tcr/immunarch-patched.R +0 -0
  241. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/tcr/vdjtools-patch.sh +0 -0
  242. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/vcf/BcftoolsAnnotate.py +0 -0
  243. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/vcf/BcftoolsFilter.py +0 -0
  244. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/vcf/BcftoolsSort.py +0 -0
  245. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/vcf/BcftoolsView.py +0 -0
  246. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/vcf/TruvariBench.sh +0 -0
  247. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/vcf/TruvariBenchSummary.R +0 -0
  248. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/vcf/TruvariConsistency.R +0 -0
  249. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/vcf/Vcf2Bed.py +0 -0
  250. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/vcf/VcfAnno.py +0 -0
  251. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/vcf/VcfDownSample.sh +0 -0
  252. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/vcf/VcfFilter.py +0 -0
  253. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/vcf/VcfFix.py +0 -0
  254. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/vcf/VcfFix_utils.py +0 -0
  255. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/vcf/VcfIndex.py +0 -0
  256. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/vcf/VcfIntersect.py +0 -0
  257. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/vcf/VcfLiftOver.sh +0 -0
  258. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/vcf/VcfSplitSamples.py +0 -0
  259. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/vcf/bcftools_utils.py +0 -0
  260. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/web/Download.py +0 -0
  261. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/scripts/web/DownloadList.py +0 -0
  262. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/utils/__init__.py +0 -0
  263. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/utils/caching.R +0 -0
  264. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/utils/common_docstrs.py +0 -0
  265. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/utils/gene.R +0 -0
  266. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/utils/gene.py +0 -0
  267. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/utils/gsea.R +0 -0
  268. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/utils/io.R +0 -0
  269. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/utils/misc.R +0 -0
  270. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/utils/misc.py +0 -0
  271. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/utils/mutate_helpers.R +0 -0
  272. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/utils/plot.R +0 -0
  273. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/utils/reference.py +0 -0
  274. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/utils/rnaseq.R +0 -0
  275. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/utils/single_cell.R +0 -0
  276. {biopipen-0.29.0 → biopipen-0.29.1}/biopipen/utils/vcf.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: biopipen
3
- Version: 0.29.0
3
+ Version: 0.29.1
4
4
  Summary: Bioinformatics processes/pipelines that can be run from `pipen run`
5
5
  License: MIT
6
6
  Author: pwwang
@@ -0,0 +1 @@
1
+ __version__ = "0.29.1"
@@ -221,7 +221,7 @@ class Manhattan(Proc):
221
221
  "label_col": None,
222
222
  "devpars": {"res": 100, "width": 1000, "height": 500},
223
223
  "zoom_devpars": {"width": 500, "height": None, "res": None},
224
- "title": "Manhattan Plot",
224
+ "title": None,
225
225
  "ylabel": "-log10(p-value)",
226
226
  "rescale": True,
227
227
  "rescale_ratio_threshold": 5,
@@ -245,6 +245,11 @@ class QQPlot(Proc):
245
245
  infile: The input file for data
246
246
  It should contain at least one column of p-values or the values to be
247
247
  plotted. Header is required.
248
+ theorfile: The file for theoretical values (optional)
249
+ This file should contain at least one column of theoretical values.
250
+ The values will be passed to `envs.theor_qfunc` to calculate the theoretical
251
+ quantiles.
252
+ Header is required.
248
253
 
249
254
  Output:
250
255
  outfile: The output figure file
@@ -266,33 +271,86 @@ class QQPlot(Proc):
266
271
  kind (choice): The kind of the plot, `qq` or `pp`
267
272
  - qq: QQ-plot
268
273
  - pp: PP-plot
269
- band (ns): The arguments for `stat_qq_band()` or `stat_pp_band()`
274
+ theor_col: The column for theoretical values in `in.theorfile` if provided,
275
+ otherwise in `in.infile`.
276
+ An integer (1-based) or a string indicating the column name.
277
+ If `distribution` of `band`, `line`, or `point` is `custom`, this column
278
+ must be provided.
279
+ theor_trans: The transformation of the theoretical values.
280
+ The `theor_funs` have default functions to take the theoretical values.
281
+ This transformation will be applied to the theoretical values before
282
+ passing to the `theor_funs`.
283
+ theor_funs (ns): The R functions to generate density, quantile and deviates
284
+ of the theoretical distribution base on the theoretical values
285
+ if `distribution` of `band`, `line`, or `point` is `custom`.
286
+ - dcustom: The density function, used by band
287
+ - qcustom: The quantile function, used by point
288
+ - rcustom: The deviates function, used by line
289
+ args (ns): The common arguments for `envs.band`, `envs.line` and `envs.point`.
290
+ - distribution: The distribution of the theoretical quantiles
291
+ When `custom` is used, the `envs.theor_col` should be provided and
292
+ `values` will be added to `dparams` automatically.
293
+ - dparams (type=json): The parameters for the distribution
294
+ - <more>: Other shared arguments between `stat_*_band`, `stat_*_line`
295
+ and `stat_*_point`.
296
+ band (ns): The arguments for `stat_qq_band()` or `stat_pp_band()`.
270
297
  See <https://rdrr.io/cran/qqplotr/man/stat_qq_band.html> and
271
298
  <https://rdrr.io/cran/qqplotr/man/stat_pp_band.html>.
299
+ Set to `None` or `band.disabled` to True to disable the band.
300
+ - disabled (flag): Disable the band
301
+ - distribution: The distribution of the theoretical quantiles
302
+ When `custom` is used, the `envs.theor_col` should be provided and
303
+ `values` will be added to `dparams` automatically.
304
+ - dparams (type=json): The parameters for the distribution
272
305
  - <more>: Additional arguments for `stat_qq_band()` or `stat_pp_band()`
273
- line (ns): The arguments for `stat_qq_line()` or `stat_pp_line()`
306
+ line (ns): The arguments for `stat_qq_line()` or `stat_pp_line()`.
274
307
  See <https://rdrr.io/cran/qqplot/man/stat_qq_line.html> and
275
308
  <https://rdrr.io/cran/qqplot/man/stat_pp_line.html>.
309
+ Set to `None` or `line.disabled` to True to disable the line.
310
+ - disabled (flag): Disable the line
311
+ - distribution: The distribution of the theoretical quantiles
312
+ When `custom` is used, the `envs.theor_col` should be provided and
313
+ `values` will be added to `dparams` automatically.
314
+ - dparams (type=json): The parameters for the distribution
276
315
  - <more>: Additional arguments for `stat_qq_line()` or `stat_pp_line()`
277
- point (ns): The arguments for `geom_qq_point()` or `geom_pp_point()`
316
+ point (ns): The arguments for `geom_qq_point()` or `geom_pp_point()`.
278
317
  See <https://rdrr.io/cran/qqplot/man/stat_qq_point.html> and
279
318
  <https://rdrr.io/cran/qqplot/man/stat_pp_point.html>.
319
+ Set to `None` or `point.disabled` to True to disable the point.
320
+ - disabled (flag): Disable the point
321
+ - distribution: The distribution of the theoretical quantiles
322
+ When `custom` is used, the `envs.theor_col` should be provided and
323
+ `values` will be added to `dparams` automatically.
324
+ - dparams (type=json): The parameters for the distribution
325
+ - <more>: Additional arguments for `geom_qq_point()` or `geom_pp_point()`
280
326
  ggs (list): Additional ggplot expression to adjust the plot.
281
327
  """
282
- input = "infile:file"
328
+ input = "infile:file, theorfile:file"
283
329
  output = "outfile:file:{{in.infile | stem}}.{{envs.kind}}.png"
284
330
  lang = config.lang.rscript
285
331
  envs = {
286
332
  "val_col": 1,
333
+ "theor_col": None,
334
+ "theor_trans": None,
335
+ "theor_funs": {
336
+ "dcustom": """
337
+ function(x, values, ...) {
338
+ density(values, from = min(values), to = max(values), n = length(x))$y
339
+ }
340
+ """,
341
+ "qcustom": "function(p, values, ...) {quantile(values, probs = p)}",
342
+ "rcustom": "function(n, values, ...) { sample(values, n, replace = TRUE) }",
343
+ },
344
+ "args": {"distribution": "norm", "dparams": {}},
287
345
  "devpars": {"res": 100, "width": 1000, "height": 1000},
288
346
  "xlabel": "Theoretical Quantiles",
289
347
  "ylabel": "Observed Quantiles",
290
348
  "title": "QQ-plot",
291
349
  "trans": None,
292
350
  "kind": "qq",
293
- "band": {},
294
- "line": {},
295
- "point": {},
351
+ "band": {"disabled": False, "distribution": None, "dparams": None},
352
+ "line": {"disabled": False, "distribution": None, "dparams": None},
353
+ "point": {"disabled": False, "distribution": None, "dparams": None},
296
354
  "ggs": None,
297
355
  }
298
356
  script = "file://../scripts/plot/QQPlot.R"
@@ -1,4 +1,4 @@
1
- """Provides processes for the regulation related"""
1
+ """Provides processes for the regulatory related"""
2
2
 
3
3
  from ..core.proc import Proc
4
4
  from ..core.config import config
@@ -86,7 +86,7 @@ class MotifScan(Proc):
86
86
  "q_cutoff": False,
87
87
  "args": {},
88
88
  }
89
- script = "file://../scripts/regulation/MotifScan.py"
89
+ script = "file://../scripts/regulatory/MotifScan.py"
90
90
 
91
91
 
92
92
  class MotifAffinityTest(Proc):
@@ -211,4 +211,4 @@ class MotifAffinityTest(Proc):
211
211
  "motifbreakr_args": {"method": "default"},
212
212
  "atsnp_args": {"padj_cutoff": True, "padj": "BH", "p": "pval_diff"},
213
213
  }
214
- script = "file://../scripts/regulation/MotifAffinityTest.R"
214
+ script = "file://../scripts/regulatory/MotifAffinityTest.R"
@@ -53,7 +53,7 @@ class SeuratPreparing(Proc):
53
53
 
54
54
  See also
55
55
  - <https://satijalab.org/seurat/articles/pbmc3k_tutorial.html#standard-pre-processing-workflow-1)>
56
- - <https://nbisweden.github.io/workshop-scRNAseq/labs/compiled/seurat/seurat_01_qc.html#Create_one_merged_object>
56
+ - <https://satijalab.org/seurat/articles/integration_introduction>
57
57
 
58
58
  This process will read the scRNA-seq data, based on the information provided by
59
59
  `SampleInfo`, specifically, the paths specified by the `RNAData` column.
@@ -210,6 +210,19 @@ class SeuratPreparing(Proc):
210
210
  - PCs (type=int): Number of PCs to use for 'doubletFinder' function.
211
211
  - doublets (type=float): Number of expected doublets as a proportion of the pool size.
212
212
  - pN (type=float): Number of doublets to simulate as a proportion of the pool size.
213
+ - ncores (type=int): Number of cores to use for `DoubletFinder::paramSweep`.
214
+ Set to `None` to use `envs.ncores`.
215
+ Since parallelization of the function usually exhausts memory, if big `envs.ncores` does not work
216
+ for `DoubletFinder`, set this to a smaller number.
217
+
218
+ cache (type=auto): Whether to cache the information at different steps.
219
+ If `True`, the seurat object will be cached in the job output directory, which will be not cleaned up when job is rerunning.
220
+ The cached seurat object will be saved as `<signature>.<kind>.RDS` file, where `<signature>` is the signature determined by
221
+ the input and envs of the process.
222
+ See <https://github.com/satijalab/seurat/issues/7849>, <https://github.com/satijalab/seurat/issues/5358> and
223
+ <https://github.com/satijalab/seurat/issues/6748> for more details also about reproducibility issues.
224
+ To not use the cached seurat object, you can either set `cache` to `False` or delete the cached file at
225
+ `<signature>.RDS` in the cache directory.
213
226
 
214
227
  Requires:
215
228
  r-seurat:
@@ -238,7 +251,8 @@ class SeuratPreparing(Proc):
238
251
  "min_cells": 5,
239
252
  },
240
253
  "IntegrateLayers": {"method": "harmony"},
241
- "DoubletFinder": {"PCs": 0, "pN": 0.25, "doublets": 0.075},
254
+ "DoubletFinder": {"PCs": 0, "pN": 0.25, "doublets": 0.075, "ncores": 1},
255
+ "cache": config.path.tmpdir,
242
256
  }
243
257
  script = "file://../scripts/scrna/SeuratPreparing.R"
244
258
  plugin_opts = {
@@ -73,11 +73,103 @@ class ChowTest(Proc):
73
73
  script = "file://../scripts/stats/ChowTest.R"
74
74
 
75
75
 
76
+ class Mediation(Proc):
77
+ """Mediation analysis.
78
+
79
+ The flowchart of mediation analysis:
80
+
81
+ ![Mediation Analysis](https://library.virginia.edu/sites/default/files/inline-images/mediation_flowchart-1.png)
82
+
83
+ Reference:
84
+ - <https://library.virginia.edu/data/articles/introduction-to-mediation-analysis>
85
+ - <https://en.wikipedia.org/wiki/Mediation_(statistics)>
86
+ - <https://tilburgsciencehub.com/topics/analyze/regression/linear-regression/mediation-analysis/>
87
+ - <https://ademos.people.uic.edu/Chapter14.html>
88
+
89
+ Input:
90
+ infile: The input data file. The rows are samples and the columns are
91
+ features. It must be tab-delimited.
92
+ ```
93
+ Sample F1 F2 F3 ... Fn
94
+ S1 1.2 3.4 5.6 7.8
95
+ S2 2.3 4.5 6.7 8.9
96
+ ...
97
+ Sm 5.6 7.8 9.0 1.2
98
+ ```
99
+ fmlfile: The formula file.
100
+ ```
101
+ Case M Y X Cov Model_M Model_Y
102
+ Case1 F1 F2 F3 F4,F5 glm lm
103
+ ...
104
+ ```
105
+ Where Y is the outcome variable, X is the predictor variable, M is the
106
+ mediator variable, and Case is the case name. Model_M and Model_Y are the
107
+ models for M and Y, respectively.
108
+ `envs.cases` will be ignored if this is provided.
109
+
110
+ Output:
111
+ outfile: The output file.
112
+ Columns to help understand the results:
113
+ Total Effect: a total effect of X on Y (without M) (`Y ~ X`).
114
+ ADE: A Direct Effect of X on Y after taking into account a mediation effect of M (`Y ~ X + M`).
115
+ ACME: The Mediation Effect, the total effect minus the direct effect,
116
+ which equals to a product of a coefficient of X in the second step and a coefficient of M in the last step.
117
+ The goal of mediation analysis is to obtain this indirect effect and see if it's statistically significant.
118
+
119
+ Envs:
120
+ ncores (type=int): Number of cores to use for parallelization for cases.
121
+ sims (type=int): Number of Monte Carlo draws for nonparametric bootstrap or quasi-Bayesian approximation.
122
+ Will be passed to `mediation::mediate` function.
123
+ args (ns): Other arguments passed to `mediation::mediate` function.
124
+ - <more>: More arguments passed to `mediation::mediate` function.
125
+ See: <https://rdrr.io/cran/mediation/man/mediate.html>
126
+ padj (choice): The method for (ACME) p-value adjustment.
127
+ - none: No p-value adjustment (no Padj column in outfile).
128
+ - holm: Holm-Bonferroni method.
129
+ - hochberg: Hochberg method.
130
+ - hommel: Hommel method.
131
+ - bonferroni: Bonferroni method.
132
+ - BH: Benjamini-Hochberg method.
133
+ - BY: Benjamini-Yekutieli method.
134
+ - fdr: FDR correction method.
135
+ cases (type=json): The cases for mediation analysis.
136
+ Ignored if `in.fmlfile` is provided.
137
+ A json/dict with case names as keys and values as a dict of M, Y, X, Cov, Model_M, Model_Y.
138
+ For example:
139
+ ```json
140
+ {
141
+ "Case1": {
142
+ "M": "F1",
143
+ "Y": "F2",
144
+ "X": "F3",
145
+ "Cov": "F4,F5",
146
+ "Model_M": "glm",
147
+ "Model_Y": "lm"
148
+ },
149
+ ...
150
+ }
151
+ ```
152
+ transpose_input (flag): Whether to transpose the input file.
153
+ """ # noqa: E501
154
+ input = "infile:file, fmlfile:file"
155
+ output = "outfile:file:{{in.infile | stem}}.mediation.txt"
156
+ lang = config.lang.rscript
157
+ envs = {
158
+ "ncores": config.misc.ncores,
159
+ "sims": 1000,
160
+ "args": {},
161
+ "padj": "none",
162
+ "cases": {},
163
+ "transpose_input": False,
164
+ }
165
+ script = "file://../scripts/stats/Mediation.R"
166
+
167
+
76
168
  class LiquidAssoc(Proc):
77
169
  """Liquid association tests.
78
170
 
79
171
  See Also https://github.com/gundt/fastLiquidAssociation
80
- Requieres https://github.com/pwwang/fastLiquidAssociation
172
+ Requires https://github.com/pwwang/fastLiquidAssociation
81
173
 
82
174
  Input:
83
175
  infile: The input data file. The rows are samples and the columns are
@@ -88,7 +88,11 @@ for (name in names(stats)) {
88
88
  group <- if (is.null(stat$group)) sym("..group") else sym(stat$group)
89
89
  count_on <- paste0("..count.", stat$on)
90
90
  if (!is_continuous) {
91
- data <- data %>% add_count(!!group, name = count_on)
91
+ if (!is.null(stat$each)) {
92
+ data <- data %>% add_count(!!group, !!sym(stat$each), name = count_on)
93
+ } else {
94
+ data <- data %>% add_count(!!group, name = count_on)
95
+ }
92
96
  }
93
97
 
94
98
  if (is.null(stat$devpars)) {
@@ -141,18 +145,19 @@ for (name in names(stats)) {
141
145
  } else {
142
146
  data <- data %>%
143
147
  distinct(!!group, !!sym(stat$each), .keep_all = TRUE) %>%
148
+ mutate(!!group := factor(!!group, levels = unique(!!group))) %>%
144
149
  group_by(!!sym(stat$each))
145
150
  }
146
151
  p <- ggplot(
147
- data %>% arrange(!!group),
148
- aes(x = "", y = !!sym(count_on), fill = !!group, label = !!sym(count_on))
152
+ data %>% mutate(.size = sum(!!sym(count_on))),
153
+ aes(x = sqrt(.size) / 2, width = sqrt(.size), y = !!sym(count_on), fill = !!group, label = !!sym(count_on))
149
154
  ) +
150
- geom_bar(stat="identity", width=1, color="white", position = position_stack(reverse = TRUE)) +
155
+ geom_bar(stat="identity", color="white", position = position_fill(reverse = TRUE)) +
151
156
  coord_polar("y", start = 0) +
152
157
  theme_void() +
153
158
  theme(plot.title = element_text(hjust = 0.5)) +
154
159
  geom_label_repel(
155
- position = position_stack(vjust = 0.5),
160
+ position = position_fill(reverse = TRUE,vjust = .5),
156
161
  color="#333333",
157
162
  fill="#EEEEEE",
158
163
  size=4
@@ -105,6 +105,7 @@ args$signif <- signif
105
105
  args$plot.title <- title
106
106
  args$rescale <- rescale
107
107
  args$rescale.ratio.threshold <- rescale_ratio_threshold
108
+ args$y.label <- ylabel
108
109
  if (!is.null(hicolors)) { args$color.by.highlight <- TRUE }
109
110
  if (!is.null(label_col)) { args$label.colname <- ".label" }
110
111
  g <- do_call(manhattan_plot, args)
@@ -114,10 +115,15 @@ print(g)
114
115
  dev.off()
115
116
 
116
117
  # zoom into chromosomes
118
+ all_chroms <- as.character(unique(mpdata$data[[mpdata$chr.colname]]))
117
119
  if (!is.null(zoom)) {
118
120
  log_info("Zooming into chromosomes ...")
119
121
  zoom <- norm_chroms(zoom)
120
122
  for (z in zoom) {
123
+ if (!z %in% all_chroms) {
124
+ log_warn("- {z}: not found in data")
125
+ next
126
+ }
121
127
  log_info("- {z}")
122
128
  args_z <- args
123
129
  args_z$chromosome <- z
@@ -0,0 +1,146 @@
1
+ source("{{biopipen_dir}}/utils/misc.R")
2
+
3
+ library(rlang)
4
+ library(stats)
5
+ library(ggplot2)
6
+ library(ggprism)
7
+ library(qqplotr)
8
+
9
+ theme_set(theme_prism())
10
+
11
+ infile <- {{in.infile | r}}
12
+ theorfile <- {{in.theorfile | r}}
13
+ outfile <- {{out.outfile | r}}
14
+ val_col <- {{envs.val_col | r}}
15
+ theor_col <- {{envs.theor_col | r}}
16
+ theor_trans <- {{envs.theor_trans | r}}
17
+ theor_funs <- {{envs.theor_funs | r}}
18
+ devpars <- {{envs.devpars | r}}
19
+ title <- {{envs.title | r}}
20
+ xlabel <- {{envs.xlabel | r}}
21
+ ylabel <- {{envs.ylabel | r}}
22
+ kind <- {{envs.kind | r}}
23
+ trans <- {{envs.trans | r}}
24
+ args <- {{envs.args | r}}
25
+ band_args <- {{envs.band | r}}
26
+ line_args <- {{envs.line | r}}
27
+ point_args <- {{envs.point | r}}
28
+ ggs <- {{envs.ggs | r}}
29
+
30
+ .eval_fun <- function(fun) {
31
+ if (is.character(fun)) {
32
+ fun <- trimws(fun)
33
+ if (grepl("^-\\s*[a-zA-Z\\.][0-9a-zA-Z\\._]*$", fun)) {
34
+ fun <- trimws(substring(fun, 2))
35
+ fun <- eval(parse(text = fun))
36
+ return(function(x) -fun(x))
37
+ } else {
38
+ return(eval(parse(text = fun)))
39
+ }
40
+ } else {
41
+ return(fun)
42
+ }
43
+ }
44
+
45
+ indata <- read.table(infile, header=TRUE, sep="\t", stringsAsFactors=FALSE, check.names = FALSE)
46
+ if (is.numeric(val_col)) {
47
+ val_col <- colnames(indata)[val_col]
48
+ }
49
+ if (!is.null(trans)) {
50
+ trans <- .eval_fun(trans)
51
+ indata[[val_col]] <- trans(indata[[val_col]])
52
+ }
53
+
54
+ if (!is.null(theor_col)) {
55
+ if (is.numeric(theor_col)) {
56
+ theor_col <- colnames(theor)[theor_col]
57
+ }
58
+
59
+ if (!is.null(theorfile)) {
60
+ theor <- read.table(theorfile, header=TRUE, sep="\t", stringsAsFactors=FALSE, check.names = FALSE)
61
+ theor_vals <- theor[[theor_col]]
62
+ } else {
63
+ theor_vals <- indata[[theor_col]]
64
+ }
65
+
66
+ if (!is.null(theor_trans)) {
67
+ theor_trans <- .eval_fun(theor_trans)
68
+ theor_vals <- theor_trans(theor_vals)
69
+ }
70
+ theor_vals <- sort(na.omit(theor_vals))
71
+ }
72
+
73
+ band_fun <- ifelse(kind == "pp", stat_pp_band, stat_qq_band)
74
+ line_fun <- ifelse(kind == "pp", stat_pp_line, stat_qq_line)
75
+ point_fun <- ifelse(kind == "pp", stat_pp_point, stat_qq_point)
76
+
77
+ for (fun in names(theor_funs)) {
78
+ assign(fun, .eval_fun(theor_funs[[fun]]))
79
+ }
80
+
81
+ if (!is.null(band_args) || isFALSE(band_args)) {
82
+ if (isTRUE(band_args$disabled)) {
83
+ band_args <- NULL
84
+ } else {
85
+ band_args$disabled <- NULL
86
+ band_args <- list_update(band_args, args)
87
+ if (band_args$distribution == "custom") {
88
+ band_args$dparams <- band_args$dparams %||% list()
89
+ band_args$dparams$values <- theor_vals
90
+ }
91
+ }
92
+ }
93
+ if (!is.null(line_args) || isFALSE(line_args)) {
94
+ if (isTRUE(line_args$disabled)) {
95
+ line_args <- NULL
96
+ } else {
97
+ line_args$disabled <- NULL
98
+ line_args <- list_update(line_args, args)
99
+ if (line_args$distribution == "custom") {
100
+ line_args$dparams <- line_args$dparams %||% list()
101
+ line_args$dparams$values <- theor_vals
102
+ }
103
+ }
104
+ }
105
+ if (!is.null(point_args) || isFALSE(point_args)) {
106
+ if (isTRUE(point_args$disabled)) {
107
+ point_args <- NULL
108
+ } else {
109
+ point_args$disabled <- NULL
110
+ point_args <- list_update(point_args, args)
111
+ if (point_args$distribution == "custom") {
112
+ point_args$dparams <- point_args$dparams %||% list()
113
+ point_args$dparams$values <- theor_vals
114
+ }
115
+ }
116
+ }
117
+
118
+ title <- title %||% waiver()
119
+ xlabel <- xlabel %||% waiver()
120
+ ylabel <- ylabel %||% waiver()
121
+
122
+ indata <- indata[complete.cases(indata), , drop = FALSE]
123
+ indata <- indata[order(indata[[val_col]]), , drop = FALSE]
124
+
125
+ p <- ggplot(data = indata, mapping = aes(sample = !!sym(val_col))) +
126
+ labs(title = title, x = xlabel, y = ylabel)
127
+
128
+ if (!is.null(band_args)) {
129
+ p <- p + do_call(band_fun, band_args)
130
+ }
131
+ if (!is.null(line_args)) {
132
+ p <- p + do_call(line_fun, line_args)
133
+ }
134
+ if (!is.null(point_args)) {
135
+ p <- p + do_call(point_fun, point_args)
136
+ }
137
+
138
+ if (!is.null(ggs)) {
139
+ for (gg in ggs) {
140
+ p <- p + eval(parse(text = gg))
141
+ }
142
+ }
143
+
144
+ png(outfile, width=devpars$width, height=devpars$height, res=devpars$res)
145
+ print(p)
146
+ dev.off()
@@ -1,4 +1,4 @@
1
- # Script for regulation.MotifAffinityTest
1
+ # Script for regulatory.MotifAffinityTest
2
2
 
3
3
  source("{{biopipen_dir}}/utils/misc.R")
4
4
  library(BiocParallel)
@@ -215,12 +215,12 @@ tool <- match.arg(tool, c("motifbreakr", "atsnp"))
215
215
 
216
216
  if (tool == "motifbreakr") {
217
217
  motifbreakr_args <- {{envs.motifbreakr_args | r}}
218
- {% set sourcefile = biopipen_dir | joinpaths: "scripts", "regulation", "MotifAffinityTest_MotifBreakR.R" %}
218
+ {% set sourcefile = biopipen_dir | joinpaths: "scripts", "regulatory", "MotifAffinityTest_MotifBreakR.R" %}
219
219
  # {{ sourcefile | getmtime }}
220
220
  source("{{sourcefile}}")
221
221
  } else { # atsnp
222
222
  atsnp_args <- {{envs.atsnp_args | r}}
223
- {% set sourcefile = biopipen_dir | joinpaths: "scripts", "regulation", "MotifAffinityTest_AtSNP.R" %}
223
+ {% set sourcefile = biopipen_dir | joinpaths: "scripts", "regulatory", "MotifAffinityTest_AtSNP.R" %}
224
224
  # {{ sourcefile | getmtime }}
225
225
  source("{{sourcefile}}")
226
226
  }
@@ -1,4 +1,4 @@
1
- """Script for regulation.MotifScan"""
1
+ """Script for regulatory.MotifScan"""
2
2
  import re
3
3
 
4
4
  # Paths may be passed in args or to motifdb
@@ -65,6 +65,19 @@ if (ncores > 1) {
65
65
  log_info("- Reading Seurat object ...")
66
66
  srtobj <- readRDS(srtfile)
67
67
  defassay <- DefaultAssay(srtobj)
68
+ if (defassay == "SCT" && !"PrepSCTFindMarkers" %in% names(srtobj@commands)) {
69
+ log_warn(" SCTransform used but PrepSCTFindMarkers not applied, running ...")
70
+
71
+ srtobj <- PrepSCTFindMarkers(srtobj)
72
+ # compose a new SeuratCommand to record it to srtobj@commands
73
+ scommand <- srtobj@commands$FindClusters
74
+ scommand@name <- "PrepSCTFindMarkers"
75
+ scommand@time.stamp <- Sys.time()
76
+ scommand@assay.used <- "SCT"
77
+ scommand@call.string <- "PrepSCTFindMarkers(object = srtobj)"
78
+ scommand@params <- list()
79
+ srtobj@commands$PrepSCTFindMarkers <- scommand
80
+ }
68
81
 
69
82
  if (!is.null(mutaters) && length(mutaters) > 0) {
70
83
  log_info("- Mutating meta data ...")
@@ -472,33 +485,30 @@ find_markers <- function(findmarkers_args, find_all = FALSE) {
472
485
  p_val_adj = numeric()
473
486
  )
474
487
  }
488
+
489
+ call_findmarkers <- function(fn, args) {
490
+ if (find_all) {
491
+ do_call(fn, args)
492
+ } else {
493
+ do_call(fn, args) %>% rownames_to_column("gene")
494
+ }
495
+ }
475
496
  markers <- tryCatch({
476
- do_call(fun, findmarkers_args) %>% rownames_to_column("gene")
497
+ call_findmarkers(fun, findmarkers_args)
477
498
  }, error = function(e) {
478
- # Object contains multiple models with unequal library sizes.
479
- # Run `PrepSCTFindMarkers()` before running `FindMarkers()`.
480
- if (grepl("PrepSCTFindMarkers", e$message)) {
481
- log_warn(" Running PrepSCTFindMarkers ...")
482
- findmarkers_args$object <<- PrepSCTFindMarkers(findmarkers_args$object)
483
- tryCatch({
484
- do_call(fun, findmarkers_args) %>% rownames_to_column("gene")
485
- }, error = function(err) {
486
- log_warn(paste0(" ", err$message))
487
- empty
488
- })
489
- } else {
490
- log_warn(paste0(" ", e$message))
491
- empty
499
+ if (!grepl("PrepSCTFindMarkers", e$message) && defassay == "SCT") {
500
+ log_warn(paste0(" ! ", e$message))
492
501
  }
502
+ empty
493
503
  })
494
504
 
495
505
  if (nrow(markers) == 0 && defassay == "SCT") {
496
- log_warn(" No markers found from SCT assay, trying recorrect_umi = FALSE")
506
+ log_warn(" ! No markers found from SCT assay, trying recorrect_umi = FALSE")
497
507
  findmarkers_args$recorrect_umi <- FALSE
498
508
  markers <- tryCatch({
499
- do_call(fun, findmarkers_args) %>% rownames_to_column("gene")
509
+ call_findmarkers(fun, findmarkers_args)
500
510
  }, error = function(e) {
501
- log_warn(paste0(" ", e$message))
511
+ log_warn(paste0(" ! ", e$message))
502
512
  empty
503
513
  })
504
514
  }
@@ -202,6 +202,14 @@ if (DefaultAssay(sobj) == "SCT") {
202
202
  # https://github.com/satijalab/seurat/issues/6968
203
203
  log_info("Running PrepSCTFindMarkers ...")
204
204
  sobj <- PrepSCTFindMarkers(sobj)
205
+ # compose a new SeuratCommand to record it to sobj@commands
206
+ scommand <- sobj@commands$FindClusters
207
+ scommand@name <- "PrepSCTFindMarkers"
208
+ scommand@time.stamp <- Sys.time()
209
+ scommand@assay.used <- "SCT"
210
+ scommand@call.string <- "PrepSCTFindMarkers(object = sobj)"
211
+ scommand@params <- list()
212
+ sobj@commands$PrepSCTFindMarkers <- scommand
205
213
  }
206
214
 
207
215
  log_info("Saving results ...")