Skip to content

Commit

Permalink
Merge pull request #259 from cov-lineages/dev
Browse files Browse the repository at this point in the history
Add security features to use of scorpio
  • Loading branch information
aineniamh authored Jun 24, 2021
2 parents e2c9c51 + 54ffa79 commit 0f6edad
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
3 changes: 2 additions & 1 deletion pangolin/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
_program = "pangolin"
__version__ = "3.1.4"
__version__ = "3.1.5"


__all__ = ["pangolearn",
"utils"]
Expand Down
12 changes: 4 additions & 8 deletions pangolin/scripts/pangolearn.smk
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,8 @@ rule scorpio:
-i {input.fasta:q} \
-o {output.report:q} \
-t {workflow.cores} \
--output-counts \
--pangolin \
--long &> {log:q}
"""

Expand Down Expand Up @@ -219,10 +221,7 @@ rule generate_report:
new_row["scorpio_conflict"] = scorpio_call_info["conflict"]
new_row["note"] = f'scorpio call: Alt alleles {scorpio_call_info["alt_count"]}; Ref alleles {scorpio_call_info["ref_count"]}; Amb alleles {scorpio_call_info["ambig_count"]}'

if "(" in new_row["scorpio_call"]:
scorpio_lineage = new_row["scorpio_call"].split("(")[1].split("+")[0].split("-like")[0]
else:
scorpio_lineage = new_row["scorpio_call"].split("+")[0].split("-like")[0]
scorpio_lineage = scorpio_call_info["mrca_lineage"]
expanded_scorpio_lineage = expand_alias(scorpio_lineage, alias_dict)
expanded_pango_lineage = expand_alias(row['lineage'], alias_dict)
if '/' not in scorpio_lineage:
Expand Down Expand Up @@ -346,10 +345,7 @@ rule usher_to_report:
scorpio_conflict = scorpio_call_info["conflict"]
note = f'scorpio call: Alt alleles {scorpio_call_info["alt_count"]}; Ref alleles {scorpio_call_info["ref_count"]}; Amb alleles {scorpio_call_info["ambig_count"]}'

if "(" in scorpio_call:
scorpio_lineage = scorpio_call.split("(")[1].split("+")[0].split("-like")[0]
else:
scorpio_lineage = scorpio_call.split("+")[0].split("-like")[0]
scorpio_lineage = scorpio_call_info["mrca_lineage"]
expanded_scorpio_lineage = expand_alias(scorpio_lineage, alias_dict)
expanded_pango_lineage = expand_alias(lineage, alias_dict)
if expanded_scorpio_lineage and expanded_pango_lineage and not expanded_pango_lineage.startswith(expanded_scorpio_lineage):
Expand Down

0 comments on commit 0f6edad

Please sign in to comment.