rkimoakbioinformatics / oakvar

Genomic variant analysis platform
Other
32 stars 8 forks source link

[Feature] hot reload #26

Open antonkulaga opened 2 years ago

antonkulaga commented 2 years ago

Development of oakvar modules is slow because each time you introduce a change you have to update module and restart oakvar. It looks simple but when you do it many times a day to catch bugs it eats huge ammount of time!

It would be great to have a hot-reload feature in oakvar that you can switch on when you do development. It will mean that when you update your module oakvar will reload it and you will not have to manually restart gui.

rkimoakbioinformatics commented 2 years ago

Which type of module are you developing? Annotator or webviewerwidget? Annotators are best developed with OakVar CLI and webvierwidgets are updated on the browser by reloading. What do you do in a cycle of your module development?

antonkulaga commented 2 years ago

The problem is that our annotator depends on several others (primarily DBSNP as it provides rsid to us) There are no docs explaining how to run our module with dependencies from the command line, otherwise we would do as you suggest. Also (probably worth opening another issue) maybe you can provide debugging support for annotator or explain how to configure it if it is already there?

rkimoakbioinformatics commented 2 years ago

@antonkulaga A quick way is below.

ov run input.vcf -a dbsnp xxx ... --endat annotator

This will create input.vcf.dbsnp.var, input.vcf.xxx.var, etc as well as input.vcf.crx which will be used by your custom module. Then,

ov run input.vcf -a custom_module --endat annotator

This will run your custom module with secondary input enabled. The pipeline will stop after running your module, leaving input.vcf.custom_module.var intact. You can examine this file to see if everything is good. If not, just delete input.vcf.custom_module.var, edit the module's code, and run the command again. If input.vcf.custom_module.var is not deleted, the module will be skipped. --endat annotator is to save time by not running anything after your module. If this is omitted, by default ov run will run until postaggregators (or reporters if -t option is given) and delete all intermediate step files. To prevent this, --temp-files option can be given to ov run.