From 67ab58487dbeb3cfc2546bf5b89a8a8e84071d91 Mon Sep 17 00:00:00 2001 From: samarth8392 Date: Thu, 15 Aug 2024 15:16:23 -0400 Subject: [PATCH 1/4] fix: update def targets based on genome --- src/xavier/gui.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/xavier/gui.py b/src/xavier/gui.py index 588edcf..03d4cf5 100644 --- a/src/xavier/gui.py +++ b/src/xavier/gui.py @@ -283,8 +283,10 @@ def launch_gui(DEBUG=True): genome=genome, targets=values["-TARGETS-"] if values["-TARGETS-"] - else xavier_base( - "resources", "Agilent_SSv7_allExons_hg38.bed" + else ( + xavier_base("resources", "Agilent_SSv7_allExons_hg38.bed") + if genome == "hg38" + else(xavier_base("resources", "SureSelect_mm10_sorted.bed")) ), # TODO should this be part of the genome config file? mode="slurm", job_name="pl:xavier", From dd7509e73ec527975c7e3dcc99b2534aed9701e9 Mon Sep 17 00:00:00 2001 From: samarth8392 Date: Thu, 15 Aug 2024 15:20:10 -0400 Subject: [PATCH 2/4] chore: updated CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 946855e..5f80c30 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ - Provide default exome targets for hg38 and mm10, which can be overridden by the optional `--targets` argument. (#102, @kelly-sovacool) - Previously, the `--targets` argument was required with no defaults. - Increased memory for rules: BWA mem, qualimap, kraken. gatk_contamination is not localrule. (#89, @samarth8392) +- fixes minor bug in GUI related to choosing the correct default target file (#108, @samarth8392) ## XAVIER 3.0.3 From 2c354df30e080b03cfc02ae0189c3ffa7af3d37e Mon Sep 17 00:00:00 2001 From: samarth8392 Date: Fri, 16 Aug 2024 11:57:02 -0400 Subject: [PATCH 3/4] fix: removed ifelse from targets; def targs comes from config --- src/xavier/gui.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/xavier/gui.py b/src/xavier/gui.py index 03d4cf5..bd24a6c 100644 --- a/src/xavier/gui.py +++ b/src/xavier/gui.py @@ -283,11 +283,7 @@ def launch_gui(DEBUG=True): genome=genome, targets=values["-TARGETS-"] if values["-TARGETS-"] - else ( - xavier_base("resources", "Agilent_SSv7_allExons_hg38.bed") - if genome == "hg38" - else(xavier_base("resources", "SureSelect_mm10_sorted.bed")) - ), # TODO should this be part of the genome config file? + else (""), # TODO should this be part of the genome config file? mode="slurm", job_name="pl:xavier", callers=["mutect2", "mutect", "strelka", "vardict", "varscan"], From d137ffc648bfc51ed370dcb40df1864c151910c7 Mon Sep 17 00:00:00 2001 From: samarth8392 Date: Mon, 19 Aug 2024 11:22:42 -0400 Subject: [PATCH 4/4] fix: removed ifelse from targets; simplfied custom target code --- src/xavier/gui.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/xavier/gui.py b/src/xavier/gui.py index bd24a6c..37390bf 100644 --- a/src/xavier/gui.py +++ b/src/xavier/gui.py @@ -258,7 +258,7 @@ def launch_gui(DEBUG=True): window.Element("-OUTDIR-").update("") continue if values["-CUSTARG-"] == True: - if values["-TARGETS-"] == "": + if not values["-TARGETS-"]: sg.PopupError( "Custom Targets BED file selected but not provided!!", location=(0, 500), @@ -281,9 +281,7 @@ def launch_gui(DEBUG=True): input=list(glob.glob(os.path.join(values["-INDIR-"], "*.fastq.gz"))), output=output_dir, genome=genome, - targets=values["-TARGETS-"] - if values["-TARGETS-"] - else (""), # TODO should this be part of the genome config file? + targets=values["-TARGETS-"], mode="slurm", job_name="pl:xavier", callers=["mutect2", "mutect", "strelka", "vardict", "varscan"],