Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[GEN-1026] Output annotation error report #544

Merged
merged 6 commits into from
Jan 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 && \
Expand Down Expand Up @@ -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
4 changes: 4 additions & 0 deletions genie/process_mutation.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -248,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)
Expand All @@ -260,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",
Expand Down
4 changes: 4 additions & 0 deletions tests/test_process_mutation.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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(
Expand All @@ -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",
Expand Down
Loading