biopipen 0.31.5__tar.gz → 0.31.7__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.
- {biopipen-0.31.5 → biopipen-0.31.7}/PKG-INFO +1 -1
- biopipen-0.31.7/biopipen/__init__.py +1 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/ns/bam.py +28 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/ns/bed.py +40 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/ns/regulatory.py +72 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/ns/vcf.py +6 -2
- biopipen-0.31.7/biopipen/scripts/bam/BamSubsetByBed.py +38 -0
- biopipen-0.31.7/biopipen/scripts/bed/BedtoolsMakeWindows.py +47 -0
- biopipen-0.31.7/biopipen/scripts/regulatory/MotifAffinityTest.R +84 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/regulatory/MotifAffinityTest_AtSNP.R +31 -37
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/regulatory/MotifAffinityTest_MotifBreakR.R +25 -26
- biopipen-0.31.7/biopipen/scripts/regulatory/VariantMotifPlot.R +76 -0
- biopipen-0.31.7/biopipen/scripts/regulatory/motifs-common.R +322 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/vcf/TruvariBench.sh +14 -7
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/vcf/TruvariBenchSummary.R +1 -2
- {biopipen-0.31.5 → biopipen-0.31.7}/pyproject.toml +4 -1
- {biopipen-0.31.5 → biopipen-0.31.7}/setup.py +1 -1
- biopipen-0.31.5/biopipen/__init__.py +0 -1
- biopipen-0.31.5/biopipen/scripts/regulatory/MotifAffinityTest.R +0 -222
- biopipen-0.31.5/biopipen/scripts/regulatory/atSNP.R +0 -33
- biopipen-0.31.5/biopipen/scripts/regulatory/motifBreakR.R +0 -1594
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/core/__init__.py +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/core/config.py +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/core/config.toml +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/core/defaults.py +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/core/filters.py +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/core/proc.py +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/core/testing.py +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/ns/__init__.py +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/ns/cellranger.py +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/ns/cellranger_pipeline.py +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/ns/cnv.py +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/ns/cnvkit.py +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/ns/cnvkit_pipeline.py +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/ns/delim.py +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/ns/gene.py +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/ns/gsea.py +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/ns/misc.py +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/ns/plot.py +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/ns/protein.py +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/ns/rnaseq.py +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/ns/scrna.py +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/ns/scrna_metabolic_landscape.py +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/ns/snp.py +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/ns/stats.py +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/ns/tcgamaf.py +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/ns/tcr.py +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/ns/web.py +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/reports/bam/CNAClinic.svelte +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/reports/bam/CNVpytor.svelte +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/reports/bam/ControlFREEC.svelte +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/reports/cellranger/CellRangerCount.svelte +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/reports/cellranger/CellRangerSummary.svelte +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/reports/cellranger/CellRangerVdj.svelte +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/reports/cnv/AneuploidyScore.svelte +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/reports/cnv/AneuploidyScoreSummary.svelte +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/reports/cnv/TMADScoreSummary.svelte +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/reports/cnvkit/CNVkitDiagram.svelte +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/reports/cnvkit/CNVkitHeatmap.svelte +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/reports/cnvkit/CNVkitScatter.svelte +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/reports/delim/SampleInfo.svelte +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/reports/gsea/FGSEA.svelte +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/reports/gsea/GSEA.svelte +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/reports/protein/ProdigySummary.svelte +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/reports/scrna/CellsDistribution.svelte +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/reports/scrna/DimPlots.svelte +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/reports/scrna/MarkersFinder.svelte +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/reports/scrna/MetaMarkers.svelte +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/reports/scrna/RadarPlots.svelte +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/reports/scrna/ScFGSEA.svelte +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/reports/scrna/SeuratClusterStats.svelte +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/reports/scrna/SeuratMap2Ref.svelte +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/reports/scrna/SeuratPreparing.svelte +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/reports/scrna/TopExpressingGenes.svelte +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/reports/scrna_metabolic_landscape/MetabolicFeatures.svelte +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/reports/scrna_metabolic_landscape/MetabolicFeaturesIntraSubset.svelte +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/reports/scrna_metabolic_landscape/MetabolicPathwayActivity.svelte +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/reports/scrna_metabolic_landscape/MetabolicPathwayHeterogeneity.svelte +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/reports/snp/PlinkCallRate.svelte +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/reports/snp/PlinkFreq.svelte +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/reports/snp/PlinkHWE.svelte +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/reports/snp/PlinkHet.svelte +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/reports/snp/PlinkIBD.svelte +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/reports/tcr/CDR3AAPhyschem.svelte +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/reports/tcr/CloneResidency.svelte +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/reports/tcr/Immunarch.svelte +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/reports/tcr/SampleDiversity.svelte +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/reports/tcr/TCRClusterStats.svelte +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/reports/tcr/TESSA.svelte +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/reports/tcr/VJUsage.svelte +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/reports/utils/gsea.liq +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/reports/utils/misc.liq +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/reports/vcf/TruvariBenchSummary.svelte +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/reports/vcf/TruvariConsistency.svelte +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/bam/BamMerge.py +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/bam/BamSampling.py +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/bam/BamSplitChroms.py +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/bam/CNAClinic.R +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/bam/CNVpytor.py +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/bam/ControlFREEC.py +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/bed/Bed2Vcf.py +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/bed/BedConsensus.py +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/bed/BedLiftOver.sh +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/bed/BedtoolsIntersect.py +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/bed/BedtoolsMerge.py +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/cellranger/CellRangerCount.py +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/cellranger/CellRangerSummary.R +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/cellranger/CellRangerVdj.py +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/cnv/AneuploidyScore.R +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/cnv/AneuploidyScoreSummary.R +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/cnv/TMADScore.R +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/cnv/TMADScoreSummary.R +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/cnvkit/CNVkitAccess.py +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/cnvkit/CNVkitAutobin.py +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/cnvkit/CNVkitBatch.py +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/cnvkit/CNVkitCall.py +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/cnvkit/CNVkitCoverage.py +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/cnvkit/CNVkitDiagram.py +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/cnvkit/CNVkitFix.py +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/cnvkit/CNVkitGuessBaits.py +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/cnvkit/CNVkitHeatmap.py +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/cnvkit/CNVkitReference.py +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/cnvkit/CNVkitScatter.py +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/cnvkit/CNVkitSegment.py +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/cnvkit/guess_baits.py +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/delim/RowsBinder.R +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/delim/SampleInfo.R +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/gene/GeneNameConversion.R +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/gene/GenePromoters.R +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/gsea/Enrichr.R +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/gsea/FGSEA.R +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/gsea/GSEA.R +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/gsea/PreRank.R +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/misc/Config2File.py +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/misc/Shell.sh +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/misc/Str2File.py +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/plot/Heatmap.R +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/plot/Manhattan.R +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/plot/QQPlot.R +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/plot/ROC.R +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/plot/Scatter.R +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/plot/VennDiagram.R +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/protein/Prodigy.py +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/protein/ProdigySummary.R +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/regulatory/MotifScan.py +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/rnaseq/Simulation-ESCO.R +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/rnaseq/Simulation-RUVcorr.R +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/rnaseq/Simulation.R +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/rnaseq/UnitConversion.R +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/scrna/AnnData2Seurat.R +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/scrna/CellTypeAnnotation-celltypist.R +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/scrna/CellTypeAnnotation-common.R +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/scrna/CellTypeAnnotation-direct.R +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/scrna/CellTypeAnnotation-hitype.R +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/scrna/CellTypeAnnotation-sccatch.R +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/scrna/CellTypeAnnotation-sctype.R +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/scrna/CellTypeAnnotation.R +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/scrna/CellsDistribution.R +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/scrna/DimPlots.R +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/scrna/ExprImputation-alra.R +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/scrna/ExprImputation-rmagic.R +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/scrna/ExprImputation-scimpute.R +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/scrna/ExprImputation.R +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/scrna/MarkersFinder.R +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/scrna/MetaMarkers.R +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/scrna/ModuleScoreCalculator.R +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/scrna/RadarPlots.R +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/scrna/SCImpute.R +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/scrna/ScFGSEA.R +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/scrna/ScSimulation.R +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/scrna/Seurat2AnnData.R +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/scrna/SeuratClusterStats-clustree.R +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/scrna/SeuratClusterStats-dimplots.R +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/scrna/SeuratClusterStats-features.R +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/scrna/SeuratClusterStats-hists.R +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/scrna/SeuratClusterStats-ngenes.R +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/scrna/SeuratClusterStats-stats.R +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/scrna/SeuratClusterStats.R +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/scrna/SeuratClustering-common.R +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/scrna/SeuratClustering.R +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/scrna/SeuratFilter.R +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/scrna/SeuratLoading.R +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/scrna/SeuratMap2Ref.R +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/scrna/SeuratMetadataMutater.R +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/scrna/SeuratPreparing-common.R +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/scrna/SeuratPreparing-doublet_detection.R +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/scrna/SeuratPreparing.R +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/scrna/SeuratSplit.R +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/scrna/SeuratSubClustering.R +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/scrna/SeuratSubset.R +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/scrna/SeuratTo10X.R +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/scrna/Subset10X.R +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/scrna/TopExpressingGenes.R +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/scrna/celltypist-wrapper.py +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/scrna/sctype.R +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/scrna_metabolic_landscape/MetabolicFeatures.R +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/scrna_metabolic_landscape/MetabolicFeaturesIntraSubset.R +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/scrna_metabolic_landscape/MetabolicPathwayActivity.R +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/scrna_metabolic_landscape/MetabolicPathwayHeterogeneity.R +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/snp/MatrixEQTL.R +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/snp/Plink2GTMat.py +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/snp/PlinkCallRate.R +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/snp/PlinkFilter.py +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/snp/PlinkFreq.R +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/snp/PlinkFromVcf.py +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/snp/PlinkHWE.R +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/snp/PlinkHet.R +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/snp/PlinkIBD.R +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/snp/PlinkSimulation.py +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/snp/PlinkUpdateName.py +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/stats/ChowTest.R +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/stats/DiffCoexpr.R +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/stats/LiquidAssoc.R +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/stats/Mediation.R +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/stats/MetaPvalue.R +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/stats/MetaPvalue1.R +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/tcgamaf/Maf2Vcf.py +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/tcgamaf/MafAddChr.py +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/tcgamaf/maf2vcf.pl +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/tcr/Attach2Seurat.R +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/tcr/CDR3AAPhyschem.R +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/tcr/CloneResidency.R +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/tcr/CloneSizeQQPlot.R +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/tcr/GIANA/GIANA.py +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/tcr/GIANA/GIANA4.py +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/tcr/GIANA/Imgt_Human_TRBV.fasta +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/tcr/GIANA/query.py +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/tcr/Immunarch-basic.R +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/tcr/Immunarch-clonality.R +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/tcr/Immunarch-diversity.R +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/tcr/Immunarch-geneusage.R +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/tcr/Immunarch-kmer.R +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/tcr/Immunarch-overlap.R +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/tcr/Immunarch-spectratyping.R +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/tcr/Immunarch-tracking.R +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/tcr/Immunarch-vjjunc.R +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/tcr/Immunarch.R +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/tcr/Immunarch2VDJtools.R +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/tcr/ImmunarchFilter.R +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/tcr/ImmunarchLoading.R +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/tcr/ImmunarchSplitIdents.R +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/tcr/SampleDiversity.R +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/tcr/TCRClusterStats.R +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/tcr/TCRClustering.R +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/tcr/TCRDock.py +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/tcr/TESSA.R +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/tcr/TESSA_source/Atchley_factors.csv +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/tcr/TESSA_source/BriseisEncoder.py +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/tcr/TESSA_source/MCMC_control.R +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/tcr/TESSA_source/TrainedEncoder.h5 +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/tcr/TESSA_source/fixed_b.csv +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/tcr/TESSA_source/initialization.R +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/tcr/TESSA_source/post_analysis.R +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/tcr/TESSA_source/real_data.R +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/tcr/TESSA_source/update.R +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/tcr/TESSA_source/utility.R +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/tcr/VJUsage.R +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/tcr/immunarch-patched.R +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/tcr/vdjtools-patch.sh +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/vcf/BcftoolsAnnotate.py +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/vcf/BcftoolsFilter.py +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/vcf/BcftoolsSort.py +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/vcf/BcftoolsView.py +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/vcf/TruvariConsistency.R +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/vcf/Vcf2Bed.py +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/vcf/VcfAnno.py +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/vcf/VcfDownSample.sh +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/vcf/VcfFilter.py +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/vcf/VcfFix.py +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/vcf/VcfFix_utils.py +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/vcf/VcfIndex.py +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/vcf/VcfIntersect.py +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/vcf/VcfLiftOver.sh +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/vcf/VcfSplitSamples.py +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/vcf/bcftools_utils.py +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/web/Download.py +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/web/DownloadList.py +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/web/GCloudStorageDownloadBucket.py +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/web/GCloudStorageDownloadFile.py +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/web/gcloud_common.py +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/utils/__init__.py +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/utils/caching.R +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/utils/common_docstrs.py +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/utils/gene.R +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/utils/gene.py +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/utils/gsea.R +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/utils/io.R +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/utils/misc.R +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/utils/misc.py +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/utils/mutate_helpers.R +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/utils/plot.R +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/utils/reference.py +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/utils/rnaseq.R +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/utils/single_cell.R +0 -0
- {biopipen-0.31.5 → biopipen-0.31.7}/biopipen/utils/vcf.py +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.31.7"
|
|
@@ -301,3 +301,31 @@ class BamSampling(Proc):
|
|
|
301
301
|
"sort_args": [],
|
|
302
302
|
}
|
|
303
303
|
script = "file://../scripts/bam/BamSampling.py"
|
|
304
|
+
|
|
305
|
+
|
|
306
|
+
class BamSubsetByBed(Proc):
|
|
307
|
+
"""Subset bam file by the regions in a bed file
|
|
308
|
+
|
|
309
|
+
Input:
|
|
310
|
+
bamfile: The bam file
|
|
311
|
+
bedfile: The bed file
|
|
312
|
+
|
|
313
|
+
Output:
|
|
314
|
+
outfile: The output bam file
|
|
315
|
+
|
|
316
|
+
Envs:
|
|
317
|
+
ncores: Number of cores to use
|
|
318
|
+
samtools: Path to samtools executable
|
|
319
|
+
tool: The tool to use, currently only "samtools" is supported
|
|
320
|
+
index: Whether to index the output bam file
|
|
321
|
+
"""
|
|
322
|
+
input = "bamfile:file, bedfile:file"
|
|
323
|
+
output = "outfile:file:{{in.bamfile | stem}}-subset.bam"
|
|
324
|
+
lang = config.lang.python
|
|
325
|
+
envs = {
|
|
326
|
+
"ncores": config.misc.ncores,
|
|
327
|
+
"samtools": config.exe.samtools,
|
|
328
|
+
"tool": "samtools",
|
|
329
|
+
"index": True,
|
|
330
|
+
}
|
|
331
|
+
script = "file://../scripts/bam/BamSubsetByBed.py"
|
|
@@ -198,3 +198,43 @@ class BedtoolsIntersect(Proc):
|
|
|
198
198
|
"postcmd": None,
|
|
199
199
|
}
|
|
200
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"
|
|
@@ -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
|
-
"
|
|
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": ["
|
|
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
|
|
|
@@ -0,0 +1,38 @@
|
|
|
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
|
+
bedfile = {{ in.bedfile | repr }} # pyright: ignore # noqa
|
|
9
|
+
outfile = Path({{ out.outfile | repr }}) # pyright: ignore
|
|
10
|
+
ncores = {{ envs.ncores | int }} # pyright: ignore
|
|
11
|
+
samtools = {{ envs.samtools | repr }} # pyright: ignore
|
|
12
|
+
tool = {{ envs.tool | repr }} # pyright: ignore
|
|
13
|
+
should_index = {{ envs.index | repr }} # pyright: ignore
|
|
14
|
+
|
|
15
|
+
if tool != "samtools":
|
|
16
|
+
raise ValueError(
|
|
17
|
+
f"Tool {tool} is not supported. "
|
|
18
|
+
"Currently only samtools is supported."
|
|
19
|
+
)
|
|
20
|
+
|
|
21
|
+
cmd = [
|
|
22
|
+
samtools,
|
|
23
|
+
"view",
|
|
24
|
+
"--target-file",
|
|
25
|
+
bedfile,
|
|
26
|
+
"-b",
|
|
27
|
+
"--threads",
|
|
28
|
+
ncores,
|
|
29
|
+
"-o",
|
|
30
|
+
outfile,
|
|
31
|
+
bamfile
|
|
32
|
+
]
|
|
33
|
+
run_command(cmd, fg=True)
|
|
34
|
+
|
|
35
|
+
if should_index:
|
|
36
|
+
logger.info("Indexing the output bam file.")
|
|
37
|
+
cmd = [samtools, "index", "-@", ncores, outfile]
|
|
38
|
+
run_command(cmd, fg=True)
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
from pathlib import Path
|
|
2
|
+
from biopipen.utils.misc import run_command, logger
|
|
3
|
+
|
|
4
|
+
infile = Path({{in.afile | repr}}) # pyright: ignore # noqa: #999
|
|
5
|
+
outfile = Path({{in.bfile | repr}}) # pyright: ignore
|
|
6
|
+
bedtools = {{envs.bedtools | repr}} # pyright: ignore
|
|
7
|
+
window = {{envs.window | repr}} # pyright: ignore
|
|
8
|
+
step = {{envs.step | repr}} # pyright: ignore
|
|
9
|
+
nwin = {{envs.nwin | repr}} # pyright: ignore
|
|
10
|
+
reverse = {{envs.reverse | repr}} # pyright: ignore
|
|
11
|
+
name = {{envs.name | repr}} # pyright: ignore
|
|
12
|
+
|
|
13
|
+
if nwin is None and window is None:
|
|
14
|
+
raise ValueError("Either `nwin` or `window` should be provided.")
|
|
15
|
+
|
|
16
|
+
if nwin is not None and window is not None:
|
|
17
|
+
raise ValueError("Either `nwin` or `window` should be provided, not both.")
|
|
18
|
+
|
|
19
|
+
# detect if infile is a genome size file or a bed file
|
|
20
|
+
with infile.open() as f:
|
|
21
|
+
line = f.readline().strip()
|
|
22
|
+
if len(line.split("\t")) > 2:
|
|
23
|
+
is_bed = True
|
|
24
|
+
else:
|
|
25
|
+
is_bed = False
|
|
26
|
+
|
|
27
|
+
if is_bed:
|
|
28
|
+
logger.info("BED file is detected as input.")
|
|
29
|
+
cmd = [bedtools, "makewindows", "-b", infile]
|
|
30
|
+
else:
|
|
31
|
+
logger.info("Genome size file is detected as input.")
|
|
32
|
+
cmd = [bedtools, "makewindows", "-g", infile]
|
|
33
|
+
|
|
34
|
+
if nwin:
|
|
35
|
+
cmd.extend(["-n", nwin])
|
|
36
|
+
elif step is not None:
|
|
37
|
+
cmd.extend(["-w", window, "-s", step])
|
|
38
|
+
else:
|
|
39
|
+
cmd.extend(["-w", window])
|
|
40
|
+
|
|
41
|
+
if reverse:
|
|
42
|
+
cmd.append("-reverse")
|
|
43
|
+
|
|
44
|
+
if name != "none":
|
|
45
|
+
cmd.extend(["-name", name])
|
|
46
|
+
|
|
47
|
+
run_command(cmd, stdout=outfile)
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
# Script for regulatory.MotifAffinityTest
|
|
2
|
+
{{ biopipen_dir | joinpaths: "utils", "misc.R" | source_r }}
|
|
3
|
+
{{ biopipen_dir | joinpaths: "scripts", "regulatory", "motifs-common.R" | source_r }}
|
|
4
|
+
|
|
5
|
+
library(BiocParallel)
|
|
6
|
+
library(BSgenome)
|
|
7
|
+
|
|
8
|
+
motiffile <- {{in.motiffile | r}}
|
|
9
|
+
varfile <- {{in.varfile | r}}
|
|
10
|
+
outdir <- {{out.outdir | r}}
|
|
11
|
+
ncores <- {{envs.ncores | r}}
|
|
12
|
+
tool <- {{envs.tool | r}}
|
|
13
|
+
bcftools <- {{envs.bcftools | r}}
|
|
14
|
+
genome <- {{envs.genome | r}}
|
|
15
|
+
motif_col <- {{envs.motif_col | r}}
|
|
16
|
+
regulator_col <- {{envs.regulator_col | r}}
|
|
17
|
+
notfound <- {{envs.notfound | r}}
|
|
18
|
+
motifdb <- {{envs.motifdb | r}}
|
|
19
|
+
regmotifs <- {{envs.regmotifs | r}}
|
|
20
|
+
devpars <- {{envs.devpars | r}}
|
|
21
|
+
plot_nvars <- {{envs.plot_nvars | r}}
|
|
22
|
+
plots <- {{envs.plots | r}}
|
|
23
|
+
cutoff <- {{envs.cutoff | r}}
|
|
24
|
+
|
|
25
|
+
if (is.null(motifdb) || !file.exists(motifdb)) {
|
|
26
|
+
stop("Motif database (envs.motifdb) is required and must exist")
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
if (is.null(genome)) {
|
|
30
|
+
stop("Reference genome (envs.ref) is required and must exist")
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
if (is.null(motiffile) || !file.exists(motiffile)) {
|
|
34
|
+
stop("Motif file (in.motiffile) is required and must exist")
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
if (is.null(varfile) || !file.exists(varfile)) {
|
|
38
|
+
stop("Variant file (in.varfile) is required and must exist")
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
if (is.null(motif_col) && is.null(regulator_col)) {
|
|
42
|
+
stop("Either motif (envs.motif_col) or regulator (envs.regulator_col) column must be provided")
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
log_info("Reading input regulator/motif file ...")
|
|
46
|
+
in_motifs <- read.table(motiffile, header=TRUE, sep="\t", stringsAsFactors=FALSE, check.names = FALSE)
|
|
47
|
+
|
|
48
|
+
log_info("Ensuring motifs and regulators in the input data ...")
|
|
49
|
+
in_motifs <- ensure_regulator_motifs(in_motifs, outdir, motif_col, regulator_col, regmotifs, notfound = notfound)
|
|
50
|
+
genome_pkg <- get_genome_pkg(genome)
|
|
51
|
+
|
|
52
|
+
log_info("Reading variant file ...")
|
|
53
|
+
if (grepl("\\.vcf$", varfile) || grepl("\\.vcf\\.gz$", varfile)) {
|
|
54
|
+
log_info("Converting VCF file to BED file ...")
|
|
55
|
+
varfile_bed <- file.path(outdir, gsub("\\.vcf(\\.gz)?$", ".bed", basename(varfile)))
|
|
56
|
+
cmd <- c(
|
|
57
|
+
bcftools, "query",
|
|
58
|
+
"-f", "%CHROM\\t%POS0\\t%END\\t%ID\\t0\\t+\\t%REF\\t%ALT{0}\\n",
|
|
59
|
+
"-i", 'FILTER="PASS" || FILTER="." || FILTER=""',
|
|
60
|
+
"-o", varfile_bed,
|
|
61
|
+
varfile
|
|
62
|
+
)
|
|
63
|
+
run_command(cmd, fg = TRUE)
|
|
64
|
+
|
|
65
|
+
varfile <- varfile_bed
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
# `chrom`, `start`, `end`, `name`, `score`, `strand`, `ref`, `alt`.
|
|
69
|
+
snpinfo <- read.table(varfile, header=FALSE, stringsAsFactors=FALSE)
|
|
70
|
+
colnames(snpinfo) <- c("chrom", "start", "end", "name", "score", "strand", "ref", "alt")
|
|
71
|
+
|
|
72
|
+
log_info("Reading motif database ...")
|
|
73
|
+
mdb <- read_meme_to_motifdb(motifdb, in_motifs, motif_col, regulator_col, notfound, outdir)
|
|
74
|
+
|
|
75
|
+
tool <- tolower(tool)
|
|
76
|
+
tool <- match.arg(tool, c("motifbreakr", "atsnp"))
|
|
77
|
+
|
|
78
|
+
if (tool == "motifbreakr") {
|
|
79
|
+
motifbreakr_args <- {{envs.motifbreakr_args | r}}
|
|
80
|
+
{{ biopipen_dir | joinpaths: "scripts", "regulatory", "MotifAffinityTest_MotifBreakR.R" | source_r }}
|
|
81
|
+
} else { # atsnp
|
|
82
|
+
atsnp_args <- {{envs.atsnp_args | r}}
|
|
83
|
+
{{ biopipen_dir | joinpaths: "scripts", "regulatory", "MotifAffinityTest_AtSNP.R" | source_r }}
|
|
84
|
+
}
|
|
@@ -1,36 +1,6 @@
|
|
|
1
1
|
library(atSNP)
|
|
2
2
|
library(rtracklayer)
|
|
3
3
|
|
|
4
|
-
log_info("Converting universalmotif object to motif_library ...")
|
|
5
|
-
|
|
6
|
-
motifdb_names <- sapply(meme, function(m) m@name)
|
|
7
|
-
motifs <- check_motifs(motifdb_names)
|
|
8
|
-
meme <- filter_motifs(meme, name = motifs)
|
|
9
|
-
# Get the right order of motif names
|
|
10
|
-
motifs <- sapply(meme, function(m) m@name)
|
|
11
|
-
|
|
12
|
-
# used for atSNP
|
|
13
|
-
mdb <- lapply(meme, function(m) t(m@motif))
|
|
14
|
-
names(mdb) <- motifs
|
|
15
|
-
|
|
16
|
-
# compose one used for plotting using motifbreakR
|
|
17
|
-
motifdb_matrices <- lapply(meme, function(m) m@motif)
|
|
18
|
-
names(motifdb_matrices) <- motifs
|
|
19
|
-
motifdb_meta <- do.call(rbind, lapply(meme, function(m) {
|
|
20
|
-
ats <- attributes(m)
|
|
21
|
-
ats$dataSource <- basename(motifdb)
|
|
22
|
-
ats$class <- NULL
|
|
23
|
-
ats$motif <- NULL
|
|
24
|
-
ats$gapinfo <- NULL
|
|
25
|
-
ats$sequenceCount <- ats$nsites
|
|
26
|
-
ats$providerId <- ats$name
|
|
27
|
-
ats$providerName <- ats$name
|
|
28
|
-
ats$organism <- if (is.null(ats$organism) || length(ats$organism) == 0) "Unknown" else ats$organism
|
|
29
|
-
unlist(ats)
|
|
30
|
-
}))
|
|
31
|
-
rownames(motifdb_meta) <- motifs
|
|
32
|
-
pmotifs <- MotifDb:::MotifList(motifdb_matrices, tbl.metadata = motifdb_meta)
|
|
33
|
-
|
|
34
4
|
log_info("Converting snpinfo to atSNP object ...")
|
|
35
5
|
|
|
36
6
|
# c("chrom", "start", "end", "name", "score", "strand", "ref", "alt", "ref_seq", "alt_seq")
|
|
@@ -53,7 +23,9 @@ write.table(
|
|
|
53
23
|
file = atsnp_bed,
|
|
54
24
|
sep = "\t", quote = FALSE, row.names = FALSE, col.names = TRUE
|
|
55
25
|
)
|
|
56
|
-
|
|
26
|
+
|
|
27
|
+
motif_lib <- motifdb_to_motiflib(mdb)
|
|
28
|
+
k <- max(sapply(motif_lib, nrow))
|
|
57
29
|
snps <- LoadSNPData(
|
|
58
30
|
atsnp_bed,
|
|
59
31
|
genome.lib = genome_pkg,
|
|
@@ -62,13 +34,12 @@ snps <- LoadSNPData(
|
|
|
62
34
|
half.window.size = k
|
|
63
35
|
)
|
|
64
36
|
|
|
65
|
-
# run motifbreakR
|
|
66
37
|
log_info("Running atSNP ...")
|
|
67
|
-
atsnp_scores <- ComputeMotifScore(
|
|
38
|
+
atsnp_scores <- ComputeMotifScore(motif_lib, snps, ncores = ncores)
|
|
68
39
|
|
|
69
40
|
log_info("Calculating p values ...")
|
|
70
41
|
atsnp_result <- ComputePValues(
|
|
71
|
-
motif.lib =
|
|
42
|
+
motif.lib = motif_lib,
|
|
72
43
|
snp.info = snps,
|
|
73
44
|
motif.scores = atsnp_scores$motif.scores,
|
|
74
45
|
ncores = ncores,
|
|
@@ -101,7 +72,7 @@ atsnp_result$motifPos <- sapply(1:nrow(atsnp_result), function(i) {
|
|
|
101
72
|
paste(c(atsnp_result$ref_start[i] - k, atsnp_result$ref_end[i] - k), collapse = ",")
|
|
102
73
|
})
|
|
103
74
|
if (!is.null(regulator_col)) {
|
|
104
|
-
atsnp_result$Regulator <- in_motifs[
|
|
75
|
+
atsnp_result$geneSymbol <- atsnp_result$Regulator <- in_motifs[
|
|
105
76
|
match(atsnp_result$providerId, in_motifs[[motif_col]]),
|
|
106
77
|
regulator_col,
|
|
107
78
|
drop = TRUE
|
|
@@ -120,7 +91,30 @@ atsnp_result$alleleDiff <- -atsnp_result[[cutoff_col]]
|
|
|
120
91
|
atsnp_result$effect <- "strong"
|
|
121
92
|
atsnp_result$motifPos <- lapply(atsnp_result$motifPos, function(x) as.integer(unlist(strsplit(x, ","))))
|
|
122
93
|
atsnp_result <- makeGRangesFromDataFrame(atsnp_result, keep.extra.columns = TRUE, starts.in.df.are.0based = TRUE)
|
|
94
|
+
genome(atsnp_result) <- genome
|
|
123
95
|
attributes(atsnp_result)$genome.package <- genome_pkg
|
|
124
|
-
attributes(atsnp_result)$motifs <-
|
|
96
|
+
attributes(atsnp_result)$motifs <- mdb
|
|
97
|
+
|
|
98
|
+
if (is.null(plots) || length(plots) == 0) {
|
|
99
|
+
atsnp_result <- atsnp_result[order(-abs(atsnp_result$alleleDiff)), , drop = FALSE]
|
|
100
|
+
atsnp_result <- atsnp_result[1:min(plot_nvars, length(atsnp_result)), , drop = FALSE]
|
|
101
|
+
variants <- unique(atsnp_result$SNP_id)
|
|
102
|
+
} else {
|
|
103
|
+
variants <- names(plots)
|
|
104
|
+
}
|
|
105
|
+
for (variant in variants) {
|
|
106
|
+
log_info("- Variant: {variant}")
|
|
107
|
+
if (is.null(plots[[variant]])) {
|
|
108
|
+
plots[[variant]] <- list(devpars = devpars, which = "TRUE")
|
|
109
|
+
}
|
|
110
|
+
if (is.null(plots[[variant]]$which)) {
|
|
111
|
+
plots[[variant]]$which <- "TRUE"
|
|
112
|
+
}
|
|
113
|
+
if (is.null(plots[[variant]]$devpars)) {
|
|
114
|
+
plots[[variant]]$devpars <- devpars
|
|
115
|
+
}
|
|
116
|
+
res <- atsnp_result[atsnp_result$SNP_id == variant, , drop = FALSE]
|
|
117
|
+
res <- subset(res, subset = eval(parse(text = plots[[variant]]$which)))
|
|
125
118
|
|
|
126
|
-
|
|
119
|
+
plot_variant_motifs(res, variant, plots[[variant]]$devpars, outdir)
|
|
120
|
+
}
|
{biopipen-0.31.5 → biopipen-0.31.7}/biopipen/scripts/regulatory/MotifAffinityTest_MotifBreakR.R
RENAMED
|
@@ -1,30 +1,6 @@
|
|
|
1
1
|
library(motifbreakR)
|
|
2
|
-
bsgenome <- getBSgenome(genome_pkg)
|
|
3
|
-
|
|
4
|
-
log_info("Converting universalmotif object to MotifDb object ...")
|
|
5
|
-
|
|
6
|
-
motifdb_names <- sapply(meme, function(m) m@name)
|
|
7
|
-
motifs <- check_motifs(motifdb_names)
|
|
8
|
-
meme <- filter_motifs(meme, name = motifs)
|
|
9
|
-
# Get the right order of motif names
|
|
10
|
-
motifs <- sapply(meme, function(m) m@name)
|
|
11
|
-
motifdb_matrices <- lapply(meme, function(m) m@motif)
|
|
12
|
-
names(motifdb_matrices) <- motifs
|
|
13
2
|
|
|
14
|
-
|
|
15
|
-
ats <- attributes(m)
|
|
16
|
-
ats$dataSource <- basename(motifdb)
|
|
17
|
-
ats$class <- NULL
|
|
18
|
-
ats$motif <- NULL
|
|
19
|
-
ats$gapinfo <- NULL
|
|
20
|
-
ats$sequenceCount <- ats$nsites
|
|
21
|
-
ats$providerId <- ats$name
|
|
22
|
-
ats$providerName <- ats$name
|
|
23
|
-
ats$organism <- if (is.null(ats$organism) || length(ats$organism) == 0) "Unknown" else ats$organism
|
|
24
|
-
unlist(ats)
|
|
25
|
-
}))
|
|
26
|
-
rownames(motifdb_meta) <- motifs
|
|
27
|
-
mdb <- MotifDb:::MotifList(motifdb_matrices, tbl.metadata = motifdb_meta)
|
|
3
|
+
bsgenome <- getBSgenome(genome_pkg)
|
|
28
4
|
|
|
29
5
|
# `chrom`, `start`, `end`, `name`, `score`, `strand`, `ref`, `alt`.
|
|
30
6
|
is_indel <- nchar(snpinfo$ref) != 1 | nchar(snpinfo$alt) != 1
|
|
@@ -93,4 +69,27 @@ write.table(
|
|
|
93
69
|
)
|
|
94
70
|
rm(results_to_save)
|
|
95
71
|
|
|
96
|
-
|
|
72
|
+
log_info("Plotting variants ...")
|
|
73
|
+
if (is.null(plots) || length(plots) == 0) {
|
|
74
|
+
results <- results[order(-abs(results$alleleDiff)), , drop = FALSE]
|
|
75
|
+
results <- results[1:min(plot_nvars, length(results)), , drop = FALSE]
|
|
76
|
+
variants <- unique(results$SNP_id)
|
|
77
|
+
} else {
|
|
78
|
+
variants <- names(plots)
|
|
79
|
+
}
|
|
80
|
+
for (variant in variants) {
|
|
81
|
+
log_info("- Variant: {variant}")
|
|
82
|
+
if (is.null(plots[[variant]])) {
|
|
83
|
+
plots[[variant]] <- list(devpars = devpars, which = "TRUE")
|
|
84
|
+
}
|
|
85
|
+
if (is.null(plots[[variant]]$which)) {
|
|
86
|
+
plots[[variant]]$which <- "TRUE"
|
|
87
|
+
}
|
|
88
|
+
if (is.null(plots[[variant]]$devpars)) {
|
|
89
|
+
plots[[variant]]$devpars <- devpars
|
|
90
|
+
}
|
|
91
|
+
res <- results[results$SNP_id == variant, , drop = FALSE]
|
|
92
|
+
res <- subset(res, subset = eval(parse(text = plots[[variant]]$which)))
|
|
93
|
+
|
|
94
|
+
plot_variant_motifs(res, variant, plots[[variant]]$devpars, outdir)
|
|
95
|
+
}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
{{ biopipen_dir | joinpaths: "utils", "misc.R" | source_r }}
|
|
2
|
+
{{ biopipen_dir | joinpaths: "scripts", "regulatory", "motifs-common.R" | source_r }}
|
|
3
|
+
|
|
4
|
+
library(BSgenome)
|
|
5
|
+
library(GenomicRanges)
|
|
6
|
+
|
|
7
|
+
infile <- {{in.infile | r}}
|
|
8
|
+
outdir <- {{out.outdir | r}}
|
|
9
|
+
genome <- {{envs.genome | r}}
|
|
10
|
+
motifdb <- {{envs.motifdb | r}}
|
|
11
|
+
motif_col <- {{envs.motif_col | r}}
|
|
12
|
+
regulator_col <- {{envs.regulator_col | r}}
|
|
13
|
+
regmotifs <- {{envs.regmotifs | r}}
|
|
14
|
+
notfound <- {{envs.notfound | r}}
|
|
15
|
+
devpars <- {{envs.devpars | r}}
|
|
16
|
+
plot_vars <- {{envs.plot_vars | r}}
|
|
17
|
+
|
|
18
|
+
if (is.null(motifdb) || !file.exists(motifdb)) {
|
|
19
|
+
stop("Motif database (envs.motifdb) is required and must exist")
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
if (is.null(genome)) {
|
|
23
|
+
stop("Reference genome (envs.ref) is required and must exist")
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
if (is.null(motif_col) && is.null(regulator_col)) {
|
|
27
|
+
stop("Either motif (envs.motif_col) or regulator (envs.regulator_col) column must be provided")
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
log_info("Reading input data ...")
|
|
31
|
+
indata <- read.table(infile, header=TRUE, sep="\t", stringsAsFactors=FALSE, check.names = FALSE)
|
|
32
|
+
|
|
33
|
+
log_info("Ensuring regulators in the input data ...")
|
|
34
|
+
indata <- ensure_regulator_motifs(indata, outdir, motif_col, regulator_col, regmotifs, notfound = notfound)
|
|
35
|
+
genome_pkg <- get_genome_pkg(genome)
|
|
36
|
+
|
|
37
|
+
log_info("Reading motif database ...")
|
|
38
|
+
meme <- read_meme_to_motifdb(motifdb, indata, motif_col, regulator_col, notfound, outdir)
|
|
39
|
+
|
|
40
|
+
log_info("Composing motifbreakR results from input data ...")
|
|
41
|
+
indata$chr <- indata$chrom %||% indata$chr %||% indata$seqnames
|
|
42
|
+
indata$seqnames <- NULL
|
|
43
|
+
indata$strand <- indata$strand %||% "+"
|
|
44
|
+
indata$varType <- indata$varType %||% "SNV"
|
|
45
|
+
indata$geneSymbol <- indata$geneSymbol %||% indata$Regulator
|
|
46
|
+
indata$providerId <- indata$providerId %||% indata$motif
|
|
47
|
+
indata$providerName <- indata$providerName %||% indata$providerId
|
|
48
|
+
indata$dataSource <- indata$dataSource %||% strsplit(basename(motifdb), "\\.")[[1]][1]
|
|
49
|
+
indata$effect <- indata$effect %||% "strong"
|
|
50
|
+
indata$altPos <- indata$altPos %||% 1
|
|
51
|
+
indata$alleleDiff <- indata$alleleDiff %||% indata$score %||% 0
|
|
52
|
+
|
|
53
|
+
# check other required columns
|
|
54
|
+
for (col in c("start", "end", "SNP_id", "REF", "ALT", "motifPos")) {
|
|
55
|
+
if (!(col %in% colnames(indata))) {
|
|
56
|
+
stop("Column '", col, "' is required in the input data")
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
indata$motifPos <- lapply(indata$motifPos, function(x) as.integer(unlist(strsplit(x, ","))))
|
|
60
|
+
indata <- makeGRangesFromDataFrame(indata, keep.extra.columns = TRUE, starts.in.df.are.0based = TRUE)
|
|
61
|
+
genome(indata) <- genome
|
|
62
|
+
attributes(indata)$genome.package <- genome_pkg
|
|
63
|
+
attributes(indata)$motifs <- meme
|
|
64
|
+
|
|
65
|
+
log_info("Plotting variants ...")
|
|
66
|
+
if (is.null(plot_vars)) {
|
|
67
|
+
plot_vars <- unique(indata$SNP_id)
|
|
68
|
+
} else if (length(plot_vars) > 1) {
|
|
69
|
+
plot_vars <- unique(plot_vars)
|
|
70
|
+
} else {
|
|
71
|
+
plot_vars <- strsplit(plot_vars, ",")[[1]]
|
|
72
|
+
}
|
|
73
|
+
for (pvar in plot_vars) {
|
|
74
|
+
log_info("- Variant: {pvar}")
|
|
75
|
+
plot_variant_motifs(indata, pvar, devpars, outdir)
|
|
76
|
+
}
|