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

feat: Added support for scarHRD #429

Merged
merged 4 commits into from
Aug 22, 2023
Merged
Show file tree
Hide file tree
Changes from 3 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 snappy_pipeline/apps/snappy_snake.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@
helper_gcnv_model_targeted,
helper_gcnv_model_wgs,
hla_typing,
homologous_recombination_deficiency,
igv_session_generation,
ngs_data_qc,
ngs_mapping,
ngs_sanity_checking,
panel_of_normals,
repeat_expansion,
somatic_cnv_checking,
somatic_gene_fusion_calling,
somatic_hla_loh_calling,
somatic_msi_calling,
Expand Down Expand Up @@ -81,13 +81,13 @@
"helper_gcnv_model_targeted": helper_gcnv_model_targeted,
"helper_gcnv_model_wgs": helper_gcnv_model_wgs,
"hla_typing": hla_typing,
"homologous_recombination_deficiency": homologous_recombination_deficiency,
"igv_session_generation": igv_session_generation,
"ngs_mapping": ngs_mapping,
"ngs_data_qc": ngs_data_qc,
"panel_of_normals": panel_of_normals,
"repeat_analysis": repeat_expansion,
"ngs_sanity_checking": ngs_sanity_checking,
"somatic_cnv_checking": somatic_cnv_checking,
"somatic_gene_fusion_calling": somatic_gene_fusion_calling,
"somatic_hla_loh_calling": somatic_hla_loh_calling,
"somatic_msi_calling": somatic_msi_calling,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
# -*- coding: utf-8 -*-
"""CUBI Pipeline homologous_recombination_deficiency step Snakefile"""

import os

from snappy_pipeline import expand_ref
from snappy_pipeline.workflows.homologous_recombination_deficiency import (
HomologousRecombinationDeficiencyWorkflow,
)

__author__ = "Eric Blanc"


# Configuration ===============================================================


configfile: "config.yaml"


# Expand "$ref" JSON pointers in configuration (also works for YAML)
config, lookup_paths, config_paths = expand_ref("config.yaml", config)

# WorkflowImpl Object Setup ===================================================

wf = HomologousRecombinationDeficiencyWorkflow(
workflow, config, lookup_paths, config_paths, os.getcwd()
)

# Rules =======================================================================


localrules:
# Linking files from work/ to output/ should be done locally
homologous_recombination_deficiency_link_out_run,


rule all:
input:
wf.get_result_files(),


# House-Keeping ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

# Generic linking out ---------------------------------------------------------


rule homologous_recombination_deficiency_link_out_run:
input:
wf.get_input_files("link_out", "run"),
output:
wf.get_output_files("link_out", "run"),
run:
shell(wf.get_shell_cmd("link_out", "run", wildcards))


# Homologous Recombination Deficiency score ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

# Run scarHRD -----------------------------------------------------------------


rule homologous_recombination_deficiency_scarHRD_install:
output:
**wf.get_output_files("scarHRD", "install"),
threads: wf.get_resource("scarHRD", "install", "threads")
resources:
time=wf.get_resource("scarHRD", "install", "time"),
memory=wf.get_resource("scarHRD", "install", "memory"),
partition=wf.get_resource("scarHRD", "install", "partition"),
tmpdir=wf.get_resource("scarHRD", "install", "tmpdir"),
log:
**wf.get_log_file("scarHRD", "install"),
wrapper:
wf.wrapper_path("scarHRD/install")


rule homologous_recombination_deficiency_scarHRD_gcreference:
output:
**wf.get_output_files("scarHRD", "gcreference"),
threads: wf.get_resource("scarHRD", "gcreference", "threads")
resources:
time=wf.get_resource("scarHRD", "gcreference", "time"),
memory=wf.get_resource("scarHRD", "gcreference", "memory"),
partition=wf.get_resource("scarHRD", "gcreference", "partition"),
tmpdir=wf.get_resource("scarHRD", "gcreference", "tmpdir"),
log:
**wf.get_log_file("scarHRD", "gcreference"),
wrapper:
wf.wrapper_path("scarHRD/gcreference")


rule homologous_recombination_deficiency_scarHRD_run:
input:
unpack(wf.get_input_files("scarHRD", "run")),
output:
**wf.get_output_files("scarHRD", "run"),
threads: wf.get_resource("scarHRD", "run", "threads")
resources:
time=wf.get_resource("scarHRD", "run", "time"),
memory=wf.get_resource("scarHRD", "run", "memory"),
partition=wf.get_resource("scarHRD", "run", "partition"),
tmpdir=wf.get_resource("scarHRD", "run", "tmpdir"),
log:
**wf.get_log_file("scarHRD", "run"),
wrapper:
wf.wrapper_path("scarHRD/run")
Loading