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: processing vembrane config #330

Merged
merged 9 commits into from
Oct 17, 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
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,
Comment on lines +1217 to +1220
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice cleanup, thanks!

)

## 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}"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, let's hope this stays more robust in the long-term and that newer versions will also end up on Zenodo!



rule process_revel_scores:
Expand Down
Loading