TheJacksonLaboratory / LIRICAL

LIkelihood Ratio Interpretation of Clinical AbnormaLities
https://thejacksonlaboratory.github.io/LIRICAL/stable
Other
24 stars 11 forks source link

Locale issue for GenotypeLikelihoodRatioTest in lirical-core #655

Closed pnrobinson closed 5 months ago

pnrobinson commented 5 months ago

The following

assertThat(gle.explanation(), 
equalTo("log<sub>10</sub>(LR)=109.235 P(G|D)=0.0000. P(G|&#172;D)=0.0000.  Mode of inheritance: autosomal recessive. Observed weighted deleterious variant count: 44.80. &lambda;<sub>disease</sub>=2. &lambda;<sub>background</sub>=0.0070."));

leads to

Failures: 
[ERROR]   GenotypeLikelihoodRatioTest.thrbExample:127 
Expected: 
"log<sub>10</sub>(LR)=109.235 P(G|D)=0.0000. P(G|&#172;D)=0.0000.  Mode of inheritance: autosomal recessive. Observed weighted deleterious variant count: 44.80. &lambda;<sub>disease</sub>=2. &lambda;<sub>background</sub>=0.0070."
but: was 
"log<sub>10</sub>(LR)=109,235 P(G|D)=0,0000. P(G|&#172;D)=0,0000.  Mode of inheritance: autosomal recessive. Observed weighted deleterious variant count: 44,80. &lambda;<sub>disease</sub>=2. &lambda;<sub>background</sub>=0,0070."

That is, the test is dependent on the locale-specific way of writing a decimal point (comma), and thus fails.

ielis commented 5 months ago

@pnrobinson the bug should now be fixed since we will use en_US to run tests from now on. Please reopen if the problems persist.