Skip to content

Necessary Updates to the Mapper code [ENSCORESW-2168].

Marek Szuba requested to merge github/fork/avullo/master into master

Created by: avullo


  • Filling out the template is required. Any pull request that does not include enough information to be reviewed in a timely manner may be closed at the maintainers' discretion;
  • Review the contributing guidelines for this repository; remember in particular:
    • do not modify code without testing for regression
    • provide simple unit tests to test the changes
    • if you change the schema you must patch the test databases as well, see Updating the schema
    • the PR must not fail unit testing


This is a rebase onto master of branch experimental/mapper_update, which is meant to address most of the Mapper issues documented under [ENSCORESW-2168].

Use case

The current mapper code does not correctly handle several edge cases and emits an incorrect output. See [ENSCORESW-2168] for more details.


A much more robust mapper code. Among several things, it's making the Genebuild Loutre import pipeline work correctly.

Possible Drawbacks

The Mapper::map_coordinates method could be slower under certain circumstances, i.e. when mapping from several non overlapping intervals as it has now to take into account the cost of building and querying an interval tree. Querying is more expensive than current binary search in case the tree is unbalanced. We might use the provided mutable tree implementation since we don't incur in the cost associated with keeping the tree balanced as we're not inserting or removing intervals after construction. This might also have the benefit of exploiting an existing XS implementation.


Have you added/modified unit tests to test the changes?


If so, do the tests pass/fail?


Have you run the entire test suite and no regression was detected?

Yes. It fails locally but on just one unrelated test (sliceVariation.t) which is due the MySQL version I have (5.7) which is currently incompatible with the Variation API. The very same fail occurs also on master.

Merge request reports