biopipen 0.31.4__tar.gz → 0.31.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 (293) hide show
  1. {biopipen-0.31.4 → biopipen-0.31.6}/PKG-INFO +1 -1
  2. biopipen-0.31.6/biopipen/__init__.py +1 -0
  3. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/ns/bam.py +41 -0
  4. biopipen-0.31.6/biopipen/ns/protein.py +84 -0
  5. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/ns/regulatory.py +72 -0
  6. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/ns/vcf.py +7 -3
  7. biopipen-0.31.6/biopipen/reports/protein/ProdigySummary.svelte +16 -0
  8. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/bam/BamMerge.py +10 -14
  9. biopipen-0.31.6/biopipen/scripts/bam/BamSampling.py +90 -0
  10. biopipen-0.31.6/biopipen/scripts/protein/Prodigy.py +119 -0
  11. biopipen-0.31.6/biopipen/scripts/protein/ProdigySummary.R +133 -0
  12. biopipen-0.31.6/biopipen/scripts/regulatory/MotifAffinityTest.R +84 -0
  13. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/regulatory/MotifAffinityTest_AtSNP.R +31 -37
  14. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/regulatory/MotifAffinityTest_MotifBreakR.R +25 -26
  15. biopipen-0.31.6/biopipen/scripts/regulatory/VariantMotifPlot.R +76 -0
  16. biopipen-0.31.6/biopipen/scripts/regulatory/motifs-common.R +322 -0
  17. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/vcf/TruvariBench.sh +14 -7
  18. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/vcf/TruvariBenchSummary.R +1 -2
  19. {biopipen-0.31.4 → biopipen-0.31.6}/pyproject.toml +2 -1
  20. {biopipen-0.31.4 → biopipen-0.31.6}/setup.py +4 -1
  21. biopipen-0.31.4/biopipen/__init__.py +0 -1
  22. biopipen-0.31.4/biopipen/scripts/regulatory/MotifAffinityTest.R +0 -222
  23. biopipen-0.31.4/biopipen/scripts/regulatory/atSNP.R +0 -33
  24. biopipen-0.31.4/biopipen/scripts/regulatory/motifBreakR.R +0 -1594
  25. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/core/__init__.py +0 -0
  26. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/core/config.py +0 -0
  27. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/core/config.toml +0 -0
  28. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/core/defaults.py +0 -0
  29. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/core/filters.py +0 -0
  30. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/core/proc.py +0 -0
  31. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/core/testing.py +0 -0
  32. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/ns/__init__.py +0 -0
  33. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/ns/bed.py +0 -0
  34. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/ns/cellranger.py +0 -0
  35. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/ns/cellranger_pipeline.py +0 -0
  36. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/ns/cnv.py +0 -0
  37. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/ns/cnvkit.py +0 -0
  38. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/ns/cnvkit_pipeline.py +0 -0
  39. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/ns/delim.py +0 -0
  40. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/ns/gene.py +0 -0
  41. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/ns/gsea.py +0 -0
  42. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/ns/misc.py +0 -0
  43. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/ns/plot.py +0 -0
  44. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/ns/rnaseq.py +0 -0
  45. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/ns/scrna.py +0 -0
  46. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/ns/scrna_metabolic_landscape.py +0 -0
  47. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/ns/snp.py +0 -0
  48. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/ns/stats.py +0 -0
  49. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/ns/tcgamaf.py +0 -0
  50. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/ns/tcr.py +0 -0
  51. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/ns/web.py +0 -0
  52. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/reports/bam/CNAClinic.svelte +0 -0
  53. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/reports/bam/CNVpytor.svelte +0 -0
  54. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/reports/bam/ControlFREEC.svelte +0 -0
  55. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/reports/cellranger/CellRangerCount.svelte +0 -0
  56. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/reports/cellranger/CellRangerSummary.svelte +0 -0
  57. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/reports/cellranger/CellRangerVdj.svelte +0 -0
  58. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/reports/cnv/AneuploidyScore.svelte +0 -0
  59. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/reports/cnv/AneuploidyScoreSummary.svelte +0 -0
  60. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/reports/cnv/TMADScoreSummary.svelte +0 -0
  61. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/reports/cnvkit/CNVkitDiagram.svelte +0 -0
  62. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/reports/cnvkit/CNVkitHeatmap.svelte +0 -0
  63. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/reports/cnvkit/CNVkitScatter.svelte +0 -0
  64. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/reports/delim/SampleInfo.svelte +0 -0
  65. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/reports/gsea/FGSEA.svelte +0 -0
  66. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/reports/gsea/GSEA.svelte +0 -0
  67. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/reports/scrna/CellsDistribution.svelte +0 -0
  68. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/reports/scrna/DimPlots.svelte +0 -0
  69. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/reports/scrna/MarkersFinder.svelte +0 -0
  70. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/reports/scrna/MetaMarkers.svelte +0 -0
  71. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/reports/scrna/RadarPlots.svelte +0 -0
  72. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/reports/scrna/ScFGSEA.svelte +0 -0
  73. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/reports/scrna/SeuratClusterStats.svelte +0 -0
  74. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/reports/scrna/SeuratMap2Ref.svelte +0 -0
  75. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/reports/scrna/SeuratPreparing.svelte +0 -0
  76. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/reports/scrna/TopExpressingGenes.svelte +0 -0
  77. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/reports/scrna_metabolic_landscape/MetabolicFeatures.svelte +0 -0
  78. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/reports/scrna_metabolic_landscape/MetabolicFeaturesIntraSubset.svelte +0 -0
  79. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/reports/scrna_metabolic_landscape/MetabolicPathwayActivity.svelte +0 -0
  80. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/reports/scrna_metabolic_landscape/MetabolicPathwayHeterogeneity.svelte +0 -0
  81. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/reports/snp/PlinkCallRate.svelte +0 -0
  82. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/reports/snp/PlinkFreq.svelte +0 -0
  83. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/reports/snp/PlinkHWE.svelte +0 -0
  84. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/reports/snp/PlinkHet.svelte +0 -0
  85. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/reports/snp/PlinkIBD.svelte +0 -0
  86. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/reports/tcr/CDR3AAPhyschem.svelte +0 -0
  87. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/reports/tcr/CloneResidency.svelte +0 -0
  88. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/reports/tcr/Immunarch.svelte +0 -0
  89. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/reports/tcr/SampleDiversity.svelte +0 -0
  90. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/reports/tcr/TCRClusterStats.svelte +0 -0
  91. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/reports/tcr/TESSA.svelte +0 -0
  92. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/reports/tcr/VJUsage.svelte +0 -0
  93. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/reports/utils/gsea.liq +0 -0
  94. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/reports/utils/misc.liq +0 -0
  95. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/reports/vcf/TruvariBenchSummary.svelte +0 -0
  96. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/reports/vcf/TruvariConsistency.svelte +0 -0
  97. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/bam/BamSplitChroms.py +0 -0
  98. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/bam/CNAClinic.R +0 -0
  99. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/bam/CNVpytor.py +0 -0
  100. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/bam/ControlFREEC.py +0 -0
  101. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/bed/Bed2Vcf.py +0 -0
  102. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/bed/BedConsensus.py +0 -0
  103. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/bed/BedLiftOver.sh +0 -0
  104. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/bed/BedtoolsIntersect.py +0 -0
  105. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/bed/BedtoolsMerge.py +0 -0
  106. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/cellranger/CellRangerCount.py +0 -0
  107. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/cellranger/CellRangerSummary.R +0 -0
  108. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/cellranger/CellRangerVdj.py +0 -0
  109. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/cnv/AneuploidyScore.R +0 -0
  110. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/cnv/AneuploidyScoreSummary.R +0 -0
  111. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/cnv/TMADScore.R +0 -0
  112. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/cnv/TMADScoreSummary.R +0 -0
  113. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/cnvkit/CNVkitAccess.py +0 -0
  114. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/cnvkit/CNVkitAutobin.py +0 -0
  115. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/cnvkit/CNVkitBatch.py +0 -0
  116. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/cnvkit/CNVkitCall.py +0 -0
  117. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/cnvkit/CNVkitCoverage.py +0 -0
  118. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/cnvkit/CNVkitDiagram.py +0 -0
  119. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/cnvkit/CNVkitFix.py +0 -0
  120. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/cnvkit/CNVkitGuessBaits.py +0 -0
  121. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/cnvkit/CNVkitHeatmap.py +0 -0
  122. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/cnvkit/CNVkitReference.py +0 -0
  123. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/cnvkit/CNVkitScatter.py +0 -0
  124. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/cnvkit/CNVkitSegment.py +0 -0
  125. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/cnvkit/guess_baits.py +0 -0
  126. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/delim/RowsBinder.R +0 -0
  127. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/delim/SampleInfo.R +0 -0
  128. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/gene/GeneNameConversion.R +0 -0
  129. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/gene/GenePromoters.R +0 -0
  130. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/gsea/Enrichr.R +0 -0
  131. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/gsea/FGSEA.R +0 -0
  132. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/gsea/GSEA.R +0 -0
  133. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/gsea/PreRank.R +0 -0
  134. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/misc/Config2File.py +0 -0
  135. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/misc/Shell.sh +0 -0
  136. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/misc/Str2File.py +0 -0
  137. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/plot/Heatmap.R +0 -0
  138. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/plot/Manhattan.R +0 -0
  139. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/plot/QQPlot.R +0 -0
  140. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/plot/ROC.R +0 -0
  141. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/plot/Scatter.R +0 -0
  142. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/plot/VennDiagram.R +0 -0
  143. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/regulatory/MotifScan.py +0 -0
  144. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/rnaseq/Simulation-ESCO.R +0 -0
  145. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/rnaseq/Simulation-RUVcorr.R +0 -0
  146. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/rnaseq/Simulation.R +0 -0
  147. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/rnaseq/UnitConversion.R +0 -0
  148. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/scrna/AnnData2Seurat.R +0 -0
  149. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/scrna/CellTypeAnnotation-celltypist.R +0 -0
  150. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/scrna/CellTypeAnnotation-common.R +0 -0
  151. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/scrna/CellTypeAnnotation-direct.R +0 -0
  152. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/scrna/CellTypeAnnotation-hitype.R +0 -0
  153. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/scrna/CellTypeAnnotation-sccatch.R +0 -0
  154. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/scrna/CellTypeAnnotation-sctype.R +0 -0
  155. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/scrna/CellTypeAnnotation.R +0 -0
  156. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/scrna/CellsDistribution.R +0 -0
  157. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/scrna/DimPlots.R +0 -0
  158. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/scrna/ExprImputation-alra.R +0 -0
  159. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/scrna/ExprImputation-rmagic.R +0 -0
  160. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/scrna/ExprImputation-scimpute.R +0 -0
  161. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/scrna/ExprImputation.R +0 -0
  162. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/scrna/MarkersFinder.R +0 -0
  163. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/scrna/MetaMarkers.R +0 -0
  164. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/scrna/ModuleScoreCalculator.R +0 -0
  165. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/scrna/RadarPlots.R +0 -0
  166. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/scrna/SCImpute.R +0 -0
  167. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/scrna/ScFGSEA.R +0 -0
  168. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/scrna/ScSimulation.R +0 -0
  169. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/scrna/Seurat2AnnData.R +0 -0
  170. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/scrna/SeuratClusterStats-clustree.R +0 -0
  171. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/scrna/SeuratClusterStats-dimplots.R +0 -0
  172. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/scrna/SeuratClusterStats-features.R +0 -0
  173. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/scrna/SeuratClusterStats-hists.R +0 -0
  174. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/scrna/SeuratClusterStats-ngenes.R +0 -0
  175. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/scrna/SeuratClusterStats-stats.R +0 -0
  176. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/scrna/SeuratClusterStats.R +0 -0
  177. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/scrna/SeuratClustering-common.R +0 -0
  178. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/scrna/SeuratClustering.R +0 -0
  179. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/scrna/SeuratFilter.R +0 -0
  180. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/scrna/SeuratLoading.R +0 -0
  181. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/scrna/SeuratMap2Ref.R +0 -0
  182. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/scrna/SeuratMetadataMutater.R +0 -0
  183. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/scrna/SeuratPreparing-common.R +0 -0
  184. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/scrna/SeuratPreparing-doublet_detection.R +0 -0
  185. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/scrna/SeuratPreparing.R +0 -0
  186. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/scrna/SeuratSplit.R +0 -0
  187. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/scrna/SeuratSubClustering.R +0 -0
  188. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/scrna/SeuratSubset.R +0 -0
  189. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/scrna/SeuratTo10X.R +0 -0
  190. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/scrna/Subset10X.R +0 -0
  191. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/scrna/TopExpressingGenes.R +0 -0
  192. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/scrna/celltypist-wrapper.py +0 -0
  193. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/scrna/sctype.R +0 -0
  194. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/scrna_metabolic_landscape/MetabolicFeatures.R +0 -0
  195. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/scrna_metabolic_landscape/MetabolicFeaturesIntraSubset.R +0 -0
  196. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/scrna_metabolic_landscape/MetabolicPathwayActivity.R +0 -0
  197. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/scrna_metabolic_landscape/MetabolicPathwayHeterogeneity.R +0 -0
  198. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/snp/MatrixEQTL.R +0 -0
  199. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/snp/Plink2GTMat.py +0 -0
  200. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/snp/PlinkCallRate.R +0 -0
  201. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/snp/PlinkFilter.py +0 -0
  202. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/snp/PlinkFreq.R +0 -0
  203. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/snp/PlinkFromVcf.py +0 -0
  204. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/snp/PlinkHWE.R +0 -0
  205. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/snp/PlinkHet.R +0 -0
  206. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/snp/PlinkIBD.R +0 -0
  207. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/snp/PlinkSimulation.py +0 -0
  208. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/snp/PlinkUpdateName.py +0 -0
  209. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/stats/ChowTest.R +0 -0
  210. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/stats/DiffCoexpr.R +0 -0
  211. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/stats/LiquidAssoc.R +0 -0
  212. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/stats/Mediation.R +0 -0
  213. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/stats/MetaPvalue.R +0 -0
  214. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/stats/MetaPvalue1.R +0 -0
  215. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/tcgamaf/Maf2Vcf.py +0 -0
  216. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/tcgamaf/MafAddChr.py +0 -0
  217. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/tcgamaf/maf2vcf.pl +0 -0
  218. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/tcr/Attach2Seurat.R +0 -0
  219. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/tcr/CDR3AAPhyschem.R +0 -0
  220. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/tcr/CloneResidency.R +0 -0
  221. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/tcr/CloneSizeQQPlot.R +0 -0
  222. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/tcr/GIANA/GIANA.py +0 -0
  223. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/tcr/GIANA/GIANA4.py +0 -0
  224. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/tcr/GIANA/Imgt_Human_TRBV.fasta +0 -0
  225. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/tcr/GIANA/query.py +0 -0
  226. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/tcr/Immunarch-basic.R +0 -0
  227. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/tcr/Immunarch-clonality.R +0 -0
  228. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/tcr/Immunarch-diversity.R +0 -0
  229. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/tcr/Immunarch-geneusage.R +0 -0
  230. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/tcr/Immunarch-kmer.R +0 -0
  231. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/tcr/Immunarch-overlap.R +0 -0
  232. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/tcr/Immunarch-spectratyping.R +0 -0
  233. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/tcr/Immunarch-tracking.R +0 -0
  234. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/tcr/Immunarch-vjjunc.R +0 -0
  235. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/tcr/Immunarch.R +0 -0
  236. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/tcr/Immunarch2VDJtools.R +0 -0
  237. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/tcr/ImmunarchFilter.R +0 -0
  238. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/tcr/ImmunarchLoading.R +0 -0
  239. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/tcr/ImmunarchSplitIdents.R +0 -0
  240. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/tcr/SampleDiversity.R +0 -0
  241. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/tcr/TCRClusterStats.R +0 -0
  242. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/tcr/TCRClustering.R +0 -0
  243. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/tcr/TCRDock.py +0 -0
  244. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/tcr/TESSA.R +0 -0
  245. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/tcr/TESSA_source/Atchley_factors.csv +0 -0
  246. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/tcr/TESSA_source/BriseisEncoder.py +0 -0
  247. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/tcr/TESSA_source/MCMC_control.R +0 -0
  248. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/tcr/TESSA_source/TrainedEncoder.h5 +0 -0
  249. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/tcr/TESSA_source/fixed_b.csv +0 -0
  250. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/tcr/TESSA_source/initialization.R +0 -0
  251. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/tcr/TESSA_source/post_analysis.R +0 -0
  252. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/tcr/TESSA_source/real_data.R +0 -0
  253. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/tcr/TESSA_source/update.R +0 -0
  254. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/tcr/TESSA_source/utility.R +0 -0
  255. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/tcr/VJUsage.R +0 -0
  256. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/tcr/immunarch-patched.R +0 -0
  257. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/tcr/vdjtools-patch.sh +0 -0
  258. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/vcf/BcftoolsAnnotate.py +0 -0
  259. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/vcf/BcftoolsFilter.py +0 -0
  260. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/vcf/BcftoolsSort.py +0 -0
  261. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/vcf/BcftoolsView.py +0 -0
  262. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/vcf/TruvariConsistency.R +0 -0
  263. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/vcf/Vcf2Bed.py +0 -0
  264. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/vcf/VcfAnno.py +0 -0
  265. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/vcf/VcfDownSample.sh +0 -0
  266. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/vcf/VcfFilter.py +0 -0
  267. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/vcf/VcfFix.py +0 -0
  268. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/vcf/VcfFix_utils.py +0 -0
  269. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/vcf/VcfIndex.py +0 -0
  270. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/vcf/VcfIntersect.py +0 -0
  271. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/vcf/VcfLiftOver.sh +0 -0
  272. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/vcf/VcfSplitSamples.py +0 -0
  273. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/vcf/bcftools_utils.py +0 -0
  274. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/web/Download.py +0 -0
  275. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/web/DownloadList.py +0 -0
  276. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/web/GCloudStorageDownloadBucket.py +0 -0
  277. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/web/GCloudStorageDownloadFile.py +0 -0
  278. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/scripts/web/gcloud_common.py +0 -0
  279. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/utils/__init__.py +0 -0
  280. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/utils/caching.R +0 -0
  281. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/utils/common_docstrs.py +0 -0
  282. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/utils/gene.R +0 -0
  283. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/utils/gene.py +0 -0
  284. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/utils/gsea.R +0 -0
  285. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/utils/io.R +0 -0
  286. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/utils/misc.R +0 -0
  287. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/utils/misc.py +0 -0
  288. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/utils/mutate_helpers.R +0 -0
  289. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/utils/plot.R +0 -0
  290. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/utils/reference.py +0 -0
  291. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/utils/rnaseq.R +0 -0
  292. {biopipen-0.31.4 → biopipen-0.31.6}/biopipen/utils/single_cell.R +0 -0
  293. {biopipen-0.31.4 → biopipen-0.31.6}/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.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.31.6"
@@ -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"}
@@ -212,3 +212,75 @@ class MotifAffinityTest(Proc):
212
212
  "atsnp_args": {"padj_cutoff": True, "padj": "BH", "p": "pval_diff"},
213
213
  }
214
214
  script = "file://../scripts/regulatory/MotifAffinityTest.R"
215
+
216
+
217
+ class VariantMotifPlot(Proc):
218
+ """A plot with a genomic region surrounding a genomic variant, and
219
+ potentially disrupted motifs.
220
+
221
+ Currently only SNVs are supported.
222
+
223
+ Input:
224
+ infile: File containing the variants and motifs.
225
+ It is a TAB-delimited file with the following columns:
226
+ - chrom: The chromosome of the SNV. Alias: chr, seqnames.
227
+ - start: The start position of the SNV, no matter 0- or 1-based.
228
+ - end: The end position of the SNV, which will be used as the position of the SNV.
229
+ - strand: Indicating the direction of the surrounding sequence matching the motif.
230
+ - SNP_id: The name of the SNV.
231
+ - REF: The reference allele of the SNV.
232
+ - ALT: The alternative allele of the SNV.
233
+ - providerId: The motif id. It can be specified by `envs.motif_col`.
234
+ - providerName: The name of the motif provider. Optional.
235
+ - Regulator: The regulator name. Optional, can be specified by `envs.regulator_col`.
236
+ - motifPos: The position of the motif, relative to the position of the SNV.
237
+ For example, '-8, 4' means the motif is 8 bp upstream and 4 bp downstream of the SNV.
238
+
239
+ Envs:
240
+ genome: The genome assembly.
241
+ Used to fetch the sequences around the variants by package, for example, `BSgenome.Hsapiens.UCSC.hg19` is required if
242
+ `hg19`. If it is an organism other than human, please specify the full name of the package, for example, `BSgenome.Mmusculus.UCSC.mm10`.
243
+ motifdb: The path to the motif database. This is required.
244
+ It should be in the format of MEME motif database.
245
+ Databases can be downloaded here: <https://meme-suite.org/meme/doc/download.html>.
246
+ See also introduction to the databases: <https://meme-suite.org/meme/db/motifs>.
247
+ [universalmotif](https://github.com/bjmt/universalmotif) is required to read the motif database.
248
+ motif_col: The column name in the motif file containing the motif names.
249
+ If this is not provided, `envs.regulator_col` and `envs.regmotifs` are required,
250
+ which are used to infer the motif names from the regulator names.
251
+ regulator_col: The column name in the motif file containing the regulator names.
252
+ Both `motif_col` and `regulator_col` should be the direct column names or
253
+ the index (1-based) of the columns.
254
+ If no `regulator_col` is provided, no regulator information is written in
255
+ the output. Otherwise, the regulator information is written in the output in
256
+ the `Regulator` column.
257
+ regmotifs: The path to the regulator-motif mapping file.
258
+ It must have header and the columns `Motif` or `Model` for motif names and
259
+ `TF`, `Regulator` or `Transcription factor` for regulator names.
260
+ notfound (choice): What to do if a motif is not found in the database,
261
+ or a regulator is not found in the regulator-motif mapping (envs.regmotifs)
262
+ file.
263
+ - error: Report error and stop the process.
264
+ - ignore: Ignore the motif and continue.
265
+ devpars (ns): The default device parameters for the plot.
266
+ - width (type=int): The width of the plot.
267
+ - height (type=int): The height of the plot.
268
+ - res (type=int): The resolution of the plot.
269
+ plot_vars (type=auto): The variants (SNP_id) to plot.
270
+ A list of variant names to plot or a string with the variant names separated by comma.
271
+ When not specified, all variants are plotted.
272
+ """ # noqa: E501
273
+ input = "infile:file"
274
+ output = "outdir:dir:{{in.infile | stem}}.vmplots"
275
+ lang = config.lang.rscript
276
+ envs = {
277
+ "genome": config.ref.genome,
278
+ "motifdb": config.ref.tf_motifdb,
279
+ "motif_col": "providerId",
280
+ "regulator_col": None,
281
+ "regmotifs": config.ref.tf_motifs,
282
+ "notfound": "error",
283
+ "devpars": {"width": 800, "height": None, "res": 100},
284
+ "plot_vars": None,
285
+ }
286
+ script = "file://../scripts/regulatory/VariantMotifPlot.R"
@@ -335,6 +335,8 @@ class TruvariBench(Proc):
335
335
  """Run `truvari bench` to compare a VCF with CNV calls and
336
336
  base CNV standards
337
337
 
338
+ Requires truvari v4+
339
+
338
340
  See https://github.com/ACEnglish/truvari/wiki/bench
339
341
 
340
342
  Input:
@@ -358,7 +360,7 @@ class TruvariBench(Proc):
358
360
  "truvari": config.exe.truvari,
359
361
  "ref": config.ref.reffa,
360
362
  "refdist": 500,
361
- "pctsim": 0.7,
363
+ "pctseq": 0.7,
362
364
  "pctsize": 0.7,
363
365
  "pctovl": 0.0,
364
366
  "typeignore": False,
@@ -402,7 +404,7 @@ class TruvariBenchSummary(Proc):
402
404
  output = "outdir:dir:truvari_bench.summary"
403
405
  lang = config.lang.rscript
404
406
  envs = {
405
- "plots": ["call cnt", "base cnt", "precision", "recall", "f1"],
407
+ "plots": ["comp cnt", "base cnt", "precision", "recall", "f1"],
406
408
  "devpars": None,
407
409
  }
408
410
  script = "file://../scripts/vcf/TruvariBenchSummary.R"
@@ -414,6 +416,8 @@ class TruvariConsistency(Proc):
414
416
 
415
417
  See https://github.com/ACEnglish/truvari/wiki/consistency
416
418
 
419
+ Requires truvari v4+
420
+
417
421
  Input:
418
422
  vcfs: The vcf files with CNV calls
419
423
 
@@ -463,7 +467,7 @@ class BcftoolsAnnotate(Proc):
463
467
  columns (auto): Comma-separated or list of columns or tags to carry over from
464
468
  the annotation file. Overrides `-c, --columns`
465
469
  remove (auto): Remove the specified columns from the input file
466
- header (type=list): Headers to be added
470
+ header (list): Headers to be added
467
471
  gz (flag): Whether to gzip the output file
468
472
  index (flag): Whether to index the output file (tbi) (`envs.gz` forced to True)
469
473
  <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)