From 8b9e67dd1b232bc856e7e95b349a290fbe2f5230 Mon Sep 17 00:00:00 2001 From: David Laehnemann Date: Thu, 11 May 2023 15:09:52 +0200 Subject: [PATCH 1/3] remove unused report-table-formatter.js --- resources/report-table-formatter.js | 59 ----------------------------- 1 file changed, 59 deletions(-) delete mode 100644 resources/report-table-formatter.js diff --git a/resources/report-table-formatter.js b/resources/report-table-formatter.js deleted file mode 100644 index 8104024d..00000000 --- a/resources/report-table-formatter.js +++ /dev/null @@ -1,59 +0,0 @@ -{ - "breakpoint_seq": function format(value) { - var primer_blast_url = `https://www.ncbi.nlm.nih.gov/tools/primer-blast/index.cgi?LINK_LOC=bookmark&INPUT_SEQUENCE=${value}&PRIMER5_END=900&PRIMER3_START=1100&PRIMER_PRODUCT_MIN=200&PRIMER_PRODUCT_MAX=1200&ORGANISM=Homo%20sapiens&NEWWIN=on&NEWWIN=on&SHOW_SVIEWER=true`; - var seq = "…" + value.substring(value.length / 2 - 10, value.length / 2 + 10) + "…"; - var link = `${seq}`; - return link; - }, - "EVENT": function format(value) { - var filename = value.replace("_circle_", "_"); - var link = `${value}`; - return link; - }, - "GENES": function format(value) { - $(function () { - $('[data-toggle="tooltip"]').tooltip() - }); - let genes = value.split(";"); - let rows = ""; - for (let g of genes) { - rows = `${rows}${g}`; - }; - let table = `
${rows}
Genes
`; - let button = ` - -`; - return button; - }, - "gene_helper": function format(value) { - $(function () { - $('[data-toggle="tooltip"]').tooltip() - }); - let genes = value.split(";"); - let rows = ""; - for (let g of genes) { - rows = `${rows}${g}`; - }; - let table = `
${rows}
Genes
`; - let button = ` - -`; - return button; - }, - "GENES": function format(value) { - return this["gene_helper"](value); - }, - "GENES_1": function format(value) { - return this["gene_helper"](value); - }, - "GENES_2": function format(value) { - return this["gene_helper"](value); - }, - "GENES_3": function format(value) { - return this["gene_helper"](value); - }, - "GENES_4": function format(value) { - return this["gene_helper"](value); - }, -} - From a93090e0dbf2132c7660af4b413aeb83e3fc45a0 Mon Sep 17 00:00:00 2001 From: David Laehnemann Date: Thu, 11 May 2023 15:23:04 +0200 Subject: [PATCH 2/3] move scenarios to workflow/resources/ --- .../resources}/scenarios/illumina_circle_scenario.yaml | 0 .../resources}/scenarios/nanopore_circle_scenario.yaml | 0 .../scenarios/nanopore_illumina_joint_circle_scenario.yaml | 0 workflow/rules/common.smk | 6 +++--- 4 files changed, 3 insertions(+), 3 deletions(-) rename {resources => workflow/resources}/scenarios/illumina_circle_scenario.yaml (100%) rename {resources => workflow/resources}/scenarios/nanopore_circle_scenario.yaml (100%) rename {resources => workflow/resources}/scenarios/nanopore_illumina_joint_circle_scenario.yaml (100%) diff --git a/resources/scenarios/illumina_circle_scenario.yaml b/workflow/resources/scenarios/illumina_circle_scenario.yaml similarity index 100% rename from resources/scenarios/illumina_circle_scenario.yaml rename to workflow/resources/scenarios/illumina_circle_scenario.yaml diff --git a/resources/scenarios/nanopore_circle_scenario.yaml b/workflow/resources/scenarios/nanopore_circle_scenario.yaml similarity index 100% rename from resources/scenarios/nanopore_circle_scenario.yaml rename to workflow/resources/scenarios/nanopore_circle_scenario.yaml diff --git a/resources/scenarios/nanopore_illumina_joint_circle_scenario.yaml b/workflow/resources/scenarios/nanopore_illumina_joint_circle_scenario.yaml similarity index 100% rename from resources/scenarios/nanopore_illumina_joint_circle_scenario.yaml rename to workflow/resources/scenarios/nanopore_illumina_joint_circle_scenario.yaml diff --git a/workflow/rules/common.smk b/workflow/rules/common.smk index 2c32dcde..56eb0334 100644 --- a/workflow/rules/common.smk +++ b/workflow/rules/common.smk @@ -175,11 +175,11 @@ def scenario_name(wildcards): def get_scenario(wildcards): scenario = scenario_name(wildcards) if scenario == "nanopore_only": - return "resources/scenarios/nanopore_circle_scenario.yaml" + return workflow.source_path("../resources/scenarios/nanopore_circle_scenario.yaml") elif scenario == "illumina_only": - return "resources/scenarios/illumina_circle_scenario.yaml" + return workflow.source_path("../resources/scenarios/illumina_circle_scenario.yaml") elif scenario == "nanopore_with_illumina_support": - return "resources/scenarios/nanopore_illumina_joint_circle_scenario.yaml" + return workflow.source_path("../resources/scenarios/nanopore_illumina_joint_circle_scenario.yaml") else: raise ValueError(f"Unknown scenario: {scenario}") From c0472f8fb5e996b6b886ff559aa30cff0782970a Mon Sep 17 00:00:00 2001 From: David Laehnemann Date: Thu, 11 May 2023 15:29:18 +0200 Subject: [PATCH 3/3] snakefmt --- workflow/rules/common.smk | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/workflow/rules/common.smk b/workflow/rules/common.smk index 56eb0334..5ba61120 100644 --- a/workflow/rules/common.smk +++ b/workflow/rules/common.smk @@ -175,11 +175,17 @@ def scenario_name(wildcards): def get_scenario(wildcards): scenario = scenario_name(wildcards) if scenario == "nanopore_only": - return workflow.source_path("../resources/scenarios/nanopore_circle_scenario.yaml") + return workflow.source_path( + "../resources/scenarios/nanopore_circle_scenario.yaml" + ) elif scenario == "illumina_only": - return workflow.source_path("../resources/scenarios/illumina_circle_scenario.yaml") + return workflow.source_path( + "../resources/scenarios/illumina_circle_scenario.yaml" + ) elif scenario == "nanopore_with_illumina_support": - return workflow.source_path("../resources/scenarios/nanopore_illumina_joint_circle_scenario.yaml") + return workflow.source_path( + "../resources/scenarios/nanopore_illumina_joint_circle_scenario.yaml" + ) else: raise ValueError(f"Unknown scenario: {scenario}")