Skip to content

Commit

Permalink
fix: processing vembrane config (#330)
Browse files Browse the repository at this point in the history
  • Loading branch information
FelixMoelder authored Oct 17, 2024
1 parent 33eb4e4 commit 1629c6d
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -289,8 +289,10 @@ views:
display-mode: hidden
chromosome:
display-mode: detail
end position:
display-mode: detail
position:
display-mode: detail
display-mode: detail
reference allele:
display-mode: detail
alternative allele:
Expand Down
17 changes: 11 additions & 6 deletions workflow/rules/common.smk
Original file line number Diff line number Diff line change
Expand Up @@ -1065,7 +1065,6 @@ def get_annotation_fields_for_tables(wildcards):
"CANONICAL",
"CLIN_SIG",
"Consequence",
"EXON",
"Feature",
"Gene",
"gnomADg_AF",
Expand Down Expand Up @@ -1146,7 +1145,7 @@ def get_info_prob_fields_for_tables(wildcards, input):
scenario = yaml.load(scenario_file, Loader=yaml.SafeLoader)
events = list(scenario["events"].keys())
events += ["artifact", "absent"]
return [f"PROB_{e.upper()}" for e in events]
return events
else:
return []

Expand Down Expand Up @@ -1215,7 +1214,10 @@ def get_vembrane_config(wildcards, input):
## INFO fields holding varlociraptor probabilities
info_prob_fields = get_info_prob_fields_for_tables(wildcards, input)
append_items(
info_prob_fields, rename_info_fields, "INFO['{}']".format, "prob: {}".format
info_prob_fields,
rename_info_fields,
lambda x: f"INFO['PROB_{x.upper()}']",
"prob: {}".format,
)

## INFO fields relevant in fusion calling, only added for 'fusion' calling
Expand All @@ -1240,6 +1242,10 @@ def get_vembrane_config(wildcards, input):
"gnomADg_AF": {
"name": "gnomad genome af",
},
"EXON": {
"name": "exon",
"expr": "ANN['EXON'].raw",
},
"SpliceAI_pred_DS_AG": {
"name": "spliceai acceptor gain",
},
Expand All @@ -1263,7 +1269,6 @@ def get_vembrane_config(wildcards, input):
"ANN['{}']".format,
lambda x: x.lower(),
)

# determine a stable sort order, to avoid implicit assumptions about field
# order; downstream scripts split-call-tables.py and
# join_fusion_partner.py will remove columns they respectively don't need
Expand All @@ -1283,7 +1288,7 @@ def get_vembrane_config(wildcards, input):
"ANN['Consequence']",
"ANN['CLIN_SIG']",
"ANN['gnomADg_AF']",
"ANN['EXON']",
"ANN['EXON'].raw",
"ANN['REVEL']",
# variants only, split-call-tables.py will select the column with the
# highest score and will put it in the same place
Expand Down Expand Up @@ -1414,7 +1419,7 @@ def get_primer_extra(wc, input):
min_primer_len = get_shortest_primer_length(input.reads)
# Check if shortest primer is below default values
if min_primer_len < 32:
extra += f" -T {min_primer_len-2}"
extra += f" -T {min_primer_len - 2}"
if min_primer_len < 19:
extra += f" -k {min_primer_len}"
return extra
Expand Down
2 changes: 1 addition & 1 deletion workflow/rules/plugins.smk
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ rule download_revel:
conda:
"../envs/curl.yaml"
shell:
"curl https://rothsj06.dmz.hpc.mssm.edu/revel-v1.3_all_chromosomes.zip -o {output} &> {log}"
"curl https://zenodo.org/records/7072866/files/revel-v1.3_all_chromosomes.zip -o {output} &> {log}"


rule process_revel_scores:
Expand Down

0 comments on commit 1629c6d

Please sign in to comment.