biopipen 0.31.4__tar.gz → 0.31.5__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.31.4 → biopipen-0.31.5}/PKG-INFO +1 -1
  2. biopipen-0.31.5/biopipen/__init__.py +1 -0
  3. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/ns/bam.py +41 -0
  4. biopipen-0.31.5/biopipen/ns/protein.py +84 -0
  5. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/ns/vcf.py +1 -1
  6. biopipen-0.31.5/biopipen/reports/protein/ProdigySummary.svelte +16 -0
  7. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/bam/BamMerge.py +10 -14
  8. biopipen-0.31.5/biopipen/scripts/bam/BamSampling.py +90 -0
  9. biopipen-0.31.5/biopipen/scripts/protein/Prodigy.py +119 -0
  10. biopipen-0.31.5/biopipen/scripts/protein/ProdigySummary.R +133 -0
  11. {biopipen-0.31.4 → biopipen-0.31.5}/pyproject.toml +2 -1
  12. {biopipen-0.31.4 → biopipen-0.31.5}/setup.py +4 -1
  13. biopipen-0.31.4/biopipen/__init__.py +0 -1
  14. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/core/__init__.py +0 -0
  15. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/core/config.py +0 -0
  16. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/core/config.toml +0 -0
  17. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/core/defaults.py +0 -0
  18. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/core/filters.py +0 -0
  19. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/core/proc.py +0 -0
  20. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/core/testing.py +0 -0
  21. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/ns/__init__.py +0 -0
  22. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/ns/bed.py +0 -0
  23. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/ns/cellranger.py +0 -0
  24. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/ns/cellranger_pipeline.py +0 -0
  25. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/ns/cnv.py +0 -0
  26. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/ns/cnvkit.py +0 -0
  27. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/ns/cnvkit_pipeline.py +0 -0
  28. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/ns/delim.py +0 -0
  29. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/ns/gene.py +0 -0
  30. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/ns/gsea.py +0 -0
  31. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/ns/misc.py +0 -0
  32. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/ns/plot.py +0 -0
  33. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/ns/regulatory.py +0 -0
  34. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/ns/rnaseq.py +0 -0
  35. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/ns/scrna.py +0 -0
  36. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/ns/scrna_metabolic_landscape.py +0 -0
  37. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/ns/snp.py +0 -0
  38. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/ns/stats.py +0 -0
  39. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/ns/tcgamaf.py +0 -0
  40. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/ns/tcr.py +0 -0
  41. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/ns/web.py +0 -0
  42. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/reports/bam/CNAClinic.svelte +0 -0
  43. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/reports/bam/CNVpytor.svelte +0 -0
  44. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/reports/bam/ControlFREEC.svelte +0 -0
  45. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/reports/cellranger/CellRangerCount.svelte +0 -0
  46. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/reports/cellranger/CellRangerSummary.svelte +0 -0
  47. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/reports/cellranger/CellRangerVdj.svelte +0 -0
  48. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/reports/cnv/AneuploidyScore.svelte +0 -0
  49. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/reports/cnv/AneuploidyScoreSummary.svelte +0 -0
  50. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/reports/cnv/TMADScoreSummary.svelte +0 -0
  51. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/reports/cnvkit/CNVkitDiagram.svelte +0 -0
  52. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/reports/cnvkit/CNVkitHeatmap.svelte +0 -0
  53. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/reports/cnvkit/CNVkitScatter.svelte +0 -0
  54. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/reports/delim/SampleInfo.svelte +0 -0
  55. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/reports/gsea/FGSEA.svelte +0 -0
  56. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/reports/gsea/GSEA.svelte +0 -0
  57. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/reports/scrna/CellsDistribution.svelte +0 -0
  58. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/reports/scrna/DimPlots.svelte +0 -0
  59. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/reports/scrna/MarkersFinder.svelte +0 -0
  60. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/reports/scrna/MetaMarkers.svelte +0 -0
  61. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/reports/scrna/RadarPlots.svelte +0 -0
  62. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/reports/scrna/ScFGSEA.svelte +0 -0
  63. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/reports/scrna/SeuratClusterStats.svelte +0 -0
  64. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/reports/scrna/SeuratMap2Ref.svelte +0 -0
  65. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/reports/scrna/SeuratPreparing.svelte +0 -0
  66. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/reports/scrna/TopExpressingGenes.svelte +0 -0
  67. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/reports/scrna_metabolic_landscape/MetabolicFeatures.svelte +0 -0
  68. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/reports/scrna_metabolic_landscape/MetabolicFeaturesIntraSubset.svelte +0 -0
  69. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/reports/scrna_metabolic_landscape/MetabolicPathwayActivity.svelte +0 -0
  70. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/reports/scrna_metabolic_landscape/MetabolicPathwayHeterogeneity.svelte +0 -0
  71. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/reports/snp/PlinkCallRate.svelte +0 -0
  72. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/reports/snp/PlinkFreq.svelte +0 -0
  73. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/reports/snp/PlinkHWE.svelte +0 -0
  74. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/reports/snp/PlinkHet.svelte +0 -0
  75. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/reports/snp/PlinkIBD.svelte +0 -0
  76. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/reports/tcr/CDR3AAPhyschem.svelte +0 -0
  77. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/reports/tcr/CloneResidency.svelte +0 -0
  78. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/reports/tcr/Immunarch.svelte +0 -0
  79. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/reports/tcr/SampleDiversity.svelte +0 -0
  80. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/reports/tcr/TCRClusterStats.svelte +0 -0
  81. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/reports/tcr/TESSA.svelte +0 -0
  82. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/reports/tcr/VJUsage.svelte +0 -0
  83. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/reports/utils/gsea.liq +0 -0
  84. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/reports/utils/misc.liq +0 -0
  85. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/reports/vcf/TruvariBenchSummary.svelte +0 -0
  86. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/reports/vcf/TruvariConsistency.svelte +0 -0
  87. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/bam/BamSplitChroms.py +0 -0
  88. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/bam/CNAClinic.R +0 -0
  89. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/bam/CNVpytor.py +0 -0
  90. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/bam/ControlFREEC.py +0 -0
  91. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/bed/Bed2Vcf.py +0 -0
  92. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/bed/BedConsensus.py +0 -0
  93. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/bed/BedLiftOver.sh +0 -0
  94. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/bed/BedtoolsIntersect.py +0 -0
  95. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/bed/BedtoolsMerge.py +0 -0
  96. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/cellranger/CellRangerCount.py +0 -0
  97. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/cellranger/CellRangerSummary.R +0 -0
  98. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/cellranger/CellRangerVdj.py +0 -0
  99. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/cnv/AneuploidyScore.R +0 -0
  100. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/cnv/AneuploidyScoreSummary.R +0 -0
  101. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/cnv/TMADScore.R +0 -0
  102. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/cnv/TMADScoreSummary.R +0 -0
  103. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/cnvkit/CNVkitAccess.py +0 -0
  104. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/cnvkit/CNVkitAutobin.py +0 -0
  105. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/cnvkit/CNVkitBatch.py +0 -0
  106. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/cnvkit/CNVkitCall.py +0 -0
  107. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/cnvkit/CNVkitCoverage.py +0 -0
  108. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/cnvkit/CNVkitDiagram.py +0 -0
  109. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/cnvkit/CNVkitFix.py +0 -0
  110. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/cnvkit/CNVkitGuessBaits.py +0 -0
  111. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/cnvkit/CNVkitHeatmap.py +0 -0
  112. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/cnvkit/CNVkitReference.py +0 -0
  113. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/cnvkit/CNVkitScatter.py +0 -0
  114. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/cnvkit/CNVkitSegment.py +0 -0
  115. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/cnvkit/guess_baits.py +0 -0
  116. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/delim/RowsBinder.R +0 -0
  117. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/delim/SampleInfo.R +0 -0
  118. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/gene/GeneNameConversion.R +0 -0
  119. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/gene/GenePromoters.R +0 -0
  120. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/gsea/Enrichr.R +0 -0
  121. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/gsea/FGSEA.R +0 -0
  122. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/gsea/GSEA.R +0 -0
  123. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/gsea/PreRank.R +0 -0
  124. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/misc/Config2File.py +0 -0
  125. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/misc/Shell.sh +0 -0
  126. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/misc/Str2File.py +0 -0
  127. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/plot/Heatmap.R +0 -0
  128. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/plot/Manhattan.R +0 -0
  129. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/plot/QQPlot.R +0 -0
  130. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/plot/ROC.R +0 -0
  131. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/plot/Scatter.R +0 -0
  132. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/plot/VennDiagram.R +0 -0
  133. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/regulatory/MotifAffinityTest.R +0 -0
  134. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/regulatory/MotifAffinityTest_AtSNP.R +0 -0
  135. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/regulatory/MotifAffinityTest_MotifBreakR.R +0 -0
  136. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/regulatory/MotifScan.py +0 -0
  137. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/regulatory/atSNP.R +0 -0
  138. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/regulatory/motifBreakR.R +0 -0
  139. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/rnaseq/Simulation-ESCO.R +0 -0
  140. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/rnaseq/Simulation-RUVcorr.R +0 -0
  141. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/rnaseq/Simulation.R +0 -0
  142. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/rnaseq/UnitConversion.R +0 -0
  143. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/scrna/AnnData2Seurat.R +0 -0
  144. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/scrna/CellTypeAnnotation-celltypist.R +0 -0
  145. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/scrna/CellTypeAnnotation-common.R +0 -0
  146. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/scrna/CellTypeAnnotation-direct.R +0 -0
  147. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/scrna/CellTypeAnnotation-hitype.R +0 -0
  148. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/scrna/CellTypeAnnotation-sccatch.R +0 -0
  149. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/scrna/CellTypeAnnotation-sctype.R +0 -0
  150. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/scrna/CellTypeAnnotation.R +0 -0
  151. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/scrna/CellsDistribution.R +0 -0
  152. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/scrna/DimPlots.R +0 -0
  153. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/scrna/ExprImputation-alra.R +0 -0
  154. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/scrna/ExprImputation-rmagic.R +0 -0
  155. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/scrna/ExprImputation-scimpute.R +0 -0
  156. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/scrna/ExprImputation.R +0 -0
  157. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/scrna/MarkersFinder.R +0 -0
  158. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/scrna/MetaMarkers.R +0 -0
  159. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/scrna/ModuleScoreCalculator.R +0 -0
  160. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/scrna/RadarPlots.R +0 -0
  161. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/scrna/SCImpute.R +0 -0
  162. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/scrna/ScFGSEA.R +0 -0
  163. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/scrna/ScSimulation.R +0 -0
  164. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/scrna/Seurat2AnnData.R +0 -0
  165. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/scrna/SeuratClusterStats-clustree.R +0 -0
  166. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/scrna/SeuratClusterStats-dimplots.R +0 -0
  167. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/scrna/SeuratClusterStats-features.R +0 -0
  168. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/scrna/SeuratClusterStats-hists.R +0 -0
  169. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/scrna/SeuratClusterStats-ngenes.R +0 -0
  170. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/scrna/SeuratClusterStats-stats.R +0 -0
  171. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/scrna/SeuratClusterStats.R +0 -0
  172. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/scrna/SeuratClustering-common.R +0 -0
  173. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/scrna/SeuratClustering.R +0 -0
  174. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/scrna/SeuratFilter.R +0 -0
  175. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/scrna/SeuratLoading.R +0 -0
  176. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/scrna/SeuratMap2Ref.R +0 -0
  177. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/scrna/SeuratMetadataMutater.R +0 -0
  178. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/scrna/SeuratPreparing-common.R +0 -0
  179. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/scrna/SeuratPreparing-doublet_detection.R +0 -0
  180. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/scrna/SeuratPreparing.R +0 -0
  181. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/scrna/SeuratSplit.R +0 -0
  182. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/scrna/SeuratSubClustering.R +0 -0
  183. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/scrna/SeuratSubset.R +0 -0
  184. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/scrna/SeuratTo10X.R +0 -0
  185. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/scrna/Subset10X.R +0 -0
  186. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/scrna/TopExpressingGenes.R +0 -0
  187. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/scrna/celltypist-wrapper.py +0 -0
  188. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/scrna/sctype.R +0 -0
  189. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/scrna_metabolic_landscape/MetabolicFeatures.R +0 -0
  190. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/scrna_metabolic_landscape/MetabolicFeaturesIntraSubset.R +0 -0
  191. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/scrna_metabolic_landscape/MetabolicPathwayActivity.R +0 -0
  192. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/scrna_metabolic_landscape/MetabolicPathwayHeterogeneity.R +0 -0
  193. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/snp/MatrixEQTL.R +0 -0
  194. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/snp/Plink2GTMat.py +0 -0
  195. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/snp/PlinkCallRate.R +0 -0
  196. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/snp/PlinkFilter.py +0 -0
  197. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/snp/PlinkFreq.R +0 -0
  198. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/snp/PlinkFromVcf.py +0 -0
  199. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/snp/PlinkHWE.R +0 -0
  200. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/snp/PlinkHet.R +0 -0
  201. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/snp/PlinkIBD.R +0 -0
  202. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/snp/PlinkSimulation.py +0 -0
  203. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/snp/PlinkUpdateName.py +0 -0
  204. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/stats/ChowTest.R +0 -0
  205. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/stats/DiffCoexpr.R +0 -0
  206. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/stats/LiquidAssoc.R +0 -0
  207. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/stats/Mediation.R +0 -0
  208. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/stats/MetaPvalue.R +0 -0
  209. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/stats/MetaPvalue1.R +0 -0
  210. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/tcgamaf/Maf2Vcf.py +0 -0
  211. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/tcgamaf/MafAddChr.py +0 -0
  212. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/tcgamaf/maf2vcf.pl +0 -0
  213. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/tcr/Attach2Seurat.R +0 -0
  214. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/tcr/CDR3AAPhyschem.R +0 -0
  215. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/tcr/CloneResidency.R +0 -0
  216. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/tcr/CloneSizeQQPlot.R +0 -0
  217. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/tcr/GIANA/GIANA.py +0 -0
  218. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/tcr/GIANA/GIANA4.py +0 -0
  219. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/tcr/GIANA/Imgt_Human_TRBV.fasta +0 -0
  220. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/tcr/GIANA/query.py +0 -0
  221. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/tcr/Immunarch-basic.R +0 -0
  222. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/tcr/Immunarch-clonality.R +0 -0
  223. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/tcr/Immunarch-diversity.R +0 -0
  224. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/tcr/Immunarch-geneusage.R +0 -0
  225. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/tcr/Immunarch-kmer.R +0 -0
  226. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/tcr/Immunarch-overlap.R +0 -0
  227. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/tcr/Immunarch-spectratyping.R +0 -0
  228. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/tcr/Immunarch-tracking.R +0 -0
  229. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/tcr/Immunarch-vjjunc.R +0 -0
  230. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/tcr/Immunarch.R +0 -0
  231. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/tcr/Immunarch2VDJtools.R +0 -0
  232. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/tcr/ImmunarchFilter.R +0 -0
  233. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/tcr/ImmunarchLoading.R +0 -0
  234. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/tcr/ImmunarchSplitIdents.R +0 -0
  235. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/tcr/SampleDiversity.R +0 -0
  236. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/tcr/TCRClusterStats.R +0 -0
  237. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/tcr/TCRClustering.R +0 -0
  238. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/tcr/TCRDock.py +0 -0
  239. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/tcr/TESSA.R +0 -0
  240. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/tcr/TESSA_source/Atchley_factors.csv +0 -0
  241. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/tcr/TESSA_source/BriseisEncoder.py +0 -0
  242. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/tcr/TESSA_source/MCMC_control.R +0 -0
  243. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/tcr/TESSA_source/TrainedEncoder.h5 +0 -0
  244. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/tcr/TESSA_source/fixed_b.csv +0 -0
  245. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/tcr/TESSA_source/initialization.R +0 -0
  246. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/tcr/TESSA_source/post_analysis.R +0 -0
  247. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/tcr/TESSA_source/real_data.R +0 -0
  248. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/tcr/TESSA_source/update.R +0 -0
  249. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/tcr/TESSA_source/utility.R +0 -0
  250. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/tcr/VJUsage.R +0 -0
  251. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/tcr/immunarch-patched.R +0 -0
  252. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/tcr/vdjtools-patch.sh +0 -0
  253. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/vcf/BcftoolsAnnotate.py +0 -0
  254. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/vcf/BcftoolsFilter.py +0 -0
  255. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/vcf/BcftoolsSort.py +0 -0
  256. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/vcf/BcftoolsView.py +0 -0
  257. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/vcf/TruvariBench.sh +0 -0
  258. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/vcf/TruvariBenchSummary.R +0 -0
  259. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/vcf/TruvariConsistency.R +0 -0
  260. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/vcf/Vcf2Bed.py +0 -0
  261. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/vcf/VcfAnno.py +0 -0
  262. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/vcf/VcfDownSample.sh +0 -0
  263. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/vcf/VcfFilter.py +0 -0
  264. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/vcf/VcfFix.py +0 -0
  265. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/vcf/VcfFix_utils.py +0 -0
  266. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/vcf/VcfIndex.py +0 -0
  267. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/vcf/VcfIntersect.py +0 -0
  268. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/vcf/VcfLiftOver.sh +0 -0
  269. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/vcf/VcfSplitSamples.py +0 -0
  270. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/vcf/bcftools_utils.py +0 -0
  271. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/web/Download.py +0 -0
  272. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/web/DownloadList.py +0 -0
  273. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/web/GCloudStorageDownloadBucket.py +0 -0
  274. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/web/GCloudStorageDownloadFile.py +0 -0
  275. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/scripts/web/gcloud_common.py +0 -0
  276. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/utils/__init__.py +0 -0
  277. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/utils/caching.R +0 -0
  278. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/utils/common_docstrs.py +0 -0
  279. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/utils/gene.R +0 -0
  280. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/utils/gene.py +0 -0
  281. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/utils/gsea.R +0 -0
  282. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/utils/io.R +0 -0
  283. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/utils/misc.R +0 -0
  284. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/utils/misc.py +0 -0
  285. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/utils/mutate_helpers.R +0 -0
  286. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/utils/plot.R +0 -0
  287. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/utils/reference.py +0 -0
  288. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/utils/rnaseq.R +0 -0
  289. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/utils/single_cell.R +0 -0
  290. {biopipen-0.31.4 → biopipen-0.31.5}/biopipen/utils/vcf.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: biopipen
3
- Version: 0.31.4
3
+ Version: 0.31.5
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.31.5"
@@ -260,3 +260,44 @@ class BamMerge(Proc):
260
260
  "sort_args": [],
261
261
  }
262
262
  script = "file://../scripts/bam/BamMerge.py"
263
+
264
+
265
+ class BamSampling(Proc):
266
+ """Keeping only a fraction of read pairs from a bam file
267
+
268
+ Input:
269
+ bamfile: The bam file
270
+
271
+ Output:
272
+ outfile: The output bam file
273
+
274
+ Envs:
275
+ ncores: Number of cores to use
276
+ samtools: Path to samtools executable
277
+ tool: The tool to use, currently only "samtools" is supported
278
+ fraction (type=float): The fraction of reads to keep.
279
+ If `0 < fraction <= 1`, it's the fraction of reads to keep.
280
+ If `fraction > 1`, it's the number of reads to keep.
281
+ Note that when fraction > 1, you may not get the exact number
282
+ of reads specified but a close number.
283
+ seed: The seed for random number generator
284
+ index: Whether to index the output bam file
285
+ sort: Whether to sort the output bam file
286
+ sort_args: The arguments for sorting bam file using `samtools sort`.
287
+ These keys are not allowed: `-o`, `-@`,
288
+ and `--threads`, as they are managed by the script.
289
+ """
290
+ input = "bamfile:file"
291
+ output = "outfile:file:{{in.bamfile | stem}}.sampled{{envs.fraction}}.bam"
292
+ lang = config.lang.python
293
+ envs = {
294
+ "ncores": config.misc.ncores,
295
+ "samtools": config.exe.samtools,
296
+ "tool": "samtools",
297
+ "fraction": None,
298
+ "seed": 8525,
299
+ "index": True,
300
+ "sort": True,
301
+ "sort_args": [],
302
+ }
303
+ script = "file://../scripts/bam/BamSampling.py"
@@ -0,0 +1,84 @@
1
+ """Protein-related processes."""
2
+ from ..core.proc import Proc
3
+ from ..core.config import config
4
+
5
+
6
+ class Prodigy(Proc):
7
+ """Prediction of binding affinity of protein-protein complexes based on
8
+ intermolecular contacts using Prodigy.
9
+
10
+ See <https://rascar.science.uu.nl/prodigy/> and
11
+ <https://github.com/haddocking/prodigy>.
12
+
13
+ `prodigy-prot` must be installed under the given python of `proc.lang`.
14
+
15
+ Input:
16
+ infile: The structure file in PDB or mmCIF format.
17
+
18
+ Output:
19
+ outfile: The output file generated by Prodigy.
20
+ outdir: The output directory containing all output files.
21
+
22
+ Envs:
23
+ distance_cutoff (type=float): The distance cutoff to calculate intermolecular
24
+ contacts.
25
+ acc_threshold (type=float): The accessibility threshold for BSA analysis.
26
+ temperature (type=float): The temperature (C) for Kd prediction.
27
+ contact_list (flag): Whether to generate contact list.
28
+ pymol_selection (flag): Whether output a script to highlight the interface
29
+ residues in PyMOL.
30
+ selection (list): The selection of the chains to analyze.
31
+ `['A', 'B']` will analyze chains A and B.
32
+ `['A,B', 'C']` will analyze chain A and C; and B and C.
33
+ `['A', 'B', 'C']` will analyze all combinations of A, B, and C.
34
+ outtype (choice): Set the format of the output file (`out.outfile`).
35
+ All three files will be generated. This option only determines which
36
+ is assigned to `out.outfile`.
37
+ - raw: The raw output file from prodigy.
38
+ - json: The output file in JSON format.
39
+ - tsv: The output file in CSV format.
40
+ """
41
+ input = "infile:file"
42
+ output = [
43
+ "outfile:file:{{in.infile | stem}}_prodigy/"
44
+ "{{in.infile | stem}}.{{envs.outtype if envs.outtype != 'raw' else 'out'}}",
45
+ "outdir:dir:{{in.infile | stem}}_prodigy",
46
+ ]
47
+ lang = config.lang.python
48
+ envs = {
49
+ "distance_cutoff": 5.5,
50
+ "acc_threshold": 0.05,
51
+ "temperature": 25.0,
52
+ "contact_list": True,
53
+ "pymol_selection": True,
54
+ "selection": None,
55
+ "outtype": "json",
56
+ }
57
+ script = "file://../scripts/protein/Prodigy.py"
58
+
59
+
60
+ class ProdigySummary(Proc):
61
+ """Summary of the output from `Prodigy`.
62
+
63
+ Input:
64
+ infiles: The output json file generated by `Prodigy`.
65
+
66
+ Output:
67
+ outdir: The directory of summary files generated by `ProdigySummary`.
68
+
69
+ Envs:
70
+ group (type=auto): The group of the samples for boxplots.
71
+ If `None`, don't do boxplots.
72
+ It can be a dict of group names and sample names, e.g.
73
+ `{"group1": ["sample1", "sample2"], "group2": ["sample3"]}`
74
+ or a file containing the group information, with the first column
75
+ being the sample names and the second column being the group names.
76
+ The file should be tab-delimited with no header.
77
+ """
78
+ input = "infiles:files"
79
+ input_data = lambda ch: [[f"{odir}/_prodigy.tsv" for odir in ch.outdir]]
80
+ output = "outdir:dir:prodigy_summary"
81
+ lang = config.lang.rscript
82
+ envs = {"group": None}
83
+ script = "file://../scripts/protein/ProdigySummary.R"
84
+ plugin_opts = {"report": "file://../reports/protein/ProdigySummary.svelte"}
@@ -463,7 +463,7 @@ class BcftoolsAnnotate(Proc):
463
463
  columns (auto): Comma-separated or list of columns or tags to carry over from
464
464
  the annotation file. Overrides `-c, --columns`
465
465
  remove (auto): Remove the specified columns from the input file
466
- header (type=list): Headers to be added
466
+ header (list): Headers to be added
467
467
  gz (flag): Whether to gzip the output file
468
468
  index (flag): Whether to index the output file (tbi) (`envs.gz` forced to True)
469
469
  <more>: Other arguments for `bcftools annotate`
@@ -0,0 +1,16 @@
1
+ {% from "utils/misc.liq" import report_jobs -%}
2
+
3
+ <script>
4
+ import { Image, DataTable, Descr } from "$libs";
5
+ </script>
6
+
7
+ {%- macro report_job(job, h=1) -%}
8
+ {{ job | render_job: h=h }}
9
+ {%- endmacro -%}
10
+
11
+
12
+ {%- macro head_job(job) -%}
13
+ <h1>{{job.out.outdir | stem | escape}}</h1>
14
+ {%- endmacro -%}
15
+
16
+ {{ report_jobs(jobs, head_job, report_job) }}
@@ -1,7 +1,7 @@
1
1
  from pathlib import Path
2
- from biopipen.utils.misc import run_command
2
+ from biopipen.utils.misc import run_command, logger
3
3
 
4
- bamfiles = {{in.bamfiles | repr}} # pyright: ignore
4
+ bamfiles = {{in.bamfiles | repr}} # pyright: ignore # noqa
5
5
  outfile = Path({{out.outfile | repr}}) # pyright: ignore
6
6
  ncores = {{envs.ncores | int}} # pyright: ignore
7
7
  tool = {{envs.tool | quote}} # pyright: ignore
@@ -18,7 +18,7 @@ if should_index and not should_sort:
18
18
 
19
19
  def use_samtools():
20
20
  """Use samtools to merge bam files"""
21
- print("Using samtools")
21
+ logger.info("Using samtools ...")
22
22
  ofile = (
23
23
  outfile
24
24
  if not should_sort
@@ -43,11 +43,11 @@ def use_samtools():
43
43
  *merge_args,
44
44
  *bamfiles,
45
45
  ]
46
- print("- Merging")
46
+ logger.info("- Merging the bam files ...")
47
47
  run_command(cmd)
48
48
 
49
49
  if should_sort:
50
- print("- Sorting")
50
+ logger.info("- Sorting the merged bam file ...")
51
51
  for key in ["-o", "-@", "--threads"]:
52
52
  if key in sort_args:
53
53
  raise ValueError(
@@ -67,16 +67,14 @@ def use_samtools():
67
67
  run_command(cmd)
68
68
 
69
69
  if should_index:
70
- print("- Indexing")
70
+ logger.info("- Indexing the output bam file ...")
71
71
  cmd = [samtools, "index", "-@", ncores, outfile]
72
72
  run_command(cmd)
73
73
 
74
- print("Done")
75
-
76
74
 
77
75
  def use_sambamba():
78
76
  """Use sambamba to merge bam files"""
79
- print("Using sambamba")
77
+ logger.info("Using sambamba ...")
80
78
  ofile = (
81
79
  outfile
82
80
  if not should_sort
@@ -90,11 +88,11 @@ def use_sambamba():
90
88
  )
91
89
 
92
90
  cmd = [sambamba, "merge", "-t", ncores, *merge_args, ofile, *bamfiles]
93
- print("- Merging")
91
+ logger.info("- Merging the bam files ...")
94
92
  run_command(cmd)
95
93
 
96
94
  if should_sort:
97
- print("- Sorting")
95
+ logger.info("- Sorting the merged bam file ...")
98
96
  for key in ["-t", "--nthreads", "-o", "--out"]:
99
97
  if key in sort_args:
100
98
  raise ValueError(
@@ -115,12 +113,10 @@ def use_sambamba():
115
113
  run_command(cmd)
116
114
 
117
115
  if should_index:
118
- print("- Indexing")
116
+ logger.info("- Indexing the output bam file ...")
119
117
  cmd = [sambamba, "index", "-t", ncores, outfile]
120
118
  run_command(cmd)
121
119
 
122
- print("Done")
123
-
124
120
 
125
121
  if __name__ == "__main__":
126
122
  if tool == "samtools":
@@ -0,0 +1,90 @@
1
+ from pathlib import Path
2
+ from biopipen.utils.misc import run_command, logger
3
+
4
+ # using:
5
+ # samtools view --subsample 0.1 --subsample-seed 1234 --threads 4 -b -o out.bam in.bam
6
+
7
+ bamfile = {{ in.bamfile | repr }} # pyright: ignore # noqa
8
+ outfile = Path({{ out.outfile | repr }}) # pyright: ignore
9
+ ncores = {{ envs.ncores | int }} # pyright: ignore
10
+ samtools = {{ envs.samtools | repr }} # pyright: ignore
11
+ tool = {{ envs.tool | repr }} # pyright: ignore
12
+ fraction = {{ envs.fraction | repr }} # pyright: ignore
13
+ seed = {{ envs.seed | int }} # pyright: ignore
14
+ should_index = {{ envs.index | repr }} # pyright: ignore
15
+ should_sort = {{ envs.sort | repr }} # pyright: ignore
16
+ sort_args = {{ envs.sort_args | repr }} # pyright: ignore
17
+
18
+ if should_index and not should_sort:
19
+ raise ValueError("Indexing requires sorting")
20
+
21
+ if fraction is None:
22
+ raise ValueError("'envs.fraction' must be provided.")
23
+
24
+ if tool != "samtools":
25
+ raise ValueError(
26
+ f"Tool {tool} is not supported. "
27
+ "Currently only samtools is supported."
28
+ )
29
+
30
+ if fraction > 1:
31
+ # calculate the fraction based on the number of reads
32
+ logger.info("Converting fraction > 1 to a fraction of reads.")
33
+ cmd = [
34
+ samtools,
35
+ "view",
36
+ "--threads",
37
+ ncores,
38
+ "-c",
39
+ bamfile
40
+ ]
41
+ nreads = run_command(cmd, stdout="return").strip()
42
+ fraction = fraction / float(int(nreads))
43
+
44
+ ofile = (
45
+ outfile
46
+ if not should_sort
47
+ else outfile.with_stem(f"{outfile.stem}.unsorted")
48
+ )
49
+
50
+ cmd = [
51
+ samtools,
52
+ "view",
53
+ "--subsample",
54
+ fraction,
55
+ "--subsample-seed",
56
+ seed,
57
+ "--threads",
58
+ ncores,
59
+ "-b",
60
+ "-o",
61
+ ofile,
62
+ bamfile
63
+ ]
64
+ run_command(cmd, fg=True)
65
+
66
+ if should_sort:
67
+ logger.info("Sorting the output bam file.")
68
+ for key in ["-o", "-@", "--threads"]:
69
+ if key in sort_args:
70
+ raise ValueError(
71
+ f"envs.sort_args cannot contain {key}, "
72
+ "which is managed by the script"
73
+ )
74
+
75
+ cmd = [
76
+ samtools,
77
+ "sort",
78
+ "-@",
79
+ ncores,
80
+ *sort_args,
81
+ "-o",
82
+ outfile,
83
+ ofile
84
+ ]
85
+ run_command(cmd, fg=True)
86
+
87
+ if should_index:
88
+ logger.info("Indexing the output bam file.")
89
+ cmd = [samtools, "index", "-@", ncores, outfile]
90
+ run_command(cmd, fg=True)
@@ -0,0 +1,119 @@
1
+ import json
2
+ import logging
3
+ import sys
4
+ from pathlib import Path
5
+ from prodigy_prot.predict_IC import (
6
+ Prodigy,
7
+ check_path,
8
+ parse_structure,
9
+ )
10
+
11
+ infile = {{in.infile | repr}} # pyright: ignore # noqa
12
+ outfile = {{out.outfile | repr}} # pyright: ignore
13
+ outdir = {{out.outdir | repr}} # pyright: ignore
14
+ distance_cutoff = {{envs.distance_cutoff | float}} # pyright: ignore
15
+ acc_threshold = {{envs.acc_threshold | float}} # pyright: ignore
16
+ temperature = {{envs.temperature | float}} # pyright: ignore
17
+ contact_list = {{envs.contact_list | repr}} # pyright: ignore
18
+ pymol_selection = {{envs.pymol_selection | repr}} # pyright: ignore
19
+ selection = {{envs.selection | repr}} # pyright: ignore
20
+ outtype = {{envs.outtype | repr}} # pyright: ignore
21
+
22
+ raw_outfile = Path(outdir) / "_prodigy_raw.txt"
23
+ json_outfile = Path(outdir) / "_prodigy.json"
24
+ tsv_outfile = Path(outdir) / "_prodigy.tsv"
25
+
26
+ # log to the raw_outfile
27
+ logging.basicConfig(level=logging.INFO, stream=sys.stdout, format="%(message)s")
28
+ logger = logging.getLogger("Prodigy")
29
+
30
+ if isinstance(selection, str):
31
+ selection = [selection]
32
+
33
+ struct_path = check_path(infile)
34
+
35
+ # parse structure
36
+ structure, n_chains, n_res = parse_structure(struct_path)
37
+ logger.info(
38
+ "[+] Parsed structure file {0} ({1} chains, {2} residues)".format(
39
+ structure.id, n_chains, n_res
40
+ )
41
+ )
42
+ prodigy = Prodigy(structure, selection, temperature)
43
+ prodigy.predict(distance_cutoff=distance_cutoff, acc_threshold=acc_threshold)
44
+ prodigy.print_prediction(outfile=raw_outfile, quiet=False)
45
+
46
+ # Print out interaction network
47
+ if contact_list:
48
+ prodigy.print_contacts(f"{outdir}/prodigy.ic")
49
+
50
+ # Print out interaction network
51
+ if pymol_selection:
52
+ prodigy.print_pymol_script(f"{outdir}/prodigy.pml")
53
+
54
+ # [+] Reading structure file: <path/to/structure.cif>
55
+ # [+] Parsed structure file <structure> (4 chains, 411 residues)
56
+ # [+] No. of intermolecular contacts: 191
57
+ # [+] No. of charged-charged contacts: 17
58
+ # [+] No. of charged-polar contacts: 18
59
+ # [+] No. of charged-apolar contacts: 60
60
+ # [+] No. of polar-polar contacts: 5
61
+ # [+] No. of apolar-polar contacts: 41
62
+ # [+] No. of apolar-apolar contacts: 50
63
+ # [+] Percentage of apolar NIS residues: 33.90
64
+ # [+] Percentage of charged NIS residues: 30.48
65
+ # [++] Predicted binding affinity (kcal.mol-1): -21.3
66
+ # [++] Predicted dissociation constant (M) at 25.0˚C: 2.3e-16
67
+
68
+ output = {}
69
+ with open(raw_outfile, "r") as f:
70
+ for line in f:
71
+ if line.startswith("[+"):
72
+ line = line.lstrip("[").lstrip("+").lstrip("]").lstrip()
73
+ if line.startswith("Reading structure file"):
74
+ continue
75
+ if line.startswith("Parsed structure file"):
76
+ continue
77
+
78
+ key, value = line.split(":", 1)
79
+ key = key.strip()
80
+ value = value.strip()
81
+ if key == "No. of intermolecular contacts":
82
+ output["nIC"] = int(value)
83
+ elif key == "No. of charged-charged contacts":
84
+ output["nCCC"] = int(value)
85
+ elif key == "No. of charged-polar contacts":
86
+ output["nCPC"] = int(value)
87
+ elif key == "No. of charged-apolar contacts":
88
+ output["nCAPC"] = int(value)
89
+ elif key == "No. of polar-polar contacts":
90
+ output["nPPC"] = int(value)
91
+ elif key == "No. of apolar-polar contacts":
92
+ output["nAPPC"] = int(value)
93
+ elif key == "No. of apolar-apolar contacts":
94
+ output["nAPAPC"] = int(value)
95
+ elif key.startswith("Percentage of apolar NIS residues"):
96
+ output["pANISR"] = float(value)
97
+ elif key.startswith("Percentage of charged NIS residues"):
98
+ output["pCNISR"] = float(value)
99
+ elif key.startswith("Predicted binding affinity"):
100
+ output["BindingAffinity"] = float(value)
101
+ elif key.startswith("Predicted dissociation constant"):
102
+ output["DissociationConstant"] = float(value)
103
+
104
+ with open(json_outfile, "w") as f:
105
+ json.dump(output, f, indent=2)
106
+
107
+ with open(tsv_outfile, "w") as f:
108
+ f.write("\t".join(output.keys()) + "\n")
109
+ f.write("\t".join(map(str, output.values())) + "\n")
110
+
111
+ if outtype == "json":
112
+ json_outfile.rename(outfile)
113
+ json_outfile.symlink_to(outfile)
114
+ elif outtype == "tsv":
115
+ tsv_outfile.rename(outfile)
116
+ tsv_outfile.symlink_to(outfile)
117
+ else:
118
+ raw_outfile.rename(outfile)
119
+ raw_outfile.symlink_to(outfile)
@@ -0,0 +1,133 @@
1
+ {{ biopipen_dir | joinpaths: "utils", "misc.R" | source_r }}
2
+
3
+ library(rlang)
4
+ library(dplyr)
5
+ library(ggplot2)
6
+ library(ggprism)
7
+
8
+ theme_set(theme_prism())
9
+
10
+ infiles <- {{in.infiles | r}}
11
+ outdir <- {{out.outdir | r}}
12
+ joboutdir <- {{job.outdir | r}}
13
+ group <- {{envs.group | r}}
14
+
15
+ if (is.character(group)) {
16
+ group <- read.csv(group, header = FALSE, row.names = NULL)
17
+ colnames(group) <- c("Sample", "Group")
18
+ } else if (is.list(group)) {
19
+ group <- do_call(
20
+ rbind,
21
+ lapply(names(group), function(n) data.frame(Sample = group[[n]], Group = n))
22
+ )
23
+ } else if (!is.null(group)) {
24
+ stop(paste0("Invalid group: ", paste0(group, collapse = ", ")))
25
+ }
26
+
27
+ log_info("Reading and merging metrics for each sample ...")
28
+ metrics <- NULL
29
+
30
+ for (infile in infiles) {
31
+ sample <- sub("_prodigy$", "", basename(dirname(infile)))
32
+ log_debug("- Reading metrics from {sample}")
33
+ metric <- read.table(
34
+ infile,
35
+ header = TRUE,
36
+ sep = "\t",
37
+ stringsAsFactors = FALSE,
38
+ check.names = FALSE,
39
+ row.names = NULL)
40
+ metric$Sample <- sample
41
+ metric <- metric %>% select(Sample, everything())
42
+ if (is.null(metrics)) {
43
+ metrics <- metric
44
+ } else {
45
+ metrics <- rbind(metrics, metric)
46
+ }
47
+ }
48
+
49
+ # Save metrics
50
+ write.table(
51
+ metrics,
52
+ file.path(outdir, "metrics.txt"),
53
+ sep = "\t",
54
+ quote = FALSE,
55
+ row.names = FALSE
56
+ )
57
+
58
+ add_report(
59
+ list(kind = "descr", content = "Metrics for all samples"),
60
+ list(kind = "table", src = file.path(outdir, "metrics.txt")),
61
+ h1 = "Metrics of all samples"
62
+ )
63
+
64
+ METRIC_DESCR = list(
65
+ nIC = "No. of intermolecular contacts",
66
+ nCCC = "No. of charged-charged contacts",
67
+ nCPC = "No. of charged-polar contacts",
68
+ nCAPC = "No. of charged-apolar contacts",
69
+ nPPC = "No. of polar-polar contacts",
70
+ nAPPC = "No. of apolar-polar contacts",
71
+ nAPAPC = "No. of apolar-apolar contacts",
72
+ pANISR = "Percentage of apolar NIS residues",
73
+ pCNISR = "Percentage of charged NIS residues",
74
+ BindingAffinity = "Predicted binding affinity (kcal.mol^-1)",
75
+ DissociationConstant = "Predicted dissociation constant (M)"
76
+ )
77
+
78
+ if (!is.null(group)) {
79
+ log_info("Merging group information ...")
80
+ metrics <- group %>%
81
+ left_join(metrics, by = "Sample") %>%
82
+ mutate(Group = factor(Group, levels = unique(Group)))
83
+ }
84
+
85
+ log_info("Plotting Prodigy metrics ...")
86
+ for (metric in names(METRIC_DESCR)) {
87
+ log_info("- {metric}: {METRIC_DESCR[[metric]]}")
88
+
89
+ add_report(
90
+ list(
91
+ kind = "descr",
92
+ content = METRIC_DESCR[[metric]] %||% paste0("Metric: ", metric)
93
+ ),
94
+ h1 = metric
95
+ )
96
+
97
+ # barplot
98
+ p <- ggplot(metrics, aes(x = Sample, y = !!sym(metric))) +
99
+ geom_bar(stat = "identity", fill = "steelblue") +
100
+ labs(x = "Sample", y = metric) +
101
+ theme(axis.text.x = element_text(angle = 90, hjust = 1))
102
+
103
+ figfile <- file.path(outdir, paste0(slugify(metric), ".barplot.png"))
104
+ png(figfile, height = 600, res = 100, width = nrow(metrics) * 30 + 200)
105
+ print(p)
106
+ dev.off()
107
+
108
+ add_report(
109
+ list(src = figfile, name = "By Sample"),
110
+ ui = "table_of_images",
111
+ h1 = metric
112
+ )
113
+
114
+ if (is.null(group)) { next }
115
+ # group: Sample, Group
116
+ p <- ggplot(metrics, aes(x = Group, y = !!sym(metric))) +
117
+ geom_boxplot(fill = "steelblue") +
118
+ labs(x = "Group", y = metric) +
119
+ theme(axis.text.x = element_text(angle = 90, hjust = 1))
120
+
121
+ figfile <- file.path(outdir, paste0(slugify(metric), ".boxplot.png"))
122
+ png(figfile, height = 600, res = 100, width = length(unique(metrics$Group)) * 30 + 200)
123
+ print(p)
124
+ dev.off()
125
+
126
+ add_report(
127
+ list(src = figfile, name = "By Group"),
128
+ ui = "table_of_images",
129
+ h1 = metric
130
+ )
131
+ }
132
+
133
+ save_report(joboutdir)
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "biopipen"
3
- version = "0.31.4"
3
+ version = "0.31.5"
4
4
  description = "Bioinformatics processes/pipelines that can be run from `pipen run`"
5
5
  authors = ["pwwang <pwwang@pwwang.com>"]
6
6
  license = "MIT"
@@ -38,6 +38,7 @@ gene = "biopipen.ns.gene"
38
38
  gsea = "biopipen.ns.gsea"
39
39
  misc = "biopipen.ns.misc"
40
40
  plot = "biopipen.ns.plot"
41
+ protein = "biopipen.ns.protein"
41
42
  regulatory = "biopipen.ns.regulatory"
42
43
  rnaseq = "biopipen.ns.rnaseq"
43
44
  scrna = "biopipen.ns.scrna"
@@ -10,6 +10,7 @@ packages = \
10
10
  'biopipen.scripts.cellranger',
11
11
  'biopipen.scripts.cnvkit',
12
12
  'biopipen.scripts.misc',
13
+ 'biopipen.scripts.protein',
13
14
  'biopipen.scripts.regulatory',
14
15
  'biopipen.scripts.scrna',
15
16
  'biopipen.scripts.snp',
@@ -29,6 +30,7 @@ package_data = \
29
30
  'reports/cnvkit/*',
30
31
  'reports/delim/*',
31
32
  'reports/gsea/*',
33
+ 'reports/protein/*',
32
34
  'reports/scrna/*',
33
35
  'reports/scrna_metabolic_landscape/*',
34
36
  'reports/snp/*',
@@ -68,6 +70,7 @@ entry_points = \
68
70
  'gsea = biopipen.ns.gsea',
69
71
  'misc = biopipen.ns.misc',
70
72
  'plot = biopipen.ns.plot',
73
+ 'protein = biopipen.ns.protein',
71
74
  'regulatory = biopipen.ns.regulatory',
72
75
  'rnaseq = biopipen.ns.rnaseq',
73
76
  'scrna = biopipen.ns.scrna',
@@ -82,7 +85,7 @@ entry_points = \
82
85
 
83
86
  setup_kwargs = {
84
87
  'name': 'biopipen',
85
- 'version': '0.31.4',
88
+ 'version': '0.31.5',
86
89
  'description': 'Bioinformatics processes/pipelines that can be run from `pipen run`',
87
90
  'long_description': 'None',
88
91
  'author': 'pwwang',
@@ -1 +0,0 @@
1
- __version__ = "0.31.4"
File without changes
File without changes