biopipen 0.27.9__tar.gz → 1.1.4__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.
- biopipen-1.1.4/PKG-INFO +27 -0
- biopipen-1.1.4/biopipen/__init__.py +1 -0
- {biopipen-0.27.9 → biopipen-1.1.4}/biopipen/core/config.toml +20 -0
- {biopipen-0.27.9 → biopipen-1.1.4}/biopipen/core/filters.py +36 -138
- {biopipen-0.27.9 → biopipen-1.1.4}/biopipen/core/proc.py +5 -3
- {biopipen-0.27.9 → biopipen-1.1.4}/biopipen/core/testing.py +16 -3
- {biopipen-0.27.9 → biopipen-1.1.4}/biopipen/ns/bam.py +148 -6
- {biopipen-0.27.9 → biopipen-1.1.4}/biopipen/ns/bed.py +75 -0
- biopipen-1.1.4/biopipen/ns/cellranger.py +186 -0
- {biopipen-0.27.9 → biopipen-1.1.4}/biopipen/ns/cellranger_pipeline.py +39 -8
- {biopipen-0.27.9 → biopipen-1.1.4}/biopipen/ns/cnv.py +19 -3
- {biopipen-0.27.9 → biopipen-1.1.4}/biopipen/ns/cnvkit.py +1 -1
- {biopipen-0.27.9 → biopipen-1.1.4}/biopipen/ns/cnvkit_pipeline.py +20 -12
- {biopipen-0.27.9 → biopipen-1.1.4}/biopipen/ns/delim.py +34 -28
- biopipen-1.1.4/biopipen/ns/gene.py +99 -0
- {biopipen-0.27.9 → biopipen-1.1.4}/biopipen/ns/gsea.py +63 -37
- {biopipen-0.27.9 → biopipen-1.1.4}/biopipen/ns/misc.py +39 -14
- biopipen-1.1.4/biopipen/ns/plot.py +419 -0
- biopipen-1.1.4/biopipen/ns/protein.py +183 -0
- biopipen-1.1.4/biopipen/ns/regulatory.py +290 -0
- biopipen-1.1.4/biopipen/ns/scrna.py +3444 -0
- biopipen-1.1.4/biopipen/ns/scrna_metabolic_landscape.py +517 -0
- biopipen-1.1.4/biopipen/ns/snp.py +659 -0
- {biopipen-0.27.9 → biopipen-1.1.4}/biopipen/ns/stats.py +167 -3
- {biopipen-0.27.9 → biopipen-1.1.4}/biopipen/ns/tcr.py +522 -82
- {biopipen-0.27.9 → biopipen-1.1.4}/biopipen/ns/vcf.py +236 -2
- biopipen-1.1.4/biopipen/ns/web.py +169 -0
- {biopipen-0.27.9 → biopipen-1.1.4}/biopipen/reports/bam/CNVpytor.svelte +4 -9
- {biopipen-0.27.9 → biopipen-1.1.4}/biopipen/reports/cnvkit/CNVkitDiagram.svelte +1 -1
- {biopipen-0.27.9 → biopipen-1.1.4}/biopipen/reports/cnvkit/CNVkitHeatmap.svelte +1 -1
- {biopipen-0.27.9 → biopipen-1.1.4}/biopipen/reports/cnvkit/CNVkitScatter.svelte +1 -1
- biopipen-1.1.4/biopipen/reports/common.svelte +15 -0
- biopipen-0.27.9/biopipen/reports/scrna/SeuratPreparing.svelte → biopipen-1.1.4/biopipen/reports/protein/ProdigySummary.svelte +3 -2
- {biopipen-0.27.9 → biopipen-1.1.4}/biopipen/reports/scrna/DimPlots.svelte +1 -1
- biopipen-1.1.4/biopipen/reports/scrna/MQuad.svelte +72 -0
- biopipen-1.1.4/biopipen/reports/scrna/VireoSNP.svelte +47 -0
- biopipen-1.1.4/biopipen/reports/scrna_metabolic_landscape/MetabolicFeatures.svelte +70 -0
- biopipen-1.1.4/biopipen/reports/scrna_metabolic_landscape/MetabolicPathwayActivity.svelte +103 -0
- biopipen-1.1.4/biopipen/reports/scrna_metabolic_landscape/MetabolicPathwayHeterogeneity.svelte +81 -0
- biopipen-1.1.4/biopipen/reports/snp/PlinkCallRate.svelte +24 -0
- biopipen-1.1.4/biopipen/reports/snp/PlinkFreq.svelte +18 -0
- biopipen-1.1.4/biopipen/reports/snp/PlinkHWE.svelte +18 -0
- biopipen-1.1.4/biopipen/reports/snp/PlinkHet.svelte +18 -0
- biopipen-1.1.4/biopipen/reports/snp/PlinkIBD.svelte +18 -0
- {biopipen-0.27.9 → biopipen-1.1.4}/biopipen/reports/tcr/CDR3AAPhyschem.svelte +1 -1
- biopipen-0.27.9/biopipen/reports/delim/SampleInfo.svelte → biopipen-1.1.4/biopipen/reports/tcr/ClonalStats.svelte +2 -2
- {biopipen-0.27.9 → biopipen-1.1.4}/biopipen/reports/utils/misc.liq +22 -7
- {biopipen-0.27.9 → biopipen-1.1.4}/biopipen/scripts/bam/BamMerge.py +11 -15
- biopipen-1.1.4/biopipen/scripts/bam/BamSampling.py +90 -0
- biopipen-1.1.4/biopipen/scripts/bam/BamSort.py +141 -0
- {biopipen-0.27.9 → biopipen-1.1.4}/biopipen/scripts/bam/BamSplitChroms.py +10 -10
- biopipen-1.1.4/biopipen/scripts/bam/BamSubsetByBed.py +38 -0
- {biopipen-0.27.9 → biopipen-1.1.4}/biopipen/scripts/bam/CNAClinic.R +41 -5
- {biopipen-0.27.9 → biopipen-1.1.4}/biopipen/scripts/bam/CNVpytor.py +153 -54
- {biopipen-0.27.9 → biopipen-1.1.4}/biopipen/scripts/bam/ControlFREEC.py +13 -14
- biopipen-1.1.4/biopipen/scripts/bam/SamtoolsView.py +33 -0
- {biopipen-0.27.9 → biopipen-1.1.4}/biopipen/scripts/bed/Bed2Vcf.py +5 -5
- {biopipen-0.27.9 → biopipen-1.1.4}/biopipen/scripts/bed/BedConsensus.py +6 -4
- {biopipen-0.27.9 → biopipen-1.1.4}/biopipen/scripts/bed/BedLiftOver.sh +6 -4
- biopipen-1.1.4/biopipen/scripts/bed/BedtoolsIntersect.py +54 -0
- biopipen-1.1.4/biopipen/scripts/bed/BedtoolsMakeWindows.py +47 -0
- biopipen-1.1.4/biopipen/scripts/bed/BedtoolsMerge.py +11 -0
- biopipen-1.1.4/biopipen/scripts/cellranger/CellRangerCount.py +139 -0
- {biopipen-0.27.9 → biopipen-1.1.4}/biopipen/scripts/cellranger/CellRangerSummary.R +20 -28
- biopipen-1.1.4/biopipen/scripts/cellranger/CellRangerVdj.py +113 -0
- {biopipen-0.27.9 → biopipen-1.1.4}/biopipen/scripts/cnv/AneuploidyScore.R +55 -20
- biopipen-1.1.4/biopipen/scripts/cnv/AneuploidyScoreSummary.R +397 -0
- biopipen-1.1.4/biopipen/scripts/cnv/TMADScore.R +51 -0
- biopipen-1.1.4/biopipen/scripts/cnv/TMADScoreSummary.R +164 -0
- biopipen-1.1.4/biopipen/scripts/cnvkit/CNVkitAccess.py +26 -0
- biopipen-1.1.4/biopipen/scripts/cnvkit/CNVkitAutobin.py +53 -0
- {biopipen-0.27.9 → biopipen-1.1.4}/biopipen/scripts/cnvkit/CNVkitBatch.py +6 -6
- {biopipen-0.27.9 → biopipen-1.1.4}/biopipen/scripts/cnvkit/CNVkitCall.py +3 -3
- {biopipen-0.27.9 → biopipen-1.1.4}/biopipen/scripts/cnvkit/CNVkitCoverage.py +4 -3
- {biopipen-0.27.9 → biopipen-1.1.4}/biopipen/scripts/cnvkit/CNVkitDiagram.py +5 -5
- {biopipen-0.27.9 → biopipen-1.1.4}/biopipen/scripts/cnvkit/CNVkitFix.py +3 -3
- {biopipen-0.27.9 → biopipen-1.1.4}/biopipen/scripts/cnvkit/CNVkitGuessBaits.py +13 -8
- {biopipen-0.27.9 → biopipen-1.1.4}/biopipen/scripts/cnvkit/CNVkitHeatmap.py +5 -5
- {biopipen-0.27.9 → biopipen-1.1.4}/biopipen/scripts/cnvkit/CNVkitReference.py +6 -5
- {biopipen-0.27.9 → biopipen-1.1.4}/biopipen/scripts/cnvkit/CNVkitScatter.py +5 -5
- {biopipen-0.27.9 → biopipen-1.1.4}/biopipen/scripts/cnvkit/CNVkitSegment.py +5 -5
- {biopipen-0.27.9 → biopipen-1.1.4}/biopipen/scripts/cnvkit/guess_baits.py +166 -93
- {biopipen-0.27.9 → biopipen-1.1.4}/biopipen/scripts/delim/RowsBinder.R +1 -1
- biopipen-1.1.4/biopipen/scripts/delim/SampleInfo.R +160 -0
- biopipen-1.1.4/biopipen/scripts/gene/GeneNameConversion.R +67 -0
- biopipen-1.1.4/biopipen/scripts/gene/GenePromoters.R +61 -0
- {biopipen-0.27.9 → biopipen-1.1.4}/biopipen/scripts/gsea/Enrichr.R +5 -5
- biopipen-1.1.4/biopipen/scripts/gsea/FGSEA.R +192 -0
- {biopipen-0.27.9 → biopipen-1.1.4}/biopipen/scripts/gsea/GSEA.R +2 -2
- {biopipen-0.27.9 → biopipen-1.1.4}/biopipen/scripts/gsea/PreRank.R +5 -5
- {biopipen-0.27.9 → biopipen-1.1.4}/biopipen/scripts/misc/Config2File.py +2 -2
- biopipen-1.1.4/biopipen/scripts/misc/Plot.R +80 -0
- biopipen-1.1.4/biopipen/scripts/misc/Shell.sh +15 -0
- biopipen-1.1.4/biopipen/scripts/misc/Str2File.py +6 -0
- {biopipen-0.27.9 → biopipen-1.1.4}/biopipen/scripts/plot/Heatmap.R +3 -3
- biopipen-1.1.4/biopipen/scripts/plot/Manhattan.R +147 -0
- biopipen-1.1.4/biopipen/scripts/plot/QQPlot.R +146 -0
- {biopipen-0.27.9 → biopipen-1.1.4}/biopipen/scripts/plot/ROC.R +1 -1
- biopipen-1.1.4/biopipen/scripts/plot/Scatter.R +112 -0
- {biopipen-0.27.9 → biopipen-1.1.4}/biopipen/scripts/plot/VennDiagram.R +5 -9
- biopipen-1.1.4/biopipen/scripts/protein/MMCIF2PDB.py +33 -0
- biopipen-1.1.4/biopipen/scripts/protein/PDB2Fasta.py +60 -0
- biopipen-1.1.4/biopipen/scripts/protein/Prodigy.py +119 -0
- biopipen-1.1.4/biopipen/scripts/protein/ProdigySummary.R +140 -0
- biopipen-1.1.4/biopipen/scripts/protein/RMSD.py +178 -0
- biopipen-1.1.4/biopipen/scripts/regulatory/MotifAffinityTest.R +102 -0
- biopipen-1.1.4/biopipen/scripts/regulatory/MotifAffinityTest_AtSNP.R +127 -0
- biopipen-1.1.4/biopipen/scripts/regulatory/MotifAffinityTest_MotifBreakR.R +104 -0
- biopipen-1.1.4/biopipen/scripts/regulatory/MotifScan.py +159 -0
- biopipen-1.1.4/biopipen/scripts/regulatory/VariantMotifPlot.R +78 -0
- biopipen-1.1.4/biopipen/scripts/regulatory/motifs-common.R +324 -0
- {biopipen-0.27.9 → biopipen-1.1.4}/biopipen/scripts/rnaseq/Simulation-ESCO.R +14 -11
- {biopipen-0.27.9 → biopipen-1.1.4}/biopipen/scripts/rnaseq/Simulation-RUVcorr.R +7 -4
- {biopipen-0.27.9 → biopipen-1.1.4}/biopipen/scripts/rnaseq/Simulation.R +0 -2
- {biopipen-0.27.9 → biopipen-1.1.4}/biopipen/scripts/rnaseq/UnitConversion.R +6 -4
- biopipen-1.1.4/biopipen/scripts/scrna/AnnData2Seurat.R +44 -0
- biopipen-1.1.4/biopipen/scripts/scrna/CCPlotR-patch.R +161 -0
- biopipen-1.1.4/biopipen/scripts/scrna/CellCellCommunication.py +150 -0
- biopipen-1.1.4/biopipen/scripts/scrna/CellCellCommunicationPlots.R +93 -0
- biopipen-1.1.4/biopipen/scripts/scrna/CellSNPLite.py +253 -0
- biopipen-1.1.4/biopipen/scripts/scrna/CellTypeAnnotation-celltypist.R +234 -0
- biopipen-1.1.4/biopipen/scripts/scrna/CellTypeAnnotation-direct.R +69 -0
- biopipen-1.1.4/biopipen/scripts/scrna/CellTypeAnnotation-hitype.R +59 -0
- biopipen-1.1.4/biopipen/scripts/scrna/CellTypeAnnotation-sccatch.R +53 -0
- {biopipen-0.27.9 → biopipen-1.1.4}/biopipen/scripts/scrna/CellTypeAnnotation-sctype.R +29 -33
- biopipen-1.1.4/biopipen/scripts/scrna/CellTypeAnnotation.R +59 -0
- {biopipen-0.27.9 → biopipen-1.1.4}/biopipen/scripts/scrna/CellsDistribution.R +38 -10
- {biopipen-0.27.9 → biopipen-1.1.4}/biopipen/scripts/scrna/DimPlots.R +1 -1
- biopipen-1.1.4/biopipen/scripts/scrna/ExprImputation-alra.R +109 -0
- biopipen-1.1.4/biopipen/scripts/scrna/ExprImputation-rmagic.R +256 -0
- {biopipen-0.27.9 → biopipen-1.1.4}/biopipen/scripts/scrna/ExprImputation-scimpute.R +8 -5
- biopipen-1.1.4/biopipen/scripts/scrna/LoomTo10X.R +51 -0
- biopipen-1.1.4/biopipen/scripts/scrna/MQuad.py +57 -0
- biopipen-1.1.4/biopipen/scripts/scrna/MQuadMerge.py +106 -0
- biopipen-1.1.4/biopipen/scripts/scrna/MarkersFinder.R +748 -0
- {biopipen-0.27.9 → biopipen-1.1.4}/biopipen/scripts/scrna/MetaMarkers.R +41 -14
- {biopipen-0.27.9 → biopipen-1.1.4}/biopipen/scripts/scrna/ModuleScoreCalculator.R +23 -13
- biopipen-1.1.4/biopipen/scripts/scrna/PseudoBulkDEG.R +679 -0
- {biopipen-0.27.9 → biopipen-1.1.4}/biopipen/scripts/scrna/RadarPlots.R +77 -37
- biopipen-1.1.4/biopipen/scripts/scrna/ScFGSEA.R +346 -0
- biopipen-1.1.4/biopipen/scripts/scrna/ScSimulation.R +65 -0
- biopipen-1.1.4/biopipen/scripts/scrna/ScVelo.py +617 -0
- biopipen-1.1.4/biopipen/scripts/scrna/Seurat2AnnData.R +7 -0
- biopipen-1.1.4/biopipen/scripts/scrna/SeuratClusterStats-clustree.R +87 -0
- biopipen-1.1.4/biopipen/scripts/scrna/SeuratClusterStats-dimplots.R +50 -0
- biopipen-1.1.4/biopipen/scripts/scrna/SeuratClusterStats-features.R +188 -0
- biopipen-1.1.4/biopipen/scripts/scrna/SeuratClusterStats-ngenes.R +81 -0
- biopipen-1.1.4/biopipen/scripts/scrna/SeuratClusterStats-stats.R +97 -0
- biopipen-1.1.4/biopipen/scripts/scrna/SeuratClusterStats.R +58 -0
- biopipen-1.1.4/biopipen/scripts/scrna/SeuratClustering.R +43 -0
- {biopipen-0.27.9 → biopipen-1.1.4}/biopipen/scripts/scrna/SeuratLoading.R +2 -2
- biopipen-1.1.4/biopipen/scripts/scrna/SeuratMap2Ref.R +110 -0
- {biopipen-0.27.9 → biopipen-1.1.4}/biopipen/scripts/scrna/SeuratMetadataMutater.R +12 -7
- biopipen-1.1.4/biopipen/scripts/scrna/SeuratPreparing.R +259 -0
- biopipen-1.1.4/biopipen/scripts/scrna/SeuratSubClustering.R +64 -0
- biopipen-1.1.4/biopipen/scripts/scrna/Slingshot.R +65 -0
- {biopipen-0.27.9 → biopipen-1.1.4}/biopipen/scripts/scrna/Subset10X.R +2 -2
- biopipen-1.1.4/biopipen/scripts/scrna/TopExpressingGenes.R +209 -0
- biopipen-1.1.4/biopipen/scripts/scrna/VireoSNP.py +401 -0
- biopipen-1.1.4/biopipen/scripts/scrna/celltypist-wrapper.py +195 -0
- biopipen-1.1.4/biopipen/scripts/scrna/mquad_cli.py +501 -0
- biopipen-1.1.4/biopipen/scripts/scrna/scvelo_paga.py +313 -0
- biopipen-1.1.4/biopipen/scripts/scrna/seurat_anndata_conversion.py +98 -0
- biopipen-1.1.4/biopipen/scripts/scrna_metabolic_landscape/MetabolicFeatures.R +477 -0
- biopipen-1.1.4/biopipen/scripts/scrna_metabolic_landscape/MetabolicPathwayActivity.R +498 -0
- biopipen-1.1.4/biopipen/scripts/scrna_metabolic_landscape/MetabolicPathwayHeterogeneity.R +264 -0
- biopipen-1.1.4/biopipen/scripts/snp/MatrixEQTL.R +217 -0
- biopipen-1.1.4/biopipen/scripts/snp/Plink2GTMat.py +148 -0
- biopipen-1.1.4/biopipen/scripts/snp/PlinkCallRate.R +199 -0
- biopipen-1.1.4/biopipen/scripts/snp/PlinkFilter.py +100 -0
- biopipen-1.1.4/biopipen/scripts/snp/PlinkFreq.R +291 -0
- biopipen-1.1.4/biopipen/scripts/snp/PlinkFromVcf.py +81 -0
- biopipen-1.1.4/biopipen/scripts/snp/PlinkHWE.R +85 -0
- biopipen-1.1.4/biopipen/scripts/snp/PlinkHet.R +96 -0
- biopipen-1.1.4/biopipen/scripts/snp/PlinkIBD.R +196 -0
- {biopipen-0.27.9 → biopipen-1.1.4}/biopipen/scripts/snp/PlinkSimulation.py +4 -4
- biopipen-1.1.4/biopipen/scripts/snp/PlinkUpdateName.py +124 -0
- {biopipen-0.27.9 → biopipen-1.1.4}/biopipen/scripts/stats/ChowTest.R +57 -30
- {biopipen-0.27.9 → biopipen-1.1.4}/biopipen/scripts/stats/DiffCoexpr.R +13 -11
- {biopipen-0.27.9 → biopipen-1.1.4}/biopipen/scripts/stats/LiquidAssoc.R +7 -8
- biopipen-1.1.4/biopipen/scripts/stats/Mediation.R +108 -0
- {biopipen-0.27.9 → biopipen-1.1.4}/biopipen/scripts/stats/MetaPvalue.R +16 -14
- biopipen-1.1.4/biopipen/scripts/stats/MetaPvalue1.R +74 -0
- {biopipen-0.27.9 → biopipen-1.1.4}/biopipen/scripts/tcgamaf/Maf2Vcf.py +2 -2
- {biopipen-0.27.9 → biopipen-1.1.4}/biopipen/scripts/tcgamaf/MafAddChr.py +2 -2
- {biopipen-0.27.9 → biopipen-1.1.4}/biopipen/scripts/tcr/Attach2Seurat.R +1 -1
- {biopipen-0.27.9 → biopipen-1.1.4}/biopipen/scripts/tcr/CDR3AAPhyschem.R +109 -153
- biopipen-1.1.4/biopipen/scripts/tcr/CDR3Clustering.R +344 -0
- biopipen-1.1.4/biopipen/scripts/tcr/ClonalStats.R +526 -0
- {biopipen-0.27.9 → biopipen-1.1.4}/biopipen/scripts/tcr/CloneResidency.R +28 -10
- {biopipen-0.27.9 → biopipen-1.1.4}/biopipen/scripts/tcr/CloneSizeQQPlot.R +4 -4
- biopipen-1.1.4/biopipen/scripts/tcr/GIANA/GIANA.py +1817 -0
- biopipen-1.1.4/biopipen/scripts/tcr/GIANA/GIANA4.py +1781 -0
- biopipen-1.1.4/biopipen/scripts/tcr/GIANA/query.py +226 -0
- {biopipen-0.27.9 → biopipen-1.1.4}/biopipen/scripts/tcr/Immunarch-basic.R +8 -5
- {biopipen-0.27.9 → biopipen-1.1.4}/biopipen/scripts/tcr/Immunarch-clonality.R +5 -4
- {biopipen-0.27.9 → biopipen-1.1.4}/biopipen/scripts/tcr/Immunarch-diversity.R +27 -28
- {biopipen-0.27.9 → biopipen-1.1.4}/biopipen/scripts/tcr/Immunarch-geneusage.R +15 -3
- {biopipen-0.27.9 → biopipen-1.1.4}/biopipen/scripts/tcr/Immunarch-kmer.R +14 -3
- {biopipen-0.27.9 → biopipen-1.1.4}/biopipen/scripts/tcr/Immunarch-overlap.R +15 -3
- {biopipen-0.27.9 → biopipen-1.1.4}/biopipen/scripts/tcr/Immunarch-spectratyping.R +10 -3
- {biopipen-0.27.9 → biopipen-1.1.4}/biopipen/scripts/tcr/Immunarch-tracking.R +6 -2
- {biopipen-0.27.9 → biopipen-1.1.4}/biopipen/scripts/tcr/Immunarch-vjjunc.R +33 -2
- {biopipen-0.27.9 → biopipen-1.1.4}/biopipen/scripts/tcr/Immunarch.R +43 -11
- {biopipen-0.27.9 → biopipen-1.1.4}/biopipen/scripts/tcr/Immunarch2VDJtools.R +2 -2
- {biopipen-0.27.9 → biopipen-1.1.4}/biopipen/scripts/tcr/ImmunarchFilter.R +4 -4
- {biopipen-0.27.9 → biopipen-1.1.4}/biopipen/scripts/tcr/ImmunarchLoading.R +7 -7
- {biopipen-0.27.9 → biopipen-1.1.4}/biopipen/scripts/tcr/SampleDiversity.R +1 -1
- biopipen-1.1.4/biopipen/scripts/tcr/ScRepCombiningExpression.R +40 -0
- biopipen-1.1.4/biopipen/scripts/tcr/ScRepLoading.R +166 -0
- {biopipen-0.27.9 → biopipen-1.1.4}/biopipen/scripts/tcr/TCRClusterStats.R +40 -18
- {biopipen-0.27.9 → biopipen-1.1.4}/biopipen/scripts/tcr/TCRDock.py +10 -6
- biopipen-1.1.4/biopipen/scripts/tcr/TESSA.R +187 -0
- {biopipen-0.27.9 → biopipen-1.1.4}/biopipen/scripts/tcr/TESSA_source/BriseisEncoder.py +52 -3
- biopipen-1.1.4/biopipen/scripts/tcr/TESSA_source/KERAS_MIGRATION.md +106 -0
- biopipen-1.1.4/biopipen/scripts/tcr/TESSA_source/migrate_keras_model.py +124 -0
- {biopipen-0.27.9 → biopipen-1.1.4}/biopipen/scripts/tcr/VJUsage.R +5 -5
- {biopipen-0.27.9 → biopipen-1.1.4}/biopipen/scripts/tcr/vdjtools-patch.sh +1 -1
- biopipen-1.1.4/biopipen/scripts/vcf/BcftoolsAnnotate.py +91 -0
- biopipen-1.1.4/biopipen/scripts/vcf/BcftoolsFilter.py +90 -0
- biopipen-1.1.4/biopipen/scripts/vcf/BcftoolsMerge.py +32 -0
- biopipen-1.1.4/biopipen/scripts/vcf/BcftoolsSort.py +113 -0
- biopipen-1.1.4/biopipen/scripts/vcf/BcftoolsView.py +73 -0
- {biopipen-0.27.9 → biopipen-1.1.4}/biopipen/scripts/vcf/TruvariBench.sh +14 -7
- {biopipen-0.27.9 → biopipen-1.1.4}/biopipen/scripts/vcf/TruvariBenchSummary.R +16 -13
- {biopipen-0.27.9 → biopipen-1.1.4}/biopipen/scripts/vcf/TruvariConsistency.R +1 -1
- {biopipen-0.27.9 → biopipen-1.1.4}/biopipen/scripts/vcf/Vcf2Bed.py +2 -2
- biopipen-1.1.4/biopipen/scripts/vcf/VcfAnno.py +26 -0
- biopipen-1.1.4/biopipen/scripts/vcf/VcfDownSample.sh +37 -0
- {biopipen-0.27.9 → biopipen-1.1.4}/biopipen/scripts/vcf/VcfFilter.py +5 -5
- {biopipen-0.27.9 → biopipen-1.1.4}/biopipen/scripts/vcf/VcfFix.py +7 -7
- {biopipen-0.27.9 → biopipen-1.1.4}/biopipen/scripts/vcf/VcfFix_utils.py +13 -4
- {biopipen-0.27.9 → biopipen-1.1.4}/biopipen/scripts/vcf/VcfIndex.py +3 -3
- {biopipen-0.27.9 → biopipen-1.1.4}/biopipen/scripts/vcf/VcfIntersect.py +3 -3
- {biopipen-0.27.9 → biopipen-1.1.4}/biopipen/scripts/vcf/VcfLiftOver.sh +5 -0
- {biopipen-0.27.9 → biopipen-1.1.4}/biopipen/scripts/vcf/VcfSplitSamples.py +4 -4
- biopipen-1.1.4/biopipen/scripts/vcf/bcftools_utils.py +52 -0
- {biopipen-0.27.9 → biopipen-1.1.4}/biopipen/scripts/web/Download.py +8 -4
- {biopipen-0.27.9 → biopipen-1.1.4}/biopipen/scripts/web/DownloadList.py +5 -5
- biopipen-1.1.4/biopipen/scripts/web/GCloudStorageDownloadBucket.py +82 -0
- biopipen-1.1.4/biopipen/scripts/web/GCloudStorageDownloadFile.py +23 -0
- biopipen-1.1.4/biopipen/scripts/web/gcloud_common.py +49 -0
- biopipen-1.1.4/biopipen/utils/gene.py +134 -0
- biopipen-1.1.4/biopipen/utils/misc.py +254 -0
- {biopipen-0.27.9 → biopipen-1.1.4}/biopipen/utils/reference.py +64 -20
- biopipen-1.1.4/biopipen/utils/reporter.py +177 -0
- {biopipen-0.27.9 → biopipen-1.1.4}/biopipen/utils/vcf.py +1 -1
- {biopipen-0.27.9 → biopipen-1.1.4}/pyproject.toml +20 -13
- {biopipen-0.27.9 → biopipen-1.1.4}/setup.py +19 -13
- biopipen-0.27.9/PKG-INFO +0 -22
- biopipen-0.27.9/biopipen/__init__.py +0 -1
- biopipen-0.27.9/biopipen/ns/bcftools.py +0 -111
- biopipen-0.27.9/biopipen/ns/cellranger.py +0 -132
- biopipen-0.27.9/biopipen/ns/gene.py +0 -54
- biopipen-0.27.9/biopipen/ns/plot.py +0 -152
- biopipen-0.27.9/biopipen/ns/scrna.py +0 -2195
- biopipen-0.27.9/biopipen/ns/scrna_metabolic_landscape.py +0 -670
- biopipen-0.27.9/biopipen/ns/snp.py +0 -138
- biopipen-0.27.9/biopipen/ns/web.py +0 -78
- biopipen-0.27.9/biopipen/reports/scrna/ScFGSEA.svelte +0 -16
- biopipen-0.27.9/biopipen/reports/scrna/SeuratClusterStats.svelte +0 -16
- biopipen-0.27.9/biopipen/reports/scrna/SeuratMap2Ref.svelte +0 -20
- biopipen-0.27.9/biopipen/reports/scrna/TopExpressingGenes.svelte +0 -17
- biopipen-0.27.9/biopipen/reports/scrna_metabolic_landscape/MetabolicFeatures.svelte +0 -32
- biopipen-0.27.9/biopipen/reports/scrna_metabolic_landscape/MetabolicFeaturesIntraSubset.svelte +0 -28
- biopipen-0.27.9/biopipen/reports/scrna_metabolic_landscape/MetabolicPathwayActivity.svelte +0 -89
- biopipen-0.27.9/biopipen/reports/scrna_metabolic_landscape/MetabolicPathwayHeterogeneity.svelte +0 -15
- biopipen-0.27.9/biopipen/reports/utils/gsea.liq +0 -110
- biopipen-0.27.9/biopipen/scripts/bcftools/BcftoolsAnnotate.py +0 -42
- biopipen-0.27.9/biopipen/scripts/bcftools/BcftoolsFilter.py +0 -79
- biopipen-0.27.9/biopipen/scripts/bcftools/BcftoolsSort.py +0 -19
- biopipen-0.27.9/biopipen/scripts/bed/BedtoolsMerge.py +0 -11
- biopipen-0.27.9/biopipen/scripts/cellranger/CellRangerCount.py +0 -79
- biopipen-0.27.9/biopipen/scripts/cellranger/CellRangerVdj.py +0 -79
- biopipen-0.27.9/biopipen/scripts/cnv/AneuploidyScoreSummary.R +0 -339
- biopipen-0.27.9/biopipen/scripts/cnv/TMADScore.R +0 -35
- biopipen-0.27.9/biopipen/scripts/cnv/TMADScoreSummary.R +0 -193
- biopipen-0.27.9/biopipen/scripts/cnvkit/CNVkitAccess.py +0 -24
- biopipen-0.27.9/biopipen/scripts/cnvkit/CNVkitAutobin.py +0 -44
- biopipen-0.27.9/biopipen/scripts/delim/SampleInfo.R +0 -196
- biopipen-0.27.9/biopipen/scripts/gene/GeneNameConversion.py +0 -66
- biopipen-0.27.9/biopipen/scripts/gsea/FGSEA.R +0 -58
- biopipen-0.27.9/biopipen/scripts/misc/Str2File.py +0 -6
- biopipen-0.27.9/biopipen/scripts/scrna/AnnData2Seurat.R +0 -79
- biopipen-0.27.9/biopipen/scripts/scrna/CellTypeAnnotation-celltypist.R +0 -236
- biopipen-0.27.9/biopipen/scripts/scrna/CellTypeAnnotation-direct.R +0 -59
- biopipen-0.27.9/biopipen/scripts/scrna/CellTypeAnnotation-hitype.R +0 -69
- biopipen-0.27.9/biopipen/scripts/scrna/CellTypeAnnotation-sccatch.R +0 -58
- biopipen-0.27.9/biopipen/scripts/scrna/CellTypeAnnotation.R +0 -15
- biopipen-0.27.9/biopipen/scripts/scrna/ExprImputation-alra.R +0 -33
- biopipen-0.27.9/biopipen/scripts/scrna/ExprImputation-rmagic.R +0 -30
- biopipen-0.27.9/biopipen/scripts/scrna/MarkersFinder.R +0 -703
- biopipen-0.27.9/biopipen/scripts/scrna/ScFGSEA.R +0 -193
- biopipen-0.27.9/biopipen/scripts/scrna/Seurat2AnnData.R +0 -48
- biopipen-0.27.9/biopipen/scripts/scrna/SeuratClusterStats-dimplots.R +0 -70
- biopipen-0.27.9/biopipen/scripts/scrna/SeuratClusterStats-features.R +0 -444
- biopipen-0.27.9/biopipen/scripts/scrna/SeuratClusterStats-hists.R +0 -138
- biopipen-0.27.9/biopipen/scripts/scrna/SeuratClusterStats-ngenes.R +0 -69
- biopipen-0.27.9/biopipen/scripts/scrna/SeuratClusterStats-stats.R +0 -257
- biopipen-0.27.9/biopipen/scripts/scrna/SeuratClusterStats.R +0 -44
- biopipen-0.27.9/biopipen/scripts/scrna/SeuratClustering.R +0 -174
- biopipen-0.27.9/biopipen/scripts/scrna/SeuratMap2Ref.R +0 -302
- biopipen-0.27.9/biopipen/scripts/scrna/SeuratPreparing.R +0 -552
- biopipen-0.27.9/biopipen/scripts/scrna/SeuratSubClustering.R +0 -169
- biopipen-0.27.9/biopipen/scripts/scrna/TopExpressingGenes.R +0 -251
- biopipen-0.27.9/biopipen/scripts/scrna/celltypist-wrapper.py +0 -54
- biopipen-0.27.9/biopipen/scripts/scrna_metabolic_landscape/MetabolicFeatures.R +0 -162
- biopipen-0.27.9/biopipen/scripts/scrna_metabolic_landscape/MetabolicFeaturesIntraSubset.R +0 -189
- biopipen-0.27.9/biopipen/scripts/scrna_metabolic_landscape/MetabolicPathwayActivity.R +0 -397
- biopipen-0.27.9/biopipen/scripts/scrna_metabolic_landscape/MetabolicPathwayHeterogeneity.R +0 -254
- biopipen-0.27.9/biopipen/scripts/snp/MatrixEQTL.R +0 -157
- biopipen-0.27.9/biopipen/scripts/tcr/GIANA/GIANA.py +0 -1258
- biopipen-0.27.9/biopipen/scripts/tcr/GIANA/GIANA4.py +0 -1208
- biopipen-0.27.9/biopipen/scripts/tcr/GIANA/query.py +0 -224
- biopipen-0.27.9/biopipen/scripts/tcr/TCRClustering.R +0 -298
- biopipen-0.27.9/biopipen/scripts/tcr/TESSA.R +0 -230
- biopipen-0.27.9/biopipen/scripts/vcf/VcfAnno.py +0 -26
- biopipen-0.27.9/biopipen/scripts/vcf/VcfDownSample.sh +0 -25
- biopipen-0.27.9/biopipen/utils/caching.R +0 -44
- biopipen-0.27.9/biopipen/utils/common_docstrs.py +0 -100
- biopipen-0.27.9/biopipen/utils/gene.R +0 -49
- biopipen-0.27.9/biopipen/utils/gene.py +0 -86
- biopipen-0.27.9/biopipen/utils/gsea.R +0 -275
- biopipen-0.27.9/biopipen/utils/io.R +0 -20
- biopipen-0.27.9/biopipen/utils/misc.R +0 -348
- biopipen-0.27.9/biopipen/utils/misc.py +0 -122
- biopipen-0.27.9/biopipen/utils/mutate_helpers.R +0 -581
- biopipen-0.27.9/biopipen/utils/plot.R +0 -173
- biopipen-0.27.9/biopipen/utils/rnaseq.R +0 -48
- biopipen-0.27.9/biopipen/utils/single_cell.R +0 -116
- {biopipen-0.27.9 → biopipen-1.1.4}/biopipen/core/__init__.py +0 -0
- {biopipen-0.27.9 → biopipen-1.1.4}/biopipen/core/config.py +0 -0
- {biopipen-0.27.9 → biopipen-1.1.4}/biopipen/core/defaults.py +0 -0
- {biopipen-0.27.9 → biopipen-1.1.4}/biopipen/ns/__init__.py +0 -0
- {biopipen-0.27.9 → biopipen-1.1.4}/biopipen/ns/rnaseq.py +0 -0
- {biopipen-0.27.9 → biopipen-1.1.4}/biopipen/ns/tcgamaf.py +0 -0
- {biopipen-0.27.9 → biopipen-1.1.4}/biopipen/reports/bam/CNAClinic.svelte +0 -0
- {biopipen-0.27.9 → biopipen-1.1.4}/biopipen/reports/bam/ControlFREEC.svelte +0 -0
- {biopipen-0.27.9 → biopipen-1.1.4}/biopipen/reports/cellranger/CellRangerCount.svelte +0 -0
- {biopipen-0.27.9 → biopipen-1.1.4}/biopipen/reports/cellranger/CellRangerSummary.svelte +0 -0
- {biopipen-0.27.9 → biopipen-1.1.4}/biopipen/reports/cellranger/CellRangerVdj.svelte +0 -0
- {biopipen-0.27.9 → biopipen-1.1.4}/biopipen/reports/cnv/AneuploidyScore.svelte +0 -0
- {biopipen-0.27.9 → biopipen-1.1.4}/biopipen/reports/cnv/AneuploidyScoreSummary.svelte +0 -0
- {biopipen-0.27.9 → biopipen-1.1.4}/biopipen/reports/cnv/TMADScoreSummary.svelte +0 -0
- {biopipen-0.27.9 → biopipen-1.1.4}/biopipen/reports/gsea/FGSEA.svelte +0 -0
- {biopipen-0.27.9 → biopipen-1.1.4}/biopipen/reports/gsea/GSEA.svelte +0 -0
- {biopipen-0.27.9 → biopipen-1.1.4}/biopipen/reports/scrna/CellsDistribution.svelte +0 -0
- {biopipen-0.27.9 → biopipen-1.1.4}/biopipen/reports/scrna/MarkersFinder.svelte +0 -0
- {biopipen-0.27.9 → biopipen-1.1.4}/biopipen/reports/scrna/MetaMarkers.svelte +0 -0
- {biopipen-0.27.9 → biopipen-1.1.4}/biopipen/reports/scrna/RadarPlots.svelte +0 -0
- {biopipen-0.27.9 → biopipen-1.1.4}/biopipen/reports/tcr/CloneResidency.svelte +0 -0
- {biopipen-0.27.9 → biopipen-1.1.4}/biopipen/reports/tcr/Immunarch.svelte +0 -0
- {biopipen-0.27.9 → biopipen-1.1.4}/biopipen/reports/tcr/SampleDiversity.svelte +0 -0
- {biopipen-0.27.9 → biopipen-1.1.4}/biopipen/reports/tcr/TCRClusterStats.svelte +0 -0
- {biopipen-0.27.9 → biopipen-1.1.4}/biopipen/reports/tcr/TESSA.svelte +0 -0
- {biopipen-0.27.9 → biopipen-1.1.4}/biopipen/reports/tcr/VJUsage.svelte +0 -0
- {biopipen-0.27.9 → biopipen-1.1.4}/biopipen/reports/vcf/TruvariBenchSummary.svelte +0 -0
- {biopipen-0.27.9 → biopipen-1.1.4}/biopipen/reports/vcf/TruvariConsistency.svelte +0 -0
- {biopipen-0.27.9 → biopipen-1.1.4}/biopipen/scripts/scrna/ExprImputation.R +0 -0
- {biopipen-0.27.9 → biopipen-1.1.4}/biopipen/scripts/scrna/SCImpute.R +0 -0
- {biopipen-0.27.9 → biopipen-1.1.4}/biopipen/scripts/scrna/SeuratFilter.R +0 -0
- {biopipen-0.27.9 → biopipen-1.1.4}/biopipen/scripts/scrna/SeuratSplit.R +0 -0
- {biopipen-0.27.9 → biopipen-1.1.4}/biopipen/scripts/scrna/SeuratSubset.R +0 -0
- {biopipen-0.27.9 → biopipen-1.1.4}/biopipen/scripts/scrna/SeuratTo10X.R +0 -0
- {biopipen-0.27.9 → biopipen-1.1.4}/biopipen/scripts/scrna/sctype.R +0 -0
- {biopipen-0.27.9 → biopipen-1.1.4}/biopipen/scripts/tcgamaf/maf2vcf.pl +0 -0
- {biopipen-0.27.9 → biopipen-1.1.4}/biopipen/scripts/tcr/GIANA/Imgt_Human_TRBV.fasta +0 -0
- {biopipen-0.27.9 → biopipen-1.1.4}/biopipen/scripts/tcr/ImmunarchSplitIdents.R +0 -0
- {biopipen-0.27.9 → biopipen-1.1.4}/biopipen/scripts/tcr/TESSA_source/Atchley_factors.csv +0 -0
- {biopipen-0.27.9 → biopipen-1.1.4}/biopipen/scripts/tcr/TESSA_source/MCMC_control.R +0 -0
- {biopipen-0.27.9 → biopipen-1.1.4}/biopipen/scripts/tcr/TESSA_source/TrainedEncoder.h5 +0 -0
- {biopipen-0.27.9 → biopipen-1.1.4}/biopipen/scripts/tcr/TESSA_source/fixed_b.csv +0 -0
- {biopipen-0.27.9 → biopipen-1.1.4}/biopipen/scripts/tcr/TESSA_source/initialization.R +0 -0
- {biopipen-0.27.9 → biopipen-1.1.4}/biopipen/scripts/tcr/TESSA_source/post_analysis.R +0 -0
- {biopipen-0.27.9 → biopipen-1.1.4}/biopipen/scripts/tcr/TESSA_source/real_data.R +0 -0
- {biopipen-0.27.9 → biopipen-1.1.4}/biopipen/scripts/tcr/TESSA_source/update.R +0 -0
- {biopipen-0.27.9 → biopipen-1.1.4}/biopipen/scripts/tcr/TESSA_source/utility.R +0 -0
- {biopipen-0.27.9 → biopipen-1.1.4}/biopipen/scripts/tcr/immunarch-patched.R +0 -0
- {biopipen-0.27.9 → biopipen-1.1.4}/biopipen/utils/__init__.py +0 -0
biopipen-1.1.4/PKG-INFO
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: biopipen
|
|
3
|
+
Version: 1.1.4
|
|
4
|
+
Summary: Bioinformatics processes/pipelines that can be run from `pipen run`
|
|
5
|
+
License: MIT
|
|
6
|
+
Author: pwwang
|
|
7
|
+
Author-email: pwwang@pwwang.com
|
|
8
|
+
Requires-Python: >=3.9,<4.0
|
|
9
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
10
|
+
Classifier: Programming Language :: Python :: 3
|
|
11
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
17
|
+
Provides-Extra: log2file
|
|
18
|
+
Provides-Extra: runinfo
|
|
19
|
+
Requires-Dist: datar[pandas] (>=0.15.8,<0.16.0)
|
|
20
|
+
Requires-Dist: pipen-board[report] (>=1.1,<2.0)
|
|
21
|
+
Requires-Dist: pipen-cli-run (>=1.0,<2.0)
|
|
22
|
+
Requires-Dist: pipen-deprecated (>=1.0,<2.0)
|
|
23
|
+
Requires-Dist: pipen-filters (>=1.1.2,<2.0.0)
|
|
24
|
+
Requires-Dist: pipen-log2file (>=1.1,<2.0) ; extra == "log2file"
|
|
25
|
+
Requires-Dist: pipen-poplog (>=1.1,<2.0)
|
|
26
|
+
Requires-Dist: pipen-runinfo (>=1.1,<2.0) ; extra == "runinfo"
|
|
27
|
+
Requires-Dist: pipen-verbose (>=1.1,<2.0)
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "1.1.4"
|
|
@@ -1,11 +1,17 @@
|
|
|
1
1
|
# Executables or binaries
|
|
2
2
|
[exe]
|
|
3
|
+
# BeEM: https://github.com/kad-ecoli/BeEM
|
|
4
|
+
beem = "BeEM"
|
|
3
5
|
# bedtools to handle bed files
|
|
4
6
|
bedtools = "bedtools"
|
|
5
7
|
# bcftools to handle bcf/vcf files
|
|
6
8
|
bcftools = "bcftools"
|
|
9
|
+
# calculate_rmsd: https://github.com/charnley/rmsd
|
|
10
|
+
calculate_rmsd = "calculate_rmsd"
|
|
7
11
|
# cellranger
|
|
8
12
|
cellranger = "cellranger"
|
|
13
|
+
# cellsnp-lite
|
|
14
|
+
cellsnp_lite = "cellsnp-lite"
|
|
9
15
|
# Control-FREEC to call cnvs
|
|
10
16
|
freec = "freec"
|
|
11
17
|
# liftover coordinates across genomes
|
|
@@ -13,6 +19,8 @@ liftover = "liftOver"
|
|
|
13
19
|
# gatk, installed via conda
|
|
14
20
|
gatk = "gatk"
|
|
15
21
|
gatk4 = "gatk"
|
|
22
|
+
# google cloud sdk
|
|
23
|
+
gcloud = "gcloud"
|
|
16
24
|
# vdjtools, installed via conda
|
|
17
25
|
vdjtools = "vdjtools"
|
|
18
26
|
# cnvkit.py
|
|
@@ -23,12 +31,20 @@ cnvpytor = "cnvpytor"
|
|
|
23
31
|
cnvnator2vcf = "cnvnator2VCF.pl"
|
|
24
32
|
# convert
|
|
25
33
|
convert = "convert"
|
|
34
|
+
# fimo from meme
|
|
35
|
+
fimo = "fimo"
|
|
36
|
+
# MAXIT: https://sw-tools.rcsb.org/apps/MAXIT/
|
|
37
|
+
maxit = "maxit"
|
|
38
|
+
# MQuad: https://github.com/single-cell-genetics/MQuad
|
|
39
|
+
mquad = "mquad"
|
|
26
40
|
# wget
|
|
27
41
|
wget = "wget"
|
|
28
42
|
# aria2c
|
|
29
43
|
aria2c = "aria2c"
|
|
30
44
|
# plink
|
|
31
45
|
plink = "plink"
|
|
46
|
+
# plink2
|
|
47
|
+
plink2 = "plink2"
|
|
32
48
|
# tabix
|
|
33
49
|
tabix = "tabix"
|
|
34
50
|
# sambamba
|
|
@@ -86,6 +102,10 @@ genome = ""
|
|
|
86
102
|
# Database file for scType
|
|
87
103
|
# https://github.com/IanevskiAleksandr/sc-type/
|
|
88
104
|
sctype_db = ""
|
|
105
|
+
# TF Motif database
|
|
106
|
+
tf_motifdb = ""
|
|
107
|
+
# TF motif pairs
|
|
108
|
+
tf_motifs = ""
|
|
89
109
|
|
|
90
110
|
[misc]
|
|
91
111
|
# Number of cores used for each job
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
"""Additional filters for pipen"""
|
|
2
2
|
from __future__ import annotations
|
|
3
3
|
|
|
4
|
+
import re
|
|
4
5
|
import shlex
|
|
5
6
|
from pathlib import Path
|
|
6
7
|
from typing import Any, List, Mapping
|
|
7
8
|
|
|
8
|
-
from argx import Namespace
|
|
9
|
+
from argx import Namespace # pyright: ignore[reportPrivateImportUsage]
|
|
9
10
|
from liquid.filters.manager import FilterManager
|
|
10
|
-
from pipen_report.filters import register_component,
|
|
11
|
+
from pipen_report.filters import register_component, _tag
|
|
12
|
+
|
|
13
|
+
# from .defaults import BIOPIPEN_DIR
|
|
11
14
|
|
|
12
15
|
filtermanager = FilterManager()
|
|
13
16
|
|
|
@@ -15,7 +18,7 @@ filtermanager = FilterManager()
|
|
|
15
18
|
@filtermanager.register
|
|
16
19
|
def dict_to_cli_args(
|
|
17
20
|
dic: Mapping[str, Any],
|
|
18
|
-
exclude: List[str] = None,
|
|
21
|
+
exclude: List[str] | None = None,
|
|
19
22
|
prefix: str | None = None,
|
|
20
23
|
sep: str | None = " ",
|
|
21
24
|
dup_key: bool = True,
|
|
@@ -28,7 +31,7 @@ def dict_to_cli_args(
|
|
|
28
31
|
|
|
29
32
|
Args:
|
|
30
33
|
dic: The dict to convert
|
|
31
|
-
exclude: The keys to exclude
|
|
34
|
+
exclude: The keys to exclude before conversion (e.g. dashify)
|
|
32
35
|
prefix: The prefix of the keys after conversion
|
|
33
36
|
Defaults to `None`, mean `-` for short keys and `--` for long keys
|
|
34
37
|
sep: The separator between key and value
|
|
@@ -118,7 +121,7 @@ def dict_to_cli_args(
|
|
|
118
121
|
def r(
|
|
119
122
|
obj: Any,
|
|
120
123
|
ignoreintkey: bool = True,
|
|
121
|
-
todot: str = None,
|
|
124
|
+
todot: str | None = None,
|
|
122
125
|
sortkeys: bool = False,
|
|
123
126
|
skip: int = 0,
|
|
124
127
|
_i: int = 0,
|
|
@@ -169,8 +172,10 @@ def r(
|
|
|
169
172
|
return "TRUE"
|
|
170
173
|
if obj.upper() == "FALSE":
|
|
171
174
|
return "FALSE"
|
|
172
|
-
if obj.upper() == "NA" or obj.upper() == "NULL":
|
|
175
|
+
if obj.upper() == "NA" or obj.upper() == "NULL" or obj == "None":
|
|
173
176
|
return obj.upper()
|
|
177
|
+
if re.match(r"^\d+:\d+$", obj):
|
|
178
|
+
return obj
|
|
174
179
|
if obj.startswith("r:") or obj.startswith("R:"):
|
|
175
180
|
return str(obj)[2:]
|
|
176
181
|
return repr(str(obj))
|
|
@@ -221,69 +226,31 @@ def r(
|
|
|
221
226
|
return repr(obj)
|
|
222
227
|
|
|
223
228
|
|
|
224
|
-
@
|
|
225
|
-
def
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
{
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
{
|
|
250
|
-
"title": "Plot",
|
|
251
|
-
"ui": "flat",
|
|
252
|
-
"contents": [
|
|
253
|
-
{
|
|
254
|
-
"kind": "image",
|
|
255
|
-
"src": str(Path(cont["dir"]).joinpath("gsea_table.png")),
|
|
256
|
-
}
|
|
257
|
-
],
|
|
258
|
-
},
|
|
259
|
-
{
|
|
260
|
-
"title": "Table",
|
|
261
|
-
"ui": "flat",
|
|
262
|
-
"contents": [
|
|
263
|
-
{
|
|
264
|
-
"kind": "table",
|
|
265
|
-
"src": str(Path(cont["dir"]).joinpath("fgsea.txt")),
|
|
266
|
-
"data": {"excluded": {"slug"}},
|
|
267
|
-
}
|
|
268
|
-
],
|
|
269
|
-
},
|
|
270
|
-
]
|
|
271
|
-
},
|
|
272
|
-
# Pathways
|
|
273
|
-
{
|
|
274
|
-
"title": f"Enriched Pathways (Top {n_pathways})",
|
|
275
|
-
"ui": "table_of_images",
|
|
276
|
-
"contents": [
|
|
277
|
-
{
|
|
278
|
-
"src": str(Path(cont["dir"]) / f"fgsea_{slug}.png"),
|
|
279
|
-
"title": pw,
|
|
280
|
-
}
|
|
281
|
-
for pw, slug in pathways
|
|
282
|
-
]
|
|
283
|
-
},
|
|
284
|
-
]
|
|
285
|
-
|
|
286
|
-
return render_ui(components, "accordion", job, level)
|
|
229
|
+
@filtermanager.register
|
|
230
|
+
def source_r(path: str | Path, chdir: bool = False) -> str:
|
|
231
|
+
"""Source an R script.
|
|
232
|
+
|
|
233
|
+
In addition to generating `source(path)`, we also include the mtime for the script
|
|
234
|
+
to trigger the job not cached when the script is updated.
|
|
235
|
+
|
|
236
|
+
If your process is used in a cloud environment, it is recommended to
|
|
237
|
+
use the `read` filter to load the script content instead of sourcing it using
|
|
238
|
+
the `source` function in R to void the path issue (path could be different
|
|
239
|
+
in different environments).
|
|
240
|
+
|
|
241
|
+
Args:
|
|
242
|
+
path: The path to the R script
|
|
243
|
+
|
|
244
|
+
Returns:
|
|
245
|
+
The R code to source the script
|
|
246
|
+
"""
|
|
247
|
+
path = Path(path)
|
|
248
|
+
mtime = int(path.stat().st_mtime)
|
|
249
|
+
return (
|
|
250
|
+
f"# Last modified: {mtime}\n"
|
|
251
|
+
# f"biopipen_dir = {r(BIOPIPEN_DIR)}\n"
|
|
252
|
+
f"source('{path}', chdir = {r(chdir)})"
|
|
253
|
+
)
|
|
287
254
|
|
|
288
255
|
|
|
289
256
|
@register_component("pdf")
|
|
@@ -313,72 +280,3 @@ def _render_gsea(
|
|
|
313
280
|
"""Render gsea report"""
|
|
314
281
|
# cont["dir"] is required
|
|
315
282
|
raise NotImplementedError()
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
@register_component("enrichr")
|
|
319
|
-
def _render_enrichr(
|
|
320
|
-
cont: Mapping[str, Any],
|
|
321
|
-
job: Mapping[str, Any],
|
|
322
|
-
level: int,
|
|
323
|
-
) -> str:
|
|
324
|
-
"""Render enrichr report"""
|
|
325
|
-
# cont["dir"] is required
|
|
326
|
-
dbs = [sumfile.stem[8:] for sumfile in Path(cont["dir"]).glob("Enrichr-*.txt")]
|
|
327
|
-
components = []
|
|
328
|
-
|
|
329
|
-
for db in dbs:
|
|
330
|
-
enrichr_plot = Path(cont["dir"]).joinpath(f"Enrichr-{db}.png")
|
|
331
|
-
if enrichr_plot.exists():
|
|
332
|
-
components.append(
|
|
333
|
-
{
|
|
334
|
-
"title": db,
|
|
335
|
-
"ui": "tabs",
|
|
336
|
-
"contents": [
|
|
337
|
-
{
|
|
338
|
-
"title": "Plot",
|
|
339
|
-
"ui": "flat",
|
|
340
|
-
"contents": [
|
|
341
|
-
{
|
|
342
|
-
"kind": "image",
|
|
343
|
-
"src": str(
|
|
344
|
-
Path(cont["dir"]).joinpath(f"Enrichr-{db}.png")
|
|
345
|
-
),
|
|
346
|
-
}
|
|
347
|
-
],
|
|
348
|
-
},
|
|
349
|
-
{
|
|
350
|
-
"title": "Table",
|
|
351
|
-
"ui": "flat",
|
|
352
|
-
"contents": [
|
|
353
|
-
{
|
|
354
|
-
"kind": "table",
|
|
355
|
-
"src": str(
|
|
356
|
-
Path(cont["dir"]).joinpath(f"Enrichr-{db}.txt")
|
|
357
|
-
),
|
|
358
|
-
}
|
|
359
|
-
],
|
|
360
|
-
},
|
|
361
|
-
],
|
|
362
|
-
}
|
|
363
|
-
)
|
|
364
|
-
else:
|
|
365
|
-
components.append(
|
|
366
|
-
{
|
|
367
|
-
"title": db,
|
|
368
|
-
"ui": "tabs",
|
|
369
|
-
"contents": [
|
|
370
|
-
{
|
|
371
|
-
"title": "Error",
|
|
372
|
-
"ui": "flat",
|
|
373
|
-
"contents": [
|
|
374
|
-
{
|
|
375
|
-
"kind": "error",
|
|
376
|
-
"content": "No enriched terms found.",
|
|
377
|
-
}
|
|
378
|
-
],
|
|
379
|
-
},
|
|
380
|
-
],
|
|
381
|
-
}
|
|
382
|
-
)
|
|
383
|
-
|
|
384
|
-
return render_ui(components, "accordion", job, level)
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
"""Provides a base class for the processes to subclass"""
|
|
2
|
-
from
|
|
2
|
+
from __future__ import annotations
|
|
3
|
+
|
|
4
|
+
from diot import Diot # type: ignore
|
|
3
5
|
from liquid.defaults import SEARCH_PATHS
|
|
4
|
-
from pipen import Proc as PipenProc
|
|
6
|
+
from pipen import Proc as PipenProc # type: ignore
|
|
5
7
|
from pipen_filters.filters import FILTERS
|
|
6
8
|
|
|
7
9
|
from .filters import filtermanager
|
|
@@ -23,7 +25,7 @@ class Proc(PipenProc):
|
|
|
23
25
|
template_opts = {
|
|
24
26
|
"globals": {**FILTERS, "biopipen_dir": str(BIOPIPEN_DIR)},
|
|
25
27
|
"filters": {**FILTERS, **filtermanager.filters},
|
|
26
|
-
"search_paths": SEARCH_PATHS + [str(REPORT_DIR)],
|
|
28
|
+
"search_paths": SEARCH_PATHS + [str(REPORT_DIR)], # type: ignore
|
|
27
29
|
}
|
|
28
30
|
|
|
29
31
|
plugin_opts = {
|
|
@@ -6,7 +6,8 @@ from pathlib import Path
|
|
|
6
6
|
from pipen import Pipen
|
|
7
7
|
|
|
8
8
|
TESTING_INDEX_INIT = 1
|
|
9
|
-
TESTING_PARENT_DIR = Path(
|
|
9
|
+
TESTING_PARENT_DIR = Path(__file__).parent.parent.parent.joinpath("tests", "running")
|
|
10
|
+
TESTING_PARENT_DIR.mkdir(parents=True, exist_ok=True)
|
|
10
11
|
TESTING_DIR = str(TESTING_PARENT_DIR.joinpath("biopipen-tests-%(index)s"))
|
|
11
12
|
RSCRIPT_DIR = TESTING_PARENT_DIR.joinpath("biopipen-tests-rscripts")
|
|
12
13
|
RSCRIPT_DIR.mkdir(exist_ok=True)
|
|
@@ -44,12 +45,19 @@ def get_pipeline(testfile, loglevel="debug", enable_report=False, **kwargs):
|
|
|
44
45
|
"""Get a pipeline for a test file"""
|
|
45
46
|
name, workdir, outdir = _get_test_dirs(testfile, False)
|
|
46
47
|
report_plugin_prefix = "+" if enable_report else "-"
|
|
48
|
+
plugins = kwargs.pop("plugins", [])
|
|
49
|
+
if any("report" in p for p in plugins if isinstance(p, str)):
|
|
50
|
+
raise ValueError(
|
|
51
|
+
"Do not pass `report` plugin to `get_pipeline(plugins=[...])`, "
|
|
52
|
+
"use `enable_report` instead."
|
|
53
|
+
)
|
|
54
|
+
plugins.append(f"{report_plugin_prefix}report")
|
|
47
55
|
kws = {
|
|
48
56
|
"name": name,
|
|
49
57
|
"workdir": workdir,
|
|
50
58
|
"outdir": outdir,
|
|
51
59
|
"loglevel": loglevel,
|
|
52
|
-
"plugins":
|
|
60
|
+
"plugins": plugins,
|
|
53
61
|
}
|
|
54
62
|
kws.update(kwargs)
|
|
55
63
|
return Pipen(**kws)
|
|
@@ -96,7 +104,12 @@ def r_test(mem: callable) -> callable:
|
|
|
96
104
|
)
|
|
97
105
|
rcode = f"{expect}\n\n{rcode}\n\ncat('PASSED')\n"
|
|
98
106
|
if source is not None:
|
|
99
|
-
|
|
107
|
+
if not isinstance(source, (list, tuple)):
|
|
108
|
+
source = [source]
|
|
109
|
+
|
|
110
|
+
libs = "\n".join([f"suppressWarnings(source('{s}'))" for s in source])
|
|
111
|
+
rcode = f'{libs}\n\n{rcode}'
|
|
112
|
+
|
|
100
113
|
out = _run_rcode(rcode)
|
|
101
114
|
self.assertEqual(
|
|
102
115
|
out,
|
|
@@ -4,6 +4,9 @@ from ..core.proc import Proc
|
|
|
4
4
|
from ..core.config import config
|
|
5
5
|
|
|
6
6
|
|
|
7
|
+
# +-------------------------------------------------------------------+
|
|
8
|
+
# | CNV callers |
|
|
9
|
+
# +-------------------------------------------------------------------+
|
|
7
10
|
class CNVpytor(Proc):
|
|
8
11
|
"""Detect CNV using CNVpytor
|
|
9
12
|
|
|
@@ -17,7 +20,6 @@ class CNVpytor(Proc):
|
|
|
17
20
|
|
|
18
21
|
Envs:
|
|
19
22
|
cnvpytor: Path to cnvpytor
|
|
20
|
-
cnvnator2vcf: Path to CNVnator2VCF.pl to convert the result to VCF file
|
|
21
23
|
samtools: Path to samtools, used to index bam file in case it's not
|
|
22
24
|
ncores: Number of cores to use (`-j` for cnvpytor)
|
|
23
25
|
refdir: The directory containing the fasta file for each chromosome
|
|
@@ -27,21 +29,19 @@ class CNVpytor(Proc):
|
|
|
27
29
|
binsizes: The binsizes
|
|
28
30
|
snp: How to read snp data
|
|
29
31
|
filters: The filters to filter the result
|
|
30
|
-
See - https://github.com/abyzovlab/CNVpytor/blob/master
|
|
31
|
-
/GettingStarted.md#predicting-cnv-regions
|
|
32
|
+
See - https://github.com/abyzovlab/CNVpytor/blob/master/GettingStarted.md#predicting-cnv-regions
|
|
32
33
|
mask_snps: Whether mask 1000 Genome snps
|
|
33
34
|
baf_nomask: Do not use P mask in BAF histograms
|
|
34
35
|
|
|
35
36
|
Requires:
|
|
36
37
|
cnvpytor:
|
|
37
38
|
- check: {{proc.envs.cnvpytor}} --version
|
|
38
|
-
"""
|
|
39
|
+
""" # noqa: E501
|
|
39
40
|
input = "bamfile:file, snpfile:file"
|
|
40
41
|
output = "outdir:dir:{{in.bamfile | stem}}.cnvpytor"
|
|
41
42
|
lang = config.lang.python
|
|
42
43
|
envs = {
|
|
43
44
|
"cnvpytor": config.exe.cnvpytor,
|
|
44
|
-
"cnvnator2vcf": config.exe.cnvnator2vcf,
|
|
45
45
|
"samtools": config.exe.samtools,
|
|
46
46
|
"ncores": config.misc.ncores,
|
|
47
47
|
"refdir": config.ref.refdir,
|
|
@@ -152,7 +152,7 @@ class CNAClinic(Proc):
|
|
|
152
152
|
A list of sample names
|
|
153
153
|
A float number (0 < x <= 1), the fraction of samples to use
|
|
154
154
|
A integer number (x > 1), the number of samples to use
|
|
155
|
-
binsize: Directly use this binsize for CNAClinic, in
|
|
155
|
+
binsize: Directly use this binsize for CNAClinic, in bp.
|
|
156
156
|
genome: The genome assembly
|
|
157
157
|
run_args: The arguments for CNAClinic::runSegmentation
|
|
158
158
|
plot_args: The arguments for CNAClinic::plotSampleData
|
|
@@ -183,6 +183,9 @@ class CNAClinic(Proc):
|
|
|
183
183
|
}
|
|
184
184
|
|
|
185
185
|
|
|
186
|
+
# +-------------------------------------------------------------------+
|
|
187
|
+
# | Bam processing tools |
|
|
188
|
+
# +-------------------------------------------------------------------+
|
|
186
189
|
class BamSplitChroms(Proc):
|
|
187
190
|
"""Split bam file by chromosomes
|
|
188
191
|
|
|
@@ -262,3 +265,142 @@ class BamMerge(Proc):
|
|
|
262
265
|
"sort_args": [],
|
|
263
266
|
}
|
|
264
267
|
script = "file://../scripts/bam/BamMerge.py"
|
|
268
|
+
|
|
269
|
+
|
|
270
|
+
class BamSampling(Proc):
|
|
271
|
+
"""Keeping only a fraction of read pairs from a bam file
|
|
272
|
+
|
|
273
|
+
Input:
|
|
274
|
+
bamfile: The bam file
|
|
275
|
+
|
|
276
|
+
Output:
|
|
277
|
+
outfile: The output bam file
|
|
278
|
+
|
|
279
|
+
Envs:
|
|
280
|
+
ncores: Number of cores to use
|
|
281
|
+
samtools: Path to samtools executable
|
|
282
|
+
tool: The tool to use, currently only "samtools" is supported
|
|
283
|
+
fraction (type=float): The fraction of reads to keep.
|
|
284
|
+
If `0 < fraction <= 1`, it's the fraction of reads to keep.
|
|
285
|
+
If `fraction > 1`, it's the number of reads to keep.
|
|
286
|
+
Note that when fraction > 1, you may not get the exact number
|
|
287
|
+
of reads specified but a close number.
|
|
288
|
+
seed: The seed for random number generator
|
|
289
|
+
index: Whether to index the output bam file
|
|
290
|
+
sort: Whether to sort the output bam file
|
|
291
|
+
sort_args: The arguments for sorting bam file using `samtools sort`.
|
|
292
|
+
These keys are not allowed: `-o`, `-@`,
|
|
293
|
+
and `--threads`, as they are managed by the script.
|
|
294
|
+
"""
|
|
295
|
+
input = "bamfile:file"
|
|
296
|
+
output = "outfile:file:{{in.bamfile | stem}}.sampled{{envs.fraction}}.bam"
|
|
297
|
+
lang = config.lang.python
|
|
298
|
+
envs = {
|
|
299
|
+
"ncores": config.misc.ncores,
|
|
300
|
+
"samtools": config.exe.samtools,
|
|
301
|
+
"tool": "samtools",
|
|
302
|
+
"fraction": None,
|
|
303
|
+
"seed": 8525,
|
|
304
|
+
"index": True,
|
|
305
|
+
"sort": True,
|
|
306
|
+
"sort_args": [],
|
|
307
|
+
}
|
|
308
|
+
script = "file://../scripts/bam/BamSampling.py"
|
|
309
|
+
|
|
310
|
+
|
|
311
|
+
class BamSubsetByBed(Proc):
|
|
312
|
+
"""Subset bam file by the regions in a bed file
|
|
313
|
+
|
|
314
|
+
Input:
|
|
315
|
+
bamfile: The bam file
|
|
316
|
+
bedfile: The bed file
|
|
317
|
+
|
|
318
|
+
Output:
|
|
319
|
+
outfile: The output bam file
|
|
320
|
+
|
|
321
|
+
Envs:
|
|
322
|
+
ncores: Number of cores to use
|
|
323
|
+
samtools: Path to samtools executable
|
|
324
|
+
tool: The tool to use, currently only "samtools" is supported
|
|
325
|
+
index: Whether to index the output bam file
|
|
326
|
+
"""
|
|
327
|
+
input = "bamfile:file, bedfile:file"
|
|
328
|
+
output = "outfile:file:{{in.bamfile | stem}}-subset.bam"
|
|
329
|
+
lang = config.lang.python
|
|
330
|
+
envs = {
|
|
331
|
+
"ncores": config.misc.ncores,
|
|
332
|
+
"samtools": config.exe.samtools,
|
|
333
|
+
"tool": "samtools",
|
|
334
|
+
"index": True,
|
|
335
|
+
}
|
|
336
|
+
script = "file://../scripts/bam/BamSubsetByBed.py"
|
|
337
|
+
|
|
338
|
+
|
|
339
|
+
class BamSort(Proc):
|
|
340
|
+
"""Sort bam file
|
|
341
|
+
|
|
342
|
+
Input:
|
|
343
|
+
bamfile: The bam file
|
|
344
|
+
|
|
345
|
+
Output:
|
|
346
|
+
outfile: The output bam file
|
|
347
|
+
|
|
348
|
+
Envs:
|
|
349
|
+
tool (choice): The tool to use.
|
|
350
|
+
- samtools: Use `samtools`
|
|
351
|
+
- sambamba: Use `sambamba`
|
|
352
|
+
ncores (type=int): Number of cores to use
|
|
353
|
+
samtools: Path to samtools executable
|
|
354
|
+
sambamba: Path to sambamba executable
|
|
355
|
+
tmpdir: The temporary directory to use
|
|
356
|
+
byname (flag): Whether to sort by read name
|
|
357
|
+
index (flag): Whether to index the output bam file
|
|
358
|
+
The index file will be created in the same directory as the output
|
|
359
|
+
bam file
|
|
360
|
+
<more>: Other arguments passed to the sorting tool
|
|
361
|
+
See `samtools sort` or `sambamba sort`
|
|
362
|
+
"""
|
|
363
|
+
input = "bamfile:file"
|
|
364
|
+
output = "outfile:file:{{in.bamfile | stem}}.sorted.bam"
|
|
365
|
+
lang = config.lang.python
|
|
366
|
+
envs = {
|
|
367
|
+
"tool": "samtools",
|
|
368
|
+
"ncores": config.misc.ncores,
|
|
369
|
+
"samtools": config.exe.samtools,
|
|
370
|
+
"sambamba": config.exe.sambamba,
|
|
371
|
+
"tmpdir": config.path.tmpdir,
|
|
372
|
+
"byname": False,
|
|
373
|
+
"index": True,
|
|
374
|
+
}
|
|
375
|
+
script = "file://../scripts/bam/BamSort.py"
|
|
376
|
+
|
|
377
|
+
|
|
378
|
+
class SamtoolsView(Proc):
|
|
379
|
+
"""View bam file using samtools, mostly used for filtering
|
|
380
|
+
|
|
381
|
+
This is a wrapper for `samtools view` command.
|
|
382
|
+
It will create a new bam file with the same name as the input bam file.
|
|
383
|
+
|
|
384
|
+
Input:
|
|
385
|
+
bamfile: The bam file
|
|
386
|
+
|
|
387
|
+
Output:
|
|
388
|
+
outfile: The output bam file
|
|
389
|
+
|
|
390
|
+
Envs:
|
|
391
|
+
ncores: Number of cores to use
|
|
392
|
+
samtools: Path to samtools executable
|
|
393
|
+
index: Whether to index the output bam file
|
|
394
|
+
Requires the input bam file to be sorted.
|
|
395
|
+
<more>: Other arguments passed to the view tool
|
|
396
|
+
See `samtools view` or `sambamba view`.
|
|
397
|
+
"""
|
|
398
|
+
input = "bamfile:file"
|
|
399
|
+
output = "outfile:file:{{in.bamfile | stem}}.bam"
|
|
400
|
+
lang = config.lang.python
|
|
401
|
+
envs = {
|
|
402
|
+
"ncores": config.misc.ncores,
|
|
403
|
+
"samtools": config.exe.samtools,
|
|
404
|
+
"index": True,
|
|
405
|
+
}
|
|
406
|
+
script = "file://../scripts/bam/SamtoolsView.py"
|
|
@@ -163,3 +163,78 @@ class BedtoolsMerge(Proc):
|
|
|
163
163
|
"bedtools": config.exe.bedtools,
|
|
164
164
|
}
|
|
165
165
|
script = "file://../scripts/bed/BedtoolsMerge.py"
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
class BedtoolsIntersect(Proc):
|
|
169
|
+
"""Find the intersection of two BED files, using `bedtools intersect`
|
|
170
|
+
|
|
171
|
+
See <https://bedtools.readthedocs.io/en/latest/content/tools/intersect.html>
|
|
172
|
+
|
|
173
|
+
Input:
|
|
174
|
+
afile: The first BED file
|
|
175
|
+
bfile: The second BED file
|
|
176
|
+
|
|
177
|
+
Output:
|
|
178
|
+
outfile: The output BED file
|
|
179
|
+
|
|
180
|
+
Envs:
|
|
181
|
+
bedtools: The path to bedtools
|
|
182
|
+
sort: Sort `afile` and `bfile` before intersecting.
|
|
183
|
+
By default, `-sorted` is used, assuming the input files are sorted.
|
|
184
|
+
If error occurs, try to set `sort` to `True`.
|
|
185
|
+
chrsize: Alias for `g` in `bedtools intersect`.
|
|
186
|
+
postcmd: The command to be executed for the output file after intersecting.
|
|
187
|
+
You can use `$infile`, `$outfile`, and `$outdir` to refer to the input,
|
|
188
|
+
output, and output directory, respectively.
|
|
189
|
+
<more>: Other options to be passed to `bedtools intersect`
|
|
190
|
+
""" # noqa: E501
|
|
191
|
+
input = "afile:file", "bfile:file"
|
|
192
|
+
output = "outfile:file:{{in.afile | stem0}}_{{in.bfile | stem0}}-intersect.bt"
|
|
193
|
+
lang = config.lang.python
|
|
194
|
+
envs = {
|
|
195
|
+
"bedtools": config.exe.bedtools,
|
|
196
|
+
"sort": False,
|
|
197
|
+
"chrsize": config.ref.chrsize,
|
|
198
|
+
"postcmd": None,
|
|
199
|
+
}
|
|
200
|
+
script = "file://../scripts/bed/BedtoolsIntersect.py"
|
|
201
|
+
|
|
202
|
+
|
|
203
|
+
class BedtoolsMakeWindows(Proc):
|
|
204
|
+
"""Make windows from a BED file or genome size file, using `bedtools makewindows`.
|
|
205
|
+
|
|
206
|
+
Input:
|
|
207
|
+
infile: The input BED file or a genome size file
|
|
208
|
+
Type will be detected by the number of columns in the file.
|
|
209
|
+
If it has 3+ columns, it is treated as a BED file, otherwise
|
|
210
|
+
a genome size file.
|
|
211
|
+
|
|
212
|
+
Output:
|
|
213
|
+
outfile: The output BED file
|
|
214
|
+
|
|
215
|
+
Envs:
|
|
216
|
+
bedtools: The path to bedtools
|
|
217
|
+
window (type=int): The size of the windows
|
|
218
|
+
step (type=int): The step size of the windows
|
|
219
|
+
nwin (type=int): The number of windows to be generated
|
|
220
|
+
Exclusive with `window` and `step`.
|
|
221
|
+
Either `nwin` or `window` and `step` should be provided.
|
|
222
|
+
reverse (flag): Reverse numbering of windows in the output
|
|
223
|
+
name (choice): How to name the generated windows/regions
|
|
224
|
+
- none: Do not add any name
|
|
225
|
+
- src: Use the source interval's name
|
|
226
|
+
- winnum: Use the window number
|
|
227
|
+
- srcwinnum: Use the source interval's name and window number
|
|
228
|
+
""" # noqa: E501
|
|
229
|
+
input = "infile:file"
|
|
230
|
+
output = "outfile:file:{{in.infile | stem}}_windows.bed"
|
|
231
|
+
lang = config.lang.python
|
|
232
|
+
envs = {
|
|
233
|
+
"bedtools": config.exe.bedtools,
|
|
234
|
+
"window": None,
|
|
235
|
+
"step": None,
|
|
236
|
+
"nwin": None,
|
|
237
|
+
"reverse": False,
|
|
238
|
+
"name": "none",
|
|
239
|
+
}
|
|
240
|
+
script = "file://../scripts/bed/BedtoolsMakeWindows.py"
|