Bugfix/ld in mhc region
Created by: at7
Description
Helpdesk reported a problem with getting LD in the MHC region. Trying to use the LD region endpoint in the MHC region causes timeouts caused by the high density of variation in that region. We are now checking the input region and throw an exception if it overlaps the MHC region and only allow a maximum region size of 10KB instead of 500KB. I tested it with my local REST installation. I tried 100KB and 50KB but even 50 was still taking a long time to return results.
Use case
We updated the LD region endpoint which calculates pairwise LD for all variants in a given region. The MHC region has a very high density of variation and pairwise calculation can get very big and cause runtime and memory problems.
Benefits
Fewer problems for the REST server. Requests with default region size of 500KB in the MHC region causes memory problems and timeouts.
Possible Drawbacks
None . Users will most likely have problems computing LD in MHC region with current settings. Getting back an error message if the selected region overlaps MHC and is too big is a good compromise. At least users know why the endpoint has problems.
Testing
I added tests to make sure that the overlap with MCH region is reported correctly.
Only archive,t fails when running entire test suite.
Changelog
Would you consider this as a change in functionality? I'm happy to add a comment to the changelog.