tseemann / mlst

:id: Scan contig files against PubMLST typing schemes
GNU General Public License v2.0
201 stars 47 forks source link

Each scheme needs a genotype #105

Open lskatz opened 3 years ago

lskatz commented 3 years ago

When creating my own scheme I noticed that I got the same error as in #72 with an undefined hash. This is because I did not create a set of values for my scheme. I instead made a blank scheme:

(echo -ne "ST\t"; \ls *.tfa | sed 's/.tfa//' | tr '\n' '\t'; echo clonal_complex) > lmonocgmlst.txt

What fixed it was adding a dummy value

(echo -ne "ST\t"; \ls *.tfa | sed 's/.tfa//' | tr '\n' '\t'; echo clonal_complex
  # fake genotype to avoid undefined genotype error
  echo -ne 1
  for i in *.tfa; do echo -ne "\t1"; done;
  echo;
) > lmonocgmlst.txt

Suggest either allowing no genotypes in a scheme, creating a dummy genotype internally, or allowing missing genotype data in Scheme.pm.