Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 fix searching result on latest version dependency analysis #64

Merged
merged 1 commit into from
Aug 6, 2024

Conversation

juanesarango
Copy link
Contributor

@juanesarango juanesarango commented Aug 6, 2024

Running analyses with dependencies rely on querying results from the proper application.
There's some cases where several dependencies are available, and it's failing to bring the latest version.

i.e. This is a real use case example:

To run our app AUTOTATOR_INDELS (v1.0.0) we rely on ANNOT_INDELS as a dependency.

class AutotatorIndelsGRCh37(Autotator):

    NAME = "AUTOTATOR_INDELS"
    SPECIES = "HUMAN"
    ASSEMBLY = "GRCh37"

    dependencies_results = [
        {
            "app_name": "ANNOT_INDELS",
            "app_version": "latest",
            "result": "all_coding_tsv",
            "name": "annot_tsv",
        },
    ]
    ...

But some old samples may have more than 1 version of this app. In this case, the Experiment E-H-112886-T1-1-D1-1 has 6 ANNOT_INDELS ran matched against 2 different normals, and has version v1.0.0, v2.0.0 and v3.0.0 for each.

Screenshot 2024-08-06 at 2 05 42 PM

Before:
In this case we want the get_dependency_results() method to query the latest analysis. And when running it, it's checking the v1.0.0 not the v3.0.0 that is the latest one.

Screenshot 2024-08-06 at 2 34 36 PM

After:
After this fix, we don't check results for each potential result of the list, but first I create a candidates list, sort it by application pk, and grab the higher one (latest version). After this the results assertion can be done.

Screenshot 2024-08-06 at 2 42 45 PM

  • 🐛   Bug fix
  • 🚀   New feature
  • 🔧   Code refactor
  • ⚠️   Breaking change that would cause existing functionality to change
  • 📘   I have updated the documentation accordingly
  • ✅   I have added tests to cover my changes

Copy link

codecov bot commented Aug 6, 2024

Codecov Report

Attention: Patch coverage is 83.33333% with 1 line in your changes missing coverage. Please review.

Project coverage is 95.14%. Comparing base (5507962) to head (a95b610).

Files Patch % Lines
isabl_cli/utils.py 83.33% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master      #64   +/-   ##
=======================================
  Coverage   95.13%   95.14%           
=======================================
  Files          19       19           
  Lines        2365     2368    +3     
=======================================
+ Hits         2250     2253    +3     
  Misses        115      115           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@ddomenico ddomenico left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@juanesarango juanesarango merged commit f13b995 into master Aug 6, 2024
8 of 10 checks passed
@juanesarango juanesarango deleted the run-app-latest-dependency-version branch August 6, 2024 19:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants