FINNGEN / META_ANALYSIS

Tools for doing x way meta-analysis
MIT License
6 stars 14 forks source link

Check for another variant in same position #29

Closed juhaa closed 3 years ago

juhaa commented 3 years ago

When the right study has more than one variant in the same position and only the first one is assigned to it's future, the following variant is not checked even though it could be an exact match (ref & alt) to the left study's variant. This PR fixes this (#27). Now the checking is forced, and the deque future is utilized more to hold the variants.

juhaa commented 3 years ago

I refined the code so get_next_data is not called again inside get_next_variant but instead in get_next_data checking next position in file is forced if future holds only variants in one position. If future has variants in multiple positions, only the first one(s) are returned and file is not checked because we know future already contains all the variants in the same position.

This seems to work better than always force checking the next variant in file, regardless if future has variants in it or not, because future gets really long after a while and demanding to always go through.

Also the "ALREADY ADDED" checking and printing is now for perfect matches only.