cadms / resfinder

8 stars 5 forks source link

Multiple typos in dict keys & more: lenght (should be length) #6

Open samuell opened 1 year ago

samuell commented 1 year ago

Summary

There are a number of misspelled dictionary keys, which are spelled lenght instead of length, which has caused some troubles in our pipeline.

How to reproduce

  1. Check out the latest master commit:
git checkout f75c5205ca82ca825c2bef5494060d5169788135
  1. Run a grep for the mis-spelled version of "length":
grep -nr lenght *

Actual output

The output from the grep command is:

cge/out/test.py:30:    "ref_gene_lenght": "800",
cge/out/test.py:53:    "gene_lenght": "ref_gene_lenght",
cge/out/test.py:64:    "gene_lenght": "800",
cge/out/valueparsers.py:11:            return ("This field expects a string of lenght 64 but the lenght "
cge/out/beone.json:32:    "ref_gene_lenght": "integer",
cge/out/beone.json:52:      "ref_gene_lenght": "integer",
cge/standardize_results.py:91:        self["ref_gene_lenght"] = res["sbjct_length"]
cge/phenotype2genotype/isolate.py:166:                    ref_length=gene_info["ref_gene_lenght"],
cge/phenotype2genotype/isolate.py:204:                        ref_length=gene_info["ref_gene_lenght"],

Expected output

The output of that grep command should be empty.

Additional information

For context, one can compare the number of occurances of the correct and the incorrect spelling:

Correct spelling

grep -nr length * | wc -l
65

Incorrect spelling:

grep -nr lenght * | wc -l
9
samuell commented 1 year ago

Oh, hmm, I realize I should perhaps post this in the upstream repo. But might be good to know about the issue here as well perhaps.