sfu-cl-lab / FactorBase

The source code repository for the FactorBase system
https://sfu-cl-lab.github.io/FactorBase/
10 stars 6 forks source link

Issuer of generation cp table: Data truncation: Division by 0 #236

Open greedcat opened 1 year ago

greedcat commented 1 year ago

During the generation of the CP tables, if the ratio of the local multi and total number of multi, there will be an error like Data truncation: Division by 0

Example: image

The reason is that the calculation of CP is local_mult/total_mult. If the result is smaller than the minimum number of the table column type( default is float(7,6) ), it will end with 0 Cp. In the next step of calculating likelihood, likelihood = LOG(CP) * local_mult. It will have the problem of log(0), which causes the "Data truncation: Division by 0" issue.

Solution:

Modify the schema of CP_table, by adding more decimal numbers after points like float(7,10) for column CP.