Skip to content

Commit

Permalink
Merge pull request #1 from RIVM-bioinformatics:hashed_output
Browse files Browse the repository at this point in the history
Add hashed output
  • Loading branch information
KHajji authored Jul 15, 2022
2 parents b5b651a + 387c53d commit d99de54
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ __pycache__/
envs/src/
.pytest_cache/
schemes/
input/
output/

config/user_parameters.yaml
config/sample_sheet.yaml
2 changes: 1 addition & 1 deletion Snakefile
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ localrules:
rule all:
input:
expand(OUT + '/cgmlst/{scheme}/results_alleles.tsv', scheme=SCHEMES),
# expand(OUT + '/cgmlst/{scheme}/hashed_results_alleles.csv', scheme=SCHEMES)
expand(OUT + '/cgmlst/{scheme}/hashed_results_alleles.csv', scheme=SCHEMES)

#@################################################################################
#@#### Processes #####
Expand Down
2 changes: 2 additions & 0 deletions bin/get_allele_hashes.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,8 @@ def __get_hash_from_hash_id_tbl(self, hash_id_tbl, id_number):
allele_hash = list(set(allele_hash))
if len(allele_hash) > 1:
f"The id number {id_number} did not deliver a unique hash: {allele_hash}"
elif len(allele_hash) < 1:
raise ValueError(f"The id number {id_number} did not deliver a hash")
return allele_hash[0]

def __gen_hash_per_id_num(self, hash_id_tbl, id_numbers, fasta_file):
Expand Down
2 changes: 1 addition & 1 deletion bin/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.1.0"
__version__ = "0.2.0"

0 comments on commit d99de54

Please sign in to comment.