Skip to content

Feature/null ox analysis

Marek Szuba requested to merge feature/null_ox_analysis into master

Created by: magaliruffier

Requirements

  • 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

Description

Using one or more sentences, describe in detail the proposed changes. Analysis_id in the object_xref table can be null and that should be the default. The API has been updated to not set it to 0 by default and the unique key does not have analysis_id any more as null fields are not good for checking uniqueness

Use case

Describe the problem. Please provide an example representing the motivation behind the need for having these changes in place. The schema was changed to allow null analyses, because not all object_xref have an analysis. However the API was still defaulting analysis_id to 0 if none was provided. This is not only ugly but also overwrites any NULL analysis that was intended.

Benefits

If applicable, describe the advantages the changes will have. We will not have object_xref entries with analysis_id 0 any more.

Possible Drawbacks

If applicable, describe any possible undesirable consequence of the changes. Removing the analysis_id from the unique key constraint means that it is not possible for two separate analyses to make the same inference on an object_xref. Currently, there are three main pipelines creating object_xref entries, these are the xref pipeline, the projection pipeline and the protein annotation pipeline. All three pipelines work on xrefs from non-overlapping sources, so we should not for example have the xref pipeline add object_xref mappings for xrefs of source Interpro.

Testing

Have you added/modified unit tests to test the changes? Added a test to check for storage of object_xref without an analysis. Another change was required on the gene.t test, because the wildcard test was failing on SQLlite. I am not sure if this is directly related to this change or simply an update to SQLlite. This particular test is now skipped for SQLlite drivers.

If so, do the tests pass/fail? The test correctly stores an object_xref without an analysis as a NULL analysis_id. Prior to the API change, it would store it with an analysis_id 0.

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

Merge request reports