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

fix: Revert "feat: FLiRT Mutations column (#664)" #667

Merged
merged 1 commit into from
Sep 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
6 changes: 0 additions & 6 deletions .tests/config/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
14 changes: 4 additions & 10 deletions config/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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/
Expand All @@ -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:
Expand All @@ -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"

Expand Down Expand Up @@ -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
Expand Down
3 changes: 0 additions & 3 deletions resources/report-table-formatter.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
},
Expand Down
26 changes: 10 additions & 16 deletions workflow/rules/generate_output.smk
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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:
Expand Down Expand Up @@ -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"],
Expand 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",
Expand All @@ -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:
Expand All @@ -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"]
Expand All @@ -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
Expand Up @@ -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)
Expand All @@ -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
Expand Up @@ -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 = {}

Expand Down Expand Up @@ -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)

Expand Down
Loading