biopipen 0.27.4__tar.gz → 0.27.6__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 (247) hide show
  1. {biopipen-0.27.4 → biopipen-0.27.6}/PKG-INFO +1 -1
  2. biopipen-0.27.6/biopipen/__init__.py +1 -0
  3. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/core/testing.py +4 -14
  4. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/ns/scrna.py +9 -2
  5. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/scripts/scrna/SeuratClusterStats-features.R +1 -1
  6. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/scripts/scrna/SeuratPreparing.R +163 -112
  7. biopipen-0.27.6/biopipen/scripts/scrna/SeuratTo10X.R +27 -0
  8. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/scripts/scrna_metabolic_landscape/MetabolicFeatures.R +6 -5
  9. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/utils/gsea.R +2 -2
  10. {biopipen-0.27.4 → biopipen-0.27.6}/pyproject.toml +1 -1
  11. {biopipen-0.27.4 → biopipen-0.27.6}/setup.py +1 -1
  12. biopipen-0.27.4/biopipen/__init__.py +0 -1
  13. biopipen-0.27.4/biopipen/scripts/scrna/Write10X.R +0 -11
  14. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/core/__init__.py +0 -0
  15. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/core/config.py +0 -0
  16. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/core/config.toml +0 -0
  17. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/core/defaults.py +0 -0
  18. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/core/filters.py +0 -0
  19. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/core/proc.py +0 -0
  20. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/ns/__init__.py +0 -0
  21. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/ns/bam.py +0 -0
  22. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/ns/bcftools.py +0 -0
  23. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/ns/bed.py +0 -0
  24. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/ns/cellranger.py +0 -0
  25. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/ns/cellranger_pipeline.py +0 -0
  26. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/ns/cnv.py +0 -0
  27. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/ns/cnvkit.py +0 -0
  28. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/ns/cnvkit_pipeline.py +0 -0
  29. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/ns/delim.py +0 -0
  30. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/ns/gene.py +0 -0
  31. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/ns/gsea.py +0 -0
  32. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/ns/misc.py +0 -0
  33. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/ns/plot.py +0 -0
  34. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/ns/rnaseq.py +0 -0
  35. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/ns/scrna_metabolic_landscape.py +0 -0
  36. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/ns/snp.py +0 -0
  37. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/ns/stats.py +0 -0
  38. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/ns/tcgamaf.py +0 -0
  39. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/ns/tcr.py +0 -0
  40. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/ns/vcf.py +0 -0
  41. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/ns/web.py +0 -0
  42. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/reports/bam/CNAClinic.svelte +0 -0
  43. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/reports/bam/CNVpytor.svelte +0 -0
  44. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/reports/bam/ControlFREEC.svelte +0 -0
  45. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/reports/cellranger/CellRangerCount.svelte +0 -0
  46. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/reports/cellranger/CellRangerSummary.svelte +0 -0
  47. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/reports/cellranger/CellRangerVdj.svelte +0 -0
  48. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/reports/cnv/AneuploidyScore.svelte +0 -0
  49. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/reports/cnv/AneuploidyScoreSummary.svelte +0 -0
  50. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/reports/cnv/TMADScoreSummary.svelte +0 -0
  51. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/reports/cnvkit/CNVkitDiagram.svelte +0 -0
  52. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/reports/cnvkit/CNVkitHeatmap.svelte +0 -0
  53. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/reports/cnvkit/CNVkitScatter.svelte +0 -0
  54. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/reports/delim/SampleInfo.svelte +0 -0
  55. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/reports/gsea/FGSEA.svelte +0 -0
  56. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/reports/gsea/GSEA.svelte +0 -0
  57. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/reports/scrna/CellsDistribution.svelte +0 -0
  58. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/reports/scrna/DimPlots.svelte +0 -0
  59. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/reports/scrna/MarkersFinder.svelte +0 -0
  60. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/reports/scrna/MetaMarkers.svelte +0 -0
  61. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/reports/scrna/RadarPlots.svelte +0 -0
  62. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/reports/scrna/ScFGSEA.svelte +0 -0
  63. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/reports/scrna/SeuratClusterStats.svelte +0 -0
  64. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/reports/scrna/SeuratMap2Ref.svelte +0 -0
  65. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/reports/scrna/SeuratPreparing.svelte +0 -0
  66. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/reports/scrna/TopExpressingGenes.svelte +0 -0
  67. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/reports/scrna_metabolic_landscape/MetabolicFeatures.svelte +0 -0
  68. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/reports/scrna_metabolic_landscape/MetabolicFeaturesIntraSubset.svelte +0 -0
  69. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/reports/scrna_metabolic_landscape/MetabolicPathwayActivity.svelte +0 -0
  70. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/reports/scrna_metabolic_landscape/MetabolicPathwayHeterogeneity.svelte +0 -0
  71. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/reports/tcr/CDR3AAPhyschem.svelte +0 -0
  72. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/reports/tcr/CloneResidency.svelte +0 -0
  73. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/reports/tcr/Immunarch.svelte +0 -0
  74. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/reports/tcr/SampleDiversity.svelte +0 -0
  75. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/reports/tcr/TCRClusterStats.svelte +0 -0
  76. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/reports/tcr/TESSA.svelte +0 -0
  77. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/reports/tcr/VJUsage.svelte +0 -0
  78. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/reports/utils/gsea.liq +0 -0
  79. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/reports/utils/misc.liq +0 -0
  80. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/reports/vcf/TruvariBenchSummary.svelte +0 -0
  81. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/reports/vcf/TruvariConsistency.svelte +0 -0
  82. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/scripts/bam/BamMerge.py +0 -0
  83. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/scripts/bam/BamSplitChroms.py +0 -0
  84. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/scripts/bam/CNAClinic.R +0 -0
  85. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/scripts/bam/CNVpytor.py +0 -0
  86. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/scripts/bam/ControlFREEC.py +0 -0
  87. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/scripts/bcftools/BcftoolsAnnotate.py +0 -0
  88. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/scripts/bcftools/BcftoolsFilter.py +0 -0
  89. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/scripts/bcftools/BcftoolsSort.py +0 -0
  90. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/scripts/bed/Bed2Vcf.py +0 -0
  91. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/scripts/bed/BedConsensus.py +0 -0
  92. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/scripts/bed/BedLiftOver.sh +0 -0
  93. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/scripts/bed/BedtoolsMerge.py +0 -0
  94. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/scripts/cellranger/CellRangerCount.py +0 -0
  95. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/scripts/cellranger/CellRangerSummary.R +0 -0
  96. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/scripts/cellranger/CellRangerVdj.py +0 -0
  97. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/scripts/cnv/AneuploidyScore.R +0 -0
  98. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/scripts/cnv/AneuploidyScoreSummary.R +0 -0
  99. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/scripts/cnv/TMADScore.R +0 -0
  100. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/scripts/cnv/TMADScoreSummary.R +0 -0
  101. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/scripts/cnvkit/CNVkitAccess.py +0 -0
  102. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/scripts/cnvkit/CNVkitAutobin.py +0 -0
  103. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/scripts/cnvkit/CNVkitBatch.py +0 -0
  104. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/scripts/cnvkit/CNVkitCall.py +0 -0
  105. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/scripts/cnvkit/CNVkitCoverage.py +0 -0
  106. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/scripts/cnvkit/CNVkitDiagram.py +0 -0
  107. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/scripts/cnvkit/CNVkitFix.py +0 -0
  108. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/scripts/cnvkit/CNVkitGuessBaits.py +0 -0
  109. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/scripts/cnvkit/CNVkitHeatmap.py +0 -0
  110. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/scripts/cnvkit/CNVkitReference.py +0 -0
  111. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/scripts/cnvkit/CNVkitScatter.py +0 -0
  112. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/scripts/cnvkit/CNVkitSegment.py +0 -0
  113. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/scripts/cnvkit/guess_baits.py +0 -0
  114. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/scripts/delim/RowsBinder.R +0 -0
  115. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/scripts/delim/SampleInfo.R +0 -0
  116. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/scripts/gene/GeneNameConversion.py +0 -0
  117. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/scripts/gsea/Enrichr.R +0 -0
  118. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/scripts/gsea/FGSEA.R +0 -0
  119. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/scripts/gsea/GSEA.R +0 -0
  120. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/scripts/gsea/PreRank.R +0 -0
  121. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/scripts/misc/Config2File.py +0 -0
  122. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/scripts/misc/Str2File.py +0 -0
  123. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/scripts/plot/Heatmap.R +0 -0
  124. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/scripts/plot/ROC.R +0 -0
  125. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/scripts/plot/VennDiagram.R +0 -0
  126. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/scripts/rnaseq/Simulation-ESCO.R +0 -0
  127. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/scripts/rnaseq/Simulation-RUVcorr.R +0 -0
  128. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/scripts/rnaseq/Simulation.R +0 -0
  129. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/scripts/rnaseq/UnitConversion.R +0 -0
  130. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/scripts/scrna/AnnData2Seurat.R +0 -0
  131. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/scripts/scrna/CellTypeAnnotation-celltypist.R +0 -0
  132. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/scripts/scrna/CellTypeAnnotation-direct.R +0 -0
  133. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/scripts/scrna/CellTypeAnnotation-hitype.R +0 -0
  134. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/scripts/scrna/CellTypeAnnotation-sccatch.R +0 -0
  135. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/scripts/scrna/CellTypeAnnotation-sctype.R +0 -0
  136. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/scripts/scrna/CellTypeAnnotation.R +0 -0
  137. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/scripts/scrna/CellsDistribution.R +0 -0
  138. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/scripts/scrna/DimPlots.R +0 -0
  139. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/scripts/scrna/ExprImpution-alra.R +0 -0
  140. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/scripts/scrna/ExprImpution-rmagic.R +0 -0
  141. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/scripts/scrna/ExprImpution-scimpute.R +0 -0
  142. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/scripts/scrna/ExprImpution.R +0 -0
  143. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/scripts/scrna/MarkersFinder.R +0 -0
  144. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/scripts/scrna/MetaMarkers.R +0 -0
  145. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/scripts/scrna/ModuleScoreCalculator.R +0 -0
  146. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/scripts/scrna/RadarPlots.R +0 -0
  147. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/scripts/scrna/SCImpute.R +0 -0
  148. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/scripts/scrna/ScFGSEA.R +0 -0
  149. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/scripts/scrna/Seurat2AnnData.R +0 -0
  150. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/scripts/scrna/SeuratClusterStats-dimplots.R +0 -0
  151. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/scripts/scrna/SeuratClusterStats-hists.R +0 -0
  152. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/scripts/scrna/SeuratClusterStats-ngenes.R +0 -0
  153. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/scripts/scrna/SeuratClusterStats-stats.R +0 -0
  154. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/scripts/scrna/SeuratClusterStats.R +0 -0
  155. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/scripts/scrna/SeuratClustering.R +0 -0
  156. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/scripts/scrna/SeuratFilter.R +0 -0
  157. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/scripts/scrna/SeuratLoading.R +0 -0
  158. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/scripts/scrna/SeuratMap2Ref.R +0 -0
  159. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/scripts/scrna/SeuratMetadataMutater.R +0 -0
  160. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/scripts/scrna/SeuratSplit.R +0 -0
  161. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/scripts/scrna/SeuratSubClustering.R +0 -0
  162. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/scripts/scrna/SeuratSubset.R +0 -0
  163. /biopipen-0.27.4/biopipen/scripts/scrna/SeuratTo10X.R → /biopipen-0.27.6/biopipen/scripts/scrna/Subset10X.R +0 -0
  164. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/scripts/scrna/TopExpressingGenes.R +0 -0
  165. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/scripts/scrna/celltypist-wrapper.py +0 -0
  166. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/scripts/scrna/sctype.R +0 -0
  167. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/scripts/scrna_metabolic_landscape/MetabolicFeaturesIntraSubset.R +0 -0
  168. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/scripts/scrna_metabolic_landscape/MetabolicPathwayActivity.R +0 -0
  169. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/scripts/scrna_metabolic_landscape/MetabolicPathwayHeterogeneity.R +0 -0
  170. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/scripts/snp/MatrixEQTL.R +0 -0
  171. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/scripts/snp/PlinkSimulation.py +0 -0
  172. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/scripts/stats/ChowTest.R +0 -0
  173. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/scripts/stats/DiffCoexpr.R +0 -0
  174. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/scripts/stats/LiquidAssoc.R +0 -0
  175. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/scripts/stats/MetaPvalue.R +0 -0
  176. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/scripts/tcgamaf/Maf2Vcf.py +0 -0
  177. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/scripts/tcgamaf/MafAddChr.py +0 -0
  178. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/scripts/tcgamaf/maf2vcf.pl +0 -0
  179. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/scripts/tcr/Attach2Seurat.R +0 -0
  180. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/scripts/tcr/CDR3AAPhyschem.R +0 -0
  181. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/scripts/tcr/CloneResidency.R +0 -0
  182. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/scripts/tcr/CloneSizeQQPlot.R +0 -0
  183. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/scripts/tcr/GIANA/GIANA.py +0 -0
  184. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/scripts/tcr/GIANA/GIANA4.py +0 -0
  185. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/scripts/tcr/GIANA/Imgt_Human_TRBV.fasta +0 -0
  186. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/scripts/tcr/GIANA/query.py +0 -0
  187. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/scripts/tcr/Immunarch-basic.R +0 -0
  188. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/scripts/tcr/Immunarch-clonality.R +0 -0
  189. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/scripts/tcr/Immunarch-diversity.R +0 -0
  190. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/scripts/tcr/Immunarch-geneusage.R +0 -0
  191. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/scripts/tcr/Immunarch-kmer.R +0 -0
  192. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/scripts/tcr/Immunarch-overlap.R +0 -0
  193. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/scripts/tcr/Immunarch-spectratyping.R +0 -0
  194. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/scripts/tcr/Immunarch-tracking.R +0 -0
  195. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/scripts/tcr/Immunarch-vjjunc.R +0 -0
  196. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/scripts/tcr/Immunarch.R +0 -0
  197. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/scripts/tcr/Immunarch2VDJtools.R +0 -0
  198. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/scripts/tcr/ImmunarchFilter.R +0 -0
  199. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/scripts/tcr/ImmunarchLoading.R +0 -0
  200. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/scripts/tcr/ImmunarchSplitIdents.R +0 -0
  201. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/scripts/tcr/SampleDiversity.R +0 -0
  202. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/scripts/tcr/TCRClusterStats.R +0 -0
  203. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/scripts/tcr/TCRClustering.R +0 -0
  204. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/scripts/tcr/TCRDock.py +0 -0
  205. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/scripts/tcr/TESSA.R +0 -0
  206. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/scripts/tcr/TESSA_source/Atchley_factors.csv +0 -0
  207. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/scripts/tcr/TESSA_source/BriseisEncoder.py +0 -0
  208. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/scripts/tcr/TESSA_source/MCMC_control.R +0 -0
  209. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/scripts/tcr/TESSA_source/TrainedEncoder.h5 +0 -0
  210. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/scripts/tcr/TESSA_source/fixed_b.csv +0 -0
  211. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/scripts/tcr/TESSA_source/initialization.R +0 -0
  212. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/scripts/tcr/TESSA_source/post_analysis.R +0 -0
  213. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/scripts/tcr/TESSA_source/real_data.R +0 -0
  214. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/scripts/tcr/TESSA_source/update.R +0 -0
  215. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/scripts/tcr/TESSA_source/utility.R +0 -0
  216. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/scripts/tcr/VJUsage.R +0 -0
  217. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/scripts/tcr/immunarch-patched.R +0 -0
  218. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/scripts/tcr/vdjtools-patch.sh +0 -0
  219. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/scripts/vcf/TruvariBench.sh +0 -0
  220. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/scripts/vcf/TruvariBenchSummary.R +0 -0
  221. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/scripts/vcf/TruvariConsistency.R +0 -0
  222. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/scripts/vcf/Vcf2Bed.py +0 -0
  223. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/scripts/vcf/VcfAnno.py +0 -0
  224. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/scripts/vcf/VcfDownSample.sh +0 -0
  225. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/scripts/vcf/VcfFilter.py +0 -0
  226. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/scripts/vcf/VcfFix.py +0 -0
  227. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/scripts/vcf/VcfFix_utils.py +0 -0
  228. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/scripts/vcf/VcfIndex.py +0 -0
  229. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/scripts/vcf/VcfIntersect.py +0 -0
  230. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/scripts/vcf/VcfLiftOver.sh +0 -0
  231. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/scripts/vcf/VcfSplitSamples.py +0 -0
  232. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/scripts/web/Download.py +0 -0
  233. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/scripts/web/DownloadList.py +0 -0
  234. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/utils/__init__.py +0 -0
  235. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/utils/caching.R +0 -0
  236. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/utils/common_docstrs.py +0 -0
  237. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/utils/gene.R +0 -0
  238. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/utils/gene.py +0 -0
  239. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/utils/io.R +0 -0
  240. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/utils/misc.R +0 -0
  241. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/utils/misc.py +0 -0
  242. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/utils/mutate_helpers.R +0 -0
  243. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/utils/plot.R +0 -0
  244. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/utils/reference.py +0 -0
  245. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/utils/rnaseq.R +0 -0
  246. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/utils/single_cell.R +0 -0
  247. {biopipen-0.27.4 → biopipen-0.27.6}/biopipen/utils/vcf.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: biopipen
3
- Version: 0.27.4
3
+ Version: 0.27.6
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.27.6"
@@ -3,7 +3,7 @@ import tempfile
3
3
  from functools import wraps
4
4
  from pathlib import Path
5
5
 
6
- from pipen import Pipen, plugin
6
+ from pipen import Pipen
7
7
 
8
8
  TESTING_INDEX_INIT = 1
9
9
  TESTING_PARENT_DIR = Path(tempfile.gettempdir())
@@ -40,26 +40,16 @@ def _get_test_dirs(testfile, new):
40
40
  return name, workdir, outdir
41
41
 
42
42
 
43
- class PipelineSucceeded:
44
- """A plugin to check if the pipeline succeeded"""
45
-
46
- name = "succeeded"
47
- version = "0.1.0"
48
-
49
- @plugin.impl
50
- async def on_complete(pipen, succeeded):
51
- pipen._succeeded = succeeded
52
-
53
-
54
- def get_pipeline(testfile, loglevel="debug", **kwargs):
43
+ def get_pipeline(testfile, loglevel="debug", enable_report=False, **kwargs):
55
44
  """Get a pipeline for a test file"""
56
45
  name, workdir, outdir = _get_test_dirs(testfile, False)
46
+ report_plugin_prefix = "+" if enable_report else "-"
57
47
  kws = {
58
48
  "name": name,
59
49
  "workdir": workdir,
60
50
  "outdir": outdir,
61
51
  "loglevel": loglevel,
62
- "plugins": [PipelineSucceeded, "-report"],
52
+ "plugins": [f"{report_plugin_prefix}report"],
63
53
  }
64
54
  kws.update(kwargs)
65
55
  return Pipen(**kws)
@@ -122,6 +122,9 @@ class SeuratPreparing(Proc):
122
122
  genes.
123
123
  ///
124
124
 
125
+ cell_qc_per_sample (flag): Whether to perform cell QC per sample or not.
126
+ If `True`, the cell QC will be performed per sample, and the QC will be
127
+ applied to each sample before merging.
125
128
  gene_qc (ns): Filter genes.
126
129
  `gene_qc` is applied after `cell_qc`.
127
130
  - min_cells: The minimum number of cells that a gene must be
@@ -222,6 +225,7 @@ class SeuratPreparing(Proc):
222
225
  envs = {
223
226
  "ncores": config.misc.ncores,
224
227
  "cell_qc": None, # "nFeature_RNA > 200 & percent.mt < 5",
228
+ "cell_qc_per_sample": False,
225
229
  "gene_qc": {"min_cells": 0, "excludes": []},
226
230
  "use_sct": False,
227
231
  "no_integration": False,
@@ -1483,14 +1487,17 @@ class SeuratTo10X(Proc):
1483
1487
  srtobj: The seurat object in RDS
1484
1488
 
1485
1489
  Output:
1486
- outdir: The output directory
1490
+ outdir: The output directory.
1491
+ When `envs.split_by` is specified, the subdirectories will be
1492
+ created for each distinct value of the column.
1493
+ Otherwise, the matrices will be written to the output directory.
1487
1494
 
1488
1495
  Envs:
1489
1496
  version: The version of 10X format
1490
1497
  """
1491
1498
  input = "srtobj:file"
1492
1499
  output = "outdir:dir:{{in.srtobj | stem}}"
1493
- envs = {"version": "3"}
1500
+ envs = {"version": "3", "split_by": None}
1494
1501
  lang = config.lang.rscript
1495
1502
  script = "file://../scripts/scrna/SeuratTo10X.R"
1496
1503
 
@@ -81,7 +81,7 @@ do_one_features = function(name) {
81
81
  if (case$kind %in% c("ridge", "ridgeplot")) {
82
82
  case$kind = "ridge"
83
83
  if (is.null(case$cols)) {
84
- case$cols = pal_biopipen()(32)
84
+ case$cols = pal_biopipen()(n_uidents)
85
85
  }
86
86
  excluded_args = c(excluded_args, "split.by", "reduction")
87
87
  fn = RidgePlot
@@ -4,6 +4,7 @@ library(Seurat)
4
4
  library(future)
5
5
  library(bracer)
6
6
  library(ggplot2)
7
+ library(dplyr)
7
8
  library(tidyseurat)
8
9
 
9
10
  metafile = {{in.metafile | quote}}
@@ -49,6 +50,19 @@ if (!"RNAData" %in% meta_cols) {
49
50
  stop("Error: Column `RNAData` is not found in metafile.")
50
51
  }
51
52
 
53
+ samples = as.character(metadata$Sample)
54
+
55
+ # used for plotting
56
+ cell_qc_df = NULL
57
+
58
+ plotsdir = file.path(joboutdir, "plots")
59
+ dir.create(plotsdir, showWarnings = FALSE, recursive = TRUE)
60
+
61
+ # features for cell QC
62
+ feats = c(
63
+ "nFeature_RNA", "nCount_RNA",
64
+ "percent.mt", "percent.ribo", "percent.hb", "percent.plat"
65
+ )
52
66
 
53
67
  rename_files = function(e, sample, path) {
54
68
  tmpdatadir = file.path(joboutdir, "renamed", sample)
@@ -74,6 +88,143 @@ rename_files = function(e, sample, path) {
74
88
  Read10X(data.dir = tmpdatadir)
75
89
  }
76
90
 
91
+
92
+ perform_cell_qc <- function(sobj, per_sample = FALSE) {
93
+ log_prefix = ifelse(per_sample, " ", "- ")
94
+ log_info("{log_prefix}Adding metadata for QC ...")
95
+ sobj$percent.mt = PercentageFeatureSet(sobj, pattern = "^MT-")
96
+ sobj$percent.ribo = PercentageFeatureSet(sobj, pattern = "^RP[SL]")
97
+ sobj$percent.hb = PercentageFeatureSet(sobj, pattern = "^HB[^(P)]")
98
+ sobj$percent.plat = PercentageFeatureSet(sobj, pattern = "PECAM1|PF4")
99
+
100
+ if (is.null(envs$cell_qc) || length(envs$cell_qc) == 0) {
101
+ log_warn("{log_prefix}No cell QC criteria is provided. All cells will be kept.")
102
+ cell_qc = "TRUE"
103
+ } else {
104
+ cell_qc = envs$cell_qc
105
+ }
106
+
107
+ sobj = sobj %>% mutate(.QC = !!rlang::parse_expr(cell_qc))
108
+
109
+ if (is.null(cell_qc_df)) {
110
+ cell_qc_df <<- sobj@meta.data[, c("Sample", ".QC", feats), drop = FALSE]
111
+ } else {
112
+ cell_qc_df <<- rbind(cell_qc_df, sobj@meta.data[, c("Sample", ".QC", feats), drop = FALSE])
113
+ }
114
+
115
+ # Do the filtering
116
+ log_info("{log_prefix}Filtering cells using QC criteria ...")
117
+ sobj = sobj %>% filter(.QC)
118
+ sobj$.QC = NULL
119
+
120
+ return(sobj)
121
+ }
122
+
123
+ report_cell_qc = function(ngenes) {
124
+ # uses cell_qc_df
125
+
126
+ # Violin plots
127
+ log_info("- Plotting violin plots ...")
128
+ add_report(
129
+ list(
130
+ kind = "descr",
131
+ content = paste(
132
+ "The violin plots for each feature. The cells are grouped by sample.",
133
+ "The cells that fail the QC criteria are colored in red, and",
134
+ "the cells that pass the QC criteria are colored in black.",
135
+ "The cells that fail the QC criteria are filtered out in the returned Seurat object."
136
+ )
137
+ ),
138
+ h1 = "Violin Plots"
139
+ )
140
+ for (feat in feats) {
141
+ log_info(" For feature: {feat}")
142
+ vln_p <- ggplot(cell_qc_df, aes(x = Sample, y = !!sym(feat), color = .QC)) +
143
+ geom_violin(fill = "white", width = 0.5) +
144
+ geom_jitter(width = 0.2, height = 0, alpha = 0.5) +
145
+ scale_color_manual(values = c("#181818", pal_biopipen()(1)), breaks = c(TRUE, FALSE)) +
146
+ labs(x = "Sample", y = feat) +
147
+ theme_minimal()
148
+
149
+ vlnplot = file.path(plotsdir, paste0(slugify(feat), ".vln.png"))
150
+ png(
151
+ vlnplot,
152
+ width = 800 + length(samples) * 15, height = 600, res = 100
153
+ )
154
+ print(vln_p)
155
+ dev.off()
156
+
157
+ add_report(
158
+ list(
159
+ src = vlnplot,
160
+ name = feat,
161
+ descr = paste0("Distribution of ", feat, " for each sample.")
162
+ ),
163
+ h1 = "Violin Plots",
164
+ ui = "table_of_images"
165
+ )
166
+ }
167
+
168
+ # Scatter plots against nCount_RNA
169
+ log_info("- Plotting scatter plots ...")
170
+ add_report(
171
+ list(
172
+ kind = "descr",
173
+ content = paste(
174
+ "The scatter plots for each feature against nCount_RNA. ",
175
+ "The cells that fail the QC criteria are colored in red, and",
176
+ "the cells that pass the QC criteria are colored in black.",
177
+ "The cells that fail the QC criteria are filtered out in the returned Seurat object."
178
+ )
179
+ ),
180
+ h1 = "Scatter Plots"
181
+ )
182
+ for (feat in setdiff(feats, "nCount_RNA")) {
183
+ log_info(" For feature: {feat}, against nCount_RNA")
184
+ scat_p <- ggplot(cell_qc_df, aes(x = nCount_RNA, y = !!sym(feat), color = .QC)) +
185
+ geom_point() +
186
+ scale_color_manual(values = c("#181818", pal_biopipen()(1)), breaks = c(TRUE, FALSE)) +
187
+ labs(x = "nCount_RNA", y = feat) +
188
+ theme_minimal()
189
+
190
+ scatfile = file.path(plotsdir, paste0(slugify(feat), "-nCount_RNA.scatter.png"))
191
+ png(scatfile, width = 800, height = 600, res = 100)
192
+ print(scat_p)
193
+ dev.off()
194
+
195
+ add_report(
196
+ list(
197
+ src = scatfile,
198
+ name = paste0(feat, " vs nCount_RNA"),
199
+ descr = paste0("Scatter plot for ", feat, " against nCount_RNA")
200
+ ),
201
+ h1 = "Scatter Plots",
202
+ ui = "table_of_images"
203
+ )
204
+ }
205
+
206
+ # return the dim_df calculated from the cell_qc_df
207
+ rbind(
208
+ cell_qc_df %>%
209
+ # group_by(Sample) %>%
210
+ summarise(
211
+ when = "Before_Cell_QC",
212
+ nCells = dplyr::n(),
213
+ nGenes = ngenes
214
+ ) %>%
215
+ ungroup(),
216
+ cell_qc_df %>%
217
+ filter(.QC) %>%
218
+ # group_by(Sample) %>%
219
+ summarise(
220
+ when = "After_Cell_QC",
221
+ nCells = dplyr::n(),
222
+ nGenes = ngenes
223
+ ) %>%
224
+ ungroup()
225
+ )
226
+ }
227
+
77
228
  load_sample = function(sample) {
78
229
  log_info("- Loading sample: {sample} ...")
79
230
  mdata = as.data.frame(metadata)[metadata$Sample == sample, , drop=TRUE]
@@ -114,6 +265,11 @@ load_sample = function(sample) {
114
265
  obj[[mname]] = mdt
115
266
  }
116
267
 
268
+ if (isTRUE(envs$cell_qc_per_sample)) {
269
+ log_info("- Perform cell QC for sample: {sample} ...")
270
+ obj = perform_cell_qc(obj, TRUE)
271
+ }
272
+
117
273
  if (isTRUE(envs$use_sct)) {
118
274
  # so that we have data and scale.data layers on RNA assay
119
275
  # useful for visualization in case some genes are not in
@@ -126,125 +282,20 @@ load_sample = function(sample) {
126
282
  }
127
283
 
128
284
  # Load data
129
- samples = as.character(metadata$Sample)
130
-
131
285
  log_info("Reading samples individually ...")
132
286
  obj_list = lapply(samples, load_sample)
133
287
 
134
288
  log_info("Merging samples ...")
135
289
  sobj = Reduce(merge, obj_list)
136
290
 
137
- log_info("Adding metadata for QC ...")
138
- sobj$percent.mt = PercentageFeatureSet(sobj, pattern = "^MT-")
139
- sobj$percent.ribo = PercentageFeatureSet(sobj, pattern = "^RP[SL]")
140
- sobj$percent.hb = PercentageFeatureSet(sobj, pattern = "^HB[^(P)]")
141
- sobj$percent.plat = PercentageFeatureSet(sobj, pattern = "PECAM1|PF4")
142
-
143
- dim_df = data.frame(When = "Before_QC", nCells = ncol(sobj), nGenes = nrow(sobj))
144
-
145
- if (is.null(envs$cell_qc) || length(envs$cell_qc) == 0) {
146
- log_warn("No cell QC criteria is provided. All cells will be kept.")
147
- envs$cell_qc = "TRUE"
148
- }
149
-
150
- sobj = sobj %>% mutate(.QC = !!rlang::parse_expr(envs$cell_qc))
151
- feats = c("nFeature_RNA", "nCount_RNA", "percent.mt", "percent.ribo", "percent.hb", "percent.plat")
152
- plotsdir = file.path(joboutdir, "plots")
153
- dir.create(plotsdir, showWarnings = FALSE)
154
-
155
- # Violin plots
156
- log_info("Plotting violin plots ...")
157
- add_report(
158
- list(
159
- kind = "descr",
160
- content = paste(
161
- "The violin plots for each feature. The cells are grouped by sample.",
162
- "The cells that fail the QC criteria are colored in red, and",
163
- "the cells that pass the QC criteria are colored in black.",
164
- "The cells that fail the QC criteria are filtered out in the returned Seurat object."
165
- )
166
- ),
167
- h1 = "Violin Plots"
168
- )
169
- for (feat in feats) {
170
- log_info("- For feature: {feat}")
171
- vln_p = VlnPlot(
172
- sobj,
173
- cols = rep("white", length(samples)),
174
- group.by = "Sample",
175
- features = feat,
176
- pt.size = 0) + NoLegend()
177
- vln_p$data$.QC = sobj@meta.data$.QC
178
- vln_p = vln_p + geom_jitter(
179
- aes(color = .QC),
180
- data = vln_p$data,
181
- position = position_jitterdodge(jitter.width = 0.4, dodge.width = 0.9)
182
- ) + scale_color_manual(values = c("#181818", pal_biopipen()(1)), breaks = c(TRUE, FALSE))
183
-
184
- vlnplot = file.path(plotsdir, paste0(slugify(feat), ".vln.png"))
185
- png(
186
- vlnplot,
187
- width = 800 + length(samples) * 15, height = 600, res = 100
188
- )
189
- print(vln_p)
190
- dev.off()
191
-
192
- add_report(
193
- list(
194
- src = vlnplot,
195
- name = feat,
196
- descr = paste0("Distribution of ", feat, " for each sample.")
197
- ),
198
- h1 = "Violin Plots",
199
- ui = "table_of_images"
200
- )
201
- }
202
-
203
- # Scatter plots against nCount_RNA
204
- log_info("Plotting scatter plots ...")
205
- add_report(
206
- list(
207
- kind = "descr",
208
- content = paste(
209
- "The scatter plots for each feature against nCount_RNA. ",
210
- "The cells that fail the QC criteria are colored in red, and",
211
- "the cells that pass the QC criteria are colored in black.",
212
- "The cells that fail the QC criteria are filtered out in the returned Seurat object."
213
- )
214
- ),
215
- h1 = "Scatter Plots"
216
- )
217
- for (feat in setdiff(feats, "nCount_RNA")) {
218
- log_info("- For feature: {feat}, against nCount_RNA")
219
- scat_p = FeatureScatter(
220
- sobj,
221
- feature1 = "nCount_RNA",
222
- feature2 = feat,
223
- group.by = ".QC"
224
- ) +
225
- NoLegend() +
226
- scale_color_manual(values = c("#181818", pal_biopipen()(1)), breaks = c(TRUE, FALSE))
227
-
228
- scatfile = file.path(plotsdir, paste0(slugify(feat), "-nCount_RNA.scatter.png"))
229
- png(scatfile, width = 800, height = 600, res = 100)
230
- print(scat_p)
231
- dev.off()
232
-
233
- add_report(
234
- list(
235
- src = scatfile,
236
- name = paste0(feat, " vs nCount_RNA"),
237
- descr = paste0("Scatter plot for ", feat, " against nCount_RNA")
238
- ),
239
- h1 = "Scatter Plots",
240
- ui = "table_of_images"
241
- )
291
+ if (!envs$cell_qc_per_sample) {
292
+ log_info("Performing cell QC ...")
293
+ sobj = perform_cell_qc(sobj)
242
294
  }
243
295
 
244
- # Do the filtering
245
- log_info("Filtering cells using QC criteria ...")
246
- sobj = sobj %>% filter(.QC)
247
- sobj$.QC = NULL
296
+ # plot and report the QC
297
+ log_info("Plotting and reporting QC ...")
298
+ dim_df = report_cell_qc(nrow(sobj))
248
299
 
249
300
  log_info("Filtering genes ...")
250
301
  if (is.list(envs$gene_qc)) {
@@ -271,7 +322,7 @@ if (is.list(envs$gene_qc)) {
271
322
  dim_df = rbind(
272
323
  dim_df,
273
324
  data.frame(
274
- When = "After_Gene_QC",
325
+ when = "After_Gene_QC",
275
326
  nCells = ncol(sobj),
276
327
  nGenes = nrow(sobj)
277
328
  )
@@ -0,0 +1,27 @@
1
+ library(DropletUtils)
2
+ library(Seurat)
3
+
4
+ srtobjfile = {{in.srtobj | r}}
5
+ outdir = {{out.outdir | r}}
6
+ version = {{envs.version | r}}
7
+ split_by = {{envs.split_by | r}}
8
+
9
+ srtobj = readRDS(srtobjfile)
10
+ if (!is.null(split_by)) {
11
+ # check if split_by is a valid column
12
+ if (is.null(srtobj[[split_by]])) {
13
+ stop(paste0("Column ", split_by, " not found in Seurat object"))
14
+ }
15
+
16
+ # split Seurat object by split_by column
17
+ objs <- SplitObject(srtobj, split.by = split_by)
18
+ for (s in names(objs)) {
19
+ counts <- GetAssayData(object = objs[[s]], layer = "counts")
20
+ odir <- file.path(outdir, s)
21
+ dir.create(odir, recursive = TRUE, showWarnings = FALSE)
22
+ write10xCounts(odir, counts, version = version, overwrite = TRUE)
23
+ }
24
+ } else {
25
+ counts = GetAssayData(object = srtobj, layer = "counts")
26
+ write10xCounts(outdir, counts, version = version, overwrite = TRUE)
27
+ }
@@ -52,12 +52,13 @@ do_one_group <- function(obj, features, group, outputdir, h1) {
52
52
  if (any(table(classes) < 5)) {
53
53
  msg <- paste("Group", group, "has less than 5 cells, or only 5 cells left.")
54
54
  log_warn(msg)
55
- add_report(
56
- list(kind = "error", content = msg),
57
- h1 = ifelse(is.null(h1), groupname, h1),
58
- h2 = ifelse(is.null(h1), "#", groupname)
55
+ return(
56
+ list(
57
+ list(kind = "error", content = msg),
58
+ h1 = ifelse(is.null(h1), groupname, h1),
59
+ h2 = ifelse(is.null(h1), "#", groupname)
60
+ )
59
61
  )
60
- return()
61
62
  }
62
63
 
63
64
  exprs = GetAssayData(obj)[features, , drop = FALSE]
@@ -172,12 +172,12 @@ runFGSEA = function(
172
172
 
173
173
  tablefig = file.path(outdir, "gsea_table.png")
174
174
  png(tablefig, res=100, width=1000, height=200 + 40 * length(topPathways))
175
- print(plotGseaTable(
175
+ plotGseaTable(
176
176
  envs$pathways[topPathways],
177
177
  ranks,
178
178
  gsea_res,
179
179
  gseaParam = if (!is.null(envs$gseaParam)) envs$gseaParam else 1
180
- ))
180
+ )
181
181
  dev.off()
182
182
 
183
183
  for (pathway in topPathways) {
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "biopipen"
3
- version = "0.27.4"
3
+ version = "0.27.6"
4
4
  description = "Bioinformatics processes/pipelines that can be run from `pipen run`"
5
5
  authors = ["pwwang <pwwang@pwwang.com>"]
6
6
  license = "MIT"
@@ -81,7 +81,7 @@ entry_points = \
81
81
 
82
82
  setup_kwargs = {
83
83
  'name': 'biopipen',
84
- 'version': '0.27.4',
84
+ 'version': '0.27.6',
85
85
  'description': 'Bioinformatics processes/pipelines that can be run from `pipen run`',
86
86
  'long_description': 'None',
87
87
  'author': 'pwwang',
@@ -1 +0,0 @@
1
- __version__ = "0.27.4"
@@ -1,11 +0,0 @@
1
- library(DropletUtils)
2
- library(Seurat)
3
-
4
- srtobjfile = {{in.srtobj | r}}
5
- outdir = {{out.outdir | r}}
6
- version = {{envs.version | r}}
7
-
8
- srtobj = readRDS(srtobjfile)
9
- counts = GetAssayData(object = srtobj, layer = "counts")
10
-
11
- write10xCounts(outdir, counts, version = version, overwrite = TRUE)
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes