caceres-lab / InvFEST-code

Visual platform for human polymorphic inversions
Apache License 2.0
5 stars 0 forks source link

Wrong fosmid number in Grial predictions #73

Open cacereslab opened 4 years ago

cacereslab commented 4 years ago

In different cases apparently the wrong number of fosmids that support a Grial prediction is shown in the Prediction section, although actually the fosmids downloaded seems to be ok.

For example, HsInv0058:

This happens both in public and private DB.

RuthGG commented 4 years ago

It was a problem with a column in the table 'predictions' that is not updated automatically.

The real solution would be to modify the php to make a mysql query and retrieve an updated amount of fosmids, and to delete the corresponding column in the predictions table.

As a temporary solution, I have updated the numbers and modified the add_fosmid_predicitons procedure to update the amount of fosmids automatically.

The applied query to make the update was (only in development version):

UPDATE predictions INNER JOIN (SELECT p.id, COUNT(fosmids_id) AS result FROM predictions p  
INNER JOIN fosmids_predictions fp ON (p.research_id=fp.predictions_id and p.research_name = fp.predictions_research_name )
GROUP BY p.id
)AS fosm ON predictions.id = fosm.id  SET support = result ;
cacereslab commented 4 years ago

I am not sure what is the reason of the problem, because the number of fosmids for a prediction shouldn't have change since the database was created. However, several of the predictions with differences in the number of fosmids are complex or have suffered split/merge processes and that might be part of the problem. In any case this should be solved when we create the new HG38 version and probably we could apply calculating the number of fosmids directly.