rkimoakbioinformatics / oakvar

Genomic variant analysis platform
Other
32 stars 8 forks source link

[BUG] no dependency control for reporters #33

Closed antonkulaga closed 1 year ago

antonkulaga commented 2 years ago

Reporters often depend on annotators (at least it is the case of our https://github.com/antonkulaga/longevity-map reporter) at the same time, oakvar does not check if dependencies are met when providing reporters choice to the easer. So far, the user can choose reporters when genome was not annotated with some of the annotator's reporter needs and this will lead to uncontrollable errors that scare users. We are trying to account for this in our module now. However, I believe it is a job of OakVar to control it.

rkimoakbioinformatics commented 2 years ago

@antonkulaga Yes, it is OakVar's job. In the yml file of your module, you can add

requires:
- module_1
- module_2
...

Then, ov module install yourmodule will install module_1, module_2, etc. automatically. Now, OakVar v2.5.47 does this with installation with URLs as well. You can test this with

ov module install https://github.com/rkimoakbioinformatics/oakvar_test/tree/main/testreporter

This will install testreporter module which has biogrid module as requirement, which will be installed as well unless it is already in your system.

antonkulaga commented 2 years ago

The problem is not about installation. Even if both longevity annotaor and longevity reporter that depends on it are installed, the user still has the option to annotate the genome without selecting longevity annotator and then choose longevity report generation that will obviously crash as longevity annotator was not applied before calling the report

rkimoakbioinformatics commented 2 years ago

@antonkulaga Ok, in that case, I have released OakVar v2.5.48. In your report module's yml file, you can put something like,

mandatory_columns:
- base__uid
- clinvar__sig
...

When you do ov run -t or ov report -t, if these columns are missing, the reporter will not run.

antonkulaga commented 2 years ago

For me what matters is gui side because I want to let users try it. So, users should understand that if they want longevity report they also need longevity annotator and if they forgot to annotate with longevity annotator the report should not be enabled or should give warning

rkimoakbioinformatics commented 1 year ago

@antonkulaga That makes sense and it'll be included in the next release.

antonkulaga commented 1 year ago

It seems to work fine now, closing