Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "feat: FLiRT Mutations column (#664)"
Browse files Browse the repository at this point in the history
This reverts commit f77d42e.
vBassewitz committed Sep 7, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent f77d42e commit 235c68d
Showing 6 changed files with 15 additions and 44 deletions.
6 changes: 0 additions & 6 deletions .tests/config/config.yaml
Original file line number Diff line number Diff line change
@@ -166,12 +166,6 @@ mixtures:
- "_MIX_B-1-1-7_PERC_90_MIX_B-1-351_PERC_10"

# mutations to be highlighted (protein name -> variants)

flirt:
S:
- F456L
- R346T

mth:
S:
- N501Y
14 changes: 4 additions & 10 deletions config/config.yaml
Original file line number Diff line number Diff line change
@@ -21,7 +21,7 @@ data-handling:
# flag for archiving data
# True: data is archived in path defined below
# False: data is not archived
archive-data: False
archive-data: True
# path of incoming data, which is moved to the
# data directory by the preprocessing script
incoming: ../incoming/
@@ -34,7 +34,7 @@ data-handling:
quality-criteria:
illumina:
# minimal length of acceptable reads
min-length-reads: 100
min-length-reads: 30
# average quality of acceptable reads (PHRED)
min-PHRED: 20
ont:
@@ -61,9 +61,9 @@ preprocessing:
# ARTIC primer version to clip from reads. See
# https://github.com/artic-network/artic-ncov2019/tree/master/primer_schemes/nCoV-2019/V4
# for more information
artic-primer-version: 4
artic-primer-version: 3
# path to amplicon primers in bed format for hard-clipping on paired end files (illumina) or url to file that should be downloaded
amplicon-primers: "resources/SARS-CoV-2-artic-v4_1.primer.bed"
amplicon-primers: "resources/nCoV-2019.primer.bed"
# GenBank accession of reference sequence of the amplicon primers
amplicon-reference: "MN908947"

@@ -124,12 +124,6 @@ strain-calling:
B.1.617.2: OK091006

# mutations to be highlighted (protein name -> variants)

flirt:
S:
- F456L
- R346T

mth:
S:
- L18F
3 changes: 0 additions & 3 deletions resources/report-table-formatter.js
Original file line number Diff line number Diff line change
@@ -91,9 +91,6 @@
}

},
"FLiRT Mutations": function format(value) {
return this["variant helper"](value, true);
},
"VOC Mutations": function format(value) {
return this["variant helper"](value, true);
},
26 changes: 10 additions & 16 deletions workflow/rules/generate_output.smk
Original file line number Diff line number Diff line change
@@ -153,7 +153,6 @@ rule overview_table_patient_csv:
wildcards, "all samples"
),
mth=config.get("mth"),
flirt=config.get("flirt"),
samples=lambda wildcards: get_samples_for_date(wildcards.date),
mode=config["mode"],
log:
@@ -179,7 +178,6 @@ use rule overview_table_patient_csv as overview_table_environment_csv with:
qc_data="results/{date}/tables/environment-overview.csv",
params:
mth=config.get("mth"),
flirt=config.get("flirt"),
samples=lambda wildcards: get_samples_for_date(wildcards.date),
mode=config["mode"],
log:
@@ -373,7 +371,6 @@ rule snakemake_reports_patient:
expand_samples_for_date(
["results/{{date}}/lineage-variant-report/{sample}.lineage-variants"]
),
# lambda wildcards: "results/{date}/lineage-variant-report/all",
lambda wildcards: expand(
"results/{{date}}/vcf-report/{target}.{filter}.{annotation}",
target=get_samples_for_date(wildcards.date) + ["all"],
@@ -383,10 +380,10 @@ rule snakemake_reports_patient:
# 3. Sequencing Details
"results/{date}/qc/laboratory/multiqc.html",
"results/{date}/plots/coverage-reference-genome.png",
# "results/{date}/plots/coverage-assembled-genome.png",
# lambda wildcards: "results/{date}/plots/primer-clipping-intervals.svg"
# if any_sample_is_amplicon(wildcards)
# else [],
"results/{date}/plots/coverage-assembled-genome.png",
lambda wildcards: "results/{date}/plots/primer-clipping-intervals.svg"
if any_sample_is_amplicon(wildcards)
else [],
# 4. Assembly
"results/{date}/filter-overview",
"results/{date}/pangolin-call-overview",
@@ -409,6 +406,8 @@ rule snakemake_reports_patient:
"results/patient-reports/{date}.zip",
params:
for_testing=get_if_testing("--snakefile ../workflow/Snakefile"),
conda:
"../envs/snakemake.yaml"
log:
"logs/snakemake_reports/{date}.log",
shell:
@@ -424,10 +423,10 @@ use rule snakemake_reports_patient as snakemake_reports_environment with:
"results/{{date}}/{execution_mode}/overview/",
execution_mode=get_checked_mode(),
),
# "results/{date}/plots/all.major-strain.strains.kallisto.svg",
# expand_samples_for_date(
# ["results/{{date}}/plots/strain-calls/{sample}.strains.kallisto.svg"]
# ),
"results/{date}/plots/all.major-strain.strains.kallisto.svg",
expand_samples_for_date(
["results/{{date}}/plots/strain-calls/{sample}.strains.kallisto.svg"]
),
# 2. Variant Call Details
expand_samples_for_date(
["results/{{date}}/lineage-variant-report/{sample}.lineage-variants"]
@@ -445,8 +444,3 @@ use rule snakemake_reports_patient as snakemake_reports_environment with:
"results/environment-reports/{date}.zip",
log:
"logs/snakemake_reports/{date}.log",


# rule output_sample_sheet:
# input:
# Path(pep.config_file()).parent / pep.config()["sample_table"],
4 changes: 0 additions & 4 deletions workflow/schemas/config.schema.yaml
Original file line number Diff line number Diff line change
@@ -115,9 +115,6 @@ properties:
description: flag for using gisaid or genbank
lineage-references:
type: object
flirt:
type: object
description: mutations to be highlighted (protein name -> variants)
mth:
type: object
description: mutations to be highlighted (protein name -> variants)
@@ -133,5 +130,4 @@ required:
- assembly
- variant-calling
- strain-calling
- flirt
- mth
6 changes: 1 addition & 5 deletions workflow/scripts/generate-overview-table.py
Original file line number Diff line number Diff line change
@@ -193,7 +193,6 @@ def register_contig_lengths(assemblies, name):
}

for sample, file in iter_with_samples(snakemake.input.bcf):
flirt_mutations = {}
mutations_of_interest = {}
other_mutations = {}

@@ -229,14 +228,11 @@ def fmt_variants(variants):

hgvsp = f"{feature}:{alteration}"
entry = (hgvsp, f"{vaf:.3f}")
if alteration in snakemake.params.flirt.get(feature, {}):
insert_entry(flirt_mutations, hgvsp, vaf)
elif alteration in snakemake.params.mth.get(feature, {}):
if alteration in snakemake.params.mth.get(feature, {}):
insert_entry(mutations_of_interest, hgvsp, vaf)
else:
insert_entry(other_mutations, hgvsp, vaf)

data.loc[sample, "FLiRT Mutations"] = fmt_variants(flirt_mutations)
data.loc[sample, "VOC Mutations"] = fmt_variants(mutations_of_interest)
data.loc[sample, "Other Mutations"] = fmt_variants(other_mutations)

0 comments on commit 235c68d

Please sign in to comment.