Skip to content

Commit

Permalink
Adjust scoring system and document correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
tseemann committed Jul 5, 2018
1 parent 007e50f commit 0009d77
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ Each MLST prediction gets a score out of 100.
The score for a scheme with N alleles is as follows:

* +90/N points for an exact allele match _e.g._ `42`
* +45/N points for a novel allele match (50% of an exact allele) _e.g._ `~42`
* +63/N points for a novel allele match (50% of an exact allele) _e.g._ `~42`
* +18/N points for a partial allele match (20% of an exact alelle) _e.g._ `42?`
* 0 points for a missing allele _e.g._ `-`
* +10 points if there is a matching ST type for the allele combination
Expand Down
8 changes: 7 additions & 1 deletion bin/mlst
Original file line number Diff line number Diff line change
Expand Up @@ -262,11 +262,17 @@ sub find_mlst {
# score is out of 100 (90 split across alleles, 10 for an ST type)
# penalties are given as below for inexact alleles
my $score = $nlocii;
$score -= 0.2*($sig =~ tr/~/~/); # novelish
#msg("Start: score=$score ($sig)") if $debug;
$score -= 0.3*($sig =~ tr/~/~/); # novelish
#msg("Novel: score=$score") if $debug;
$score -= 0.5*($sig =~ tr/?/?/); # approx
#msg("Parti: score=$score") if $debug;
$score -= 1.0*($sig =~ tr/-/-/); # absent
#msg("Absen: score=$score") if $debug;
$score = int($score * 90 / $nlocii);
#msg("Normz: score=$score") if $debug;
$score += 10 if $ST ne '-';
#msg("HasST: score=$score") if $debug;
msg("SCORE=$score\t$name\t$ST\t$sig\t($nlocii genes)") if $debug;
push @sig, [ $name, $ST, $sig, $score ] if $score >= $minscore;
}
Expand Down

0 comments on commit 0009d77

Please sign in to comment.