From cc081a146c05b3840fdeb755ed848c27a4766bac Mon Sep 17 00:00:00 2001 From: rxu17 <26471741+rxu17@users.noreply.github.com> Date: Thu, 4 Jan 2024 21:52:49 -0800 Subject: [PATCH 1/6] update java version to match gn annotator.jar file, change tag version on annotation-tools --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 60e741d3..0df6fe30 100644 --- a/Dockerfile +++ b/Dockerfile @@ -41,7 +41,7 @@ RUN apt-get update && apt-get install -y --allow-unauthenticated --no-install-re # texlive-generic-recommended \ texlive-latex-extra \ # genome nexus - openjdk-8-jre \ + openjdk-11-jre \ # This is for reticulate python3.8-venv && \ apt-get clean && \ @@ -83,6 +83,6 @@ WORKDIR /root/ # Must move this git clone to after the install of Genie, # because must update cbioportal RUN git clone https://github.com/cBioPortal/cbioportal.git -b v5.3.19 -RUN git clone https://github.com/Sage-Bionetworks/annotation-tools.git -b 0.0.3 +RUN git clone https://github.com/Sage-Bionetworks/annotation-tools.git -b 0.0.4 WORKDIR /root/Genie From 00f527e5628040418b345f65f9cb3976e366564c Mon Sep 17 00:00:00 2001 From: rxu17 <26471741+rxu17@users.noreply.github.com> Date: Sun, 7 Jan 2024 18:28:34 -0800 Subject: [PATCH 2/6] use newer version of annotator.jar --- genie/process_mutation.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/genie/process_mutation.py b/genie/process_mutation.py index f4aa334d..d6d31d29 100644 --- a/genie/process_mutation.py +++ b/genie/process_mutation.py @@ -202,12 +202,14 @@ def process_mutation_workflow( "syn22053204", ifcollision="overwrite.local", downloadLocation=genie_config["genie_annotation_pkg"], + version=1, #TODO: This should pull from a config file in the future ) # Genome Nexus Jar file syn.get( "syn22084320", ifcollision="overwrite.local", downloadLocation=genie_config["genie_annotation_pkg"], + version=13, #TODO: This should pull from a config file in the future ) annotated_maf_path = annotate_mutation( From 5c955cd392aae9b41361a243f0d7775718133989 Mon Sep 17 00:00:00 2001 From: rxu17 <26471741+rxu17@users.noreply.github.com> Date: Mon, 8 Jan 2024 13:18:00 -0800 Subject: [PATCH 3/6] define error report dir --- genie/process_mutation.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/genie/process_mutation.py b/genie/process_mutation.py index d6d31d29..6021b944 100644 --- a/genie/process_mutation.py +++ b/genie/process_mutation.py @@ -250,6 +250,7 @@ def annotate_mutation( """ input_files_dir = tempfile.mkdtemp(dir=workdir) output_files_dir = tempfile.mkdtemp(dir=workdir) + error_dir = os.path.join(output_files_dir, f"{center}_error_reports") for mutation_file in mutation_files: move_mutation(mutation_file, input_files_dir) @@ -262,6 +263,7 @@ def annotate_mutation( os.path.join(genie_annotation_pkg, "annotation_suite_wrapper.sh"), f"-i={input_files_dir}", f"-o={output_files_dir}", + f"-e={error_dir}", f"-m={merged_maf_path}", f"-c={center}", "-s=WXS", From d7b3bd0a39c3c15fc4f3c870c070519dda509686 Mon Sep 17 00:00:00 2001 From: rxu17 <26471741+rxu17@users.noreply.github.com> Date: Mon, 8 Jan 2024 13:47:36 -0800 Subject: [PATCH 4/6] add error dir changes to tests --- tests/test_process_mutation.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/test_process_mutation.py b/tests/test_process_mutation.py index 1e945e10..44239bca 100644 --- a/tests/test_process_mutation.py +++ b/tests/test_process_mutation.py @@ -104,11 +104,13 @@ def test_process_mutation_workflow(syn, genie_config): "syn22053204", ifcollision="overwrite.local", downloadLocation=genie_annotation_pkg, + version=1, #TODO: This should pull from a config file in the future ), call( "syn22084320", ifcollision="overwrite.local", downloadLocation=genie_annotation_pkg, + version=13, #TODO: This should pull from a config file in the future ), ] center = "SAGE" @@ -148,6 +150,7 @@ def test_annotate_mutation(): workdir = "working/dir/path" mktemp_calls = [call(dir=workdir)] * 2 input_dir = "input/dir" + error_dir = "input/dir/SAGE_error_reports" with patch.object( tempfile, "mkdtemp", return_value=input_dir ) as patch_mktemp, patch.object( @@ -169,6 +172,7 @@ def test_annotate_mutation(): "annotation/pkg/path/annotation_suite_wrapper.sh", f"-i={input_dir}", f"-o={input_dir}", + f"-e={error_dir}", f"-m=input/dir/data_mutations_extended_{center}.txt", f"-c={center}", "-s=WXS", From 2267c4a95e21a9c1b2b1588110c979e4f01b20c7 Mon Sep 17 00:00:00 2001 From: rxu17 <26471741+rxu17@users.noreply.github.com> Date: Mon, 8 Jan 2024 14:13:27 -0800 Subject: [PATCH 5/6] lint --- genie/process_mutation.py | 4 ++-- tests/test_process_mutation.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/genie/process_mutation.py b/genie/process_mutation.py index 6021b944..f60e8b22 100644 --- a/genie/process_mutation.py +++ b/genie/process_mutation.py @@ -202,14 +202,14 @@ def process_mutation_workflow( "syn22053204", ifcollision="overwrite.local", downloadLocation=genie_config["genie_annotation_pkg"], - version=1, #TODO: This should pull from a config file in the future + version=1, # TODO: This should pull from a config file in the future ) # Genome Nexus Jar file syn.get( "syn22084320", ifcollision="overwrite.local", downloadLocation=genie_config["genie_annotation_pkg"], - version=13, #TODO: This should pull from a config file in the future + version=13, # TODO: This should pull from a config file in the future ) annotated_maf_path = annotate_mutation( diff --git a/tests/test_process_mutation.py b/tests/test_process_mutation.py index 44239bca..8041af03 100644 --- a/tests/test_process_mutation.py +++ b/tests/test_process_mutation.py @@ -104,13 +104,13 @@ def test_process_mutation_workflow(syn, genie_config): "syn22053204", ifcollision="overwrite.local", downloadLocation=genie_annotation_pkg, - version=1, #TODO: This should pull from a config file in the future + version=1, # TODO: This should pull from a config file in the future ), call( "syn22084320", ifcollision="overwrite.local", downloadLocation=genie_annotation_pkg, - version=13, #TODO: This should pull from a config file in the future + version=13, # TODO: This should pull from a config file in the future ), ] center = "SAGE" From b3d649164407ad4322ddab3842e27e491045bacd Mon Sep 17 00:00:00 2001 From: rxu17 <26471741+rxu17@users.noreply.github.com> Date: Thu, 11 Jan 2024 11:01:24 -0800 Subject: [PATCH 6/6] comment out version until we can pull from config file --- genie/process_mutation.py | 4 ++-- tests/test_process_mutation.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/genie/process_mutation.py b/genie/process_mutation.py index f60e8b22..3631ef77 100644 --- a/genie/process_mutation.py +++ b/genie/process_mutation.py @@ -202,14 +202,14 @@ def process_mutation_workflow( "syn22053204", ifcollision="overwrite.local", downloadLocation=genie_config["genie_annotation_pkg"], - version=1, # TODO: This should pull from a config file in the future + # version=1, # TODO: This should pull from a config file in the future ) # Genome Nexus Jar file syn.get( "syn22084320", ifcollision="overwrite.local", downloadLocation=genie_config["genie_annotation_pkg"], - version=13, # TODO: This should pull from a config file in the future + # version=13, # TODO: This should pull from a config file in the future ) annotated_maf_path = annotate_mutation( diff --git a/tests/test_process_mutation.py b/tests/test_process_mutation.py index 8041af03..53c0c4c5 100644 --- a/tests/test_process_mutation.py +++ b/tests/test_process_mutation.py @@ -104,13 +104,13 @@ def test_process_mutation_workflow(syn, genie_config): "syn22053204", ifcollision="overwrite.local", downloadLocation=genie_annotation_pkg, - version=1, # TODO: This should pull from a config file in the future + # version=1, # TODO: This should pull from a config file in the future ), call( "syn22084320", ifcollision="overwrite.local", downloadLocation=genie_annotation_pkg, - version=13, # TODO: This should pull from a config file in the future + # version=13, # TODO: This should pull from a config file in the future ), ] center = "SAGE"