brentp / vcfanno

annotate a VCF with other VCFs/BEDs/tabixed files
https://genomebiology.biomedcentral.com/articles/10.1186/s13059-016-0973-5
MIT License
357 stars 55 forks source link

[Typo] JavaScript function? #141

Closed thephoenixofthevoid closed 3 years ago

thephoenixofthevoid commented 3 years ago

It seems like a typo, but having js as an alternative is very interesting.

https://github.com/brentp/vcfanno/blob/9f857a9ad23ac80f76ae23ca06d3c619f08db0e0/vcfanno.go#L60

brentp commented 3 years ago

fixed .thanks. originally, vcfanno used javascript, but that engine was much slower.

thephoenixofthevoid commented 3 years ago

In a quick search I discovered this bindings https://github.com/augustoroman/v8 If it's possible to use these, it must be giving more performance. What do you think?

brentp commented 3 years ago

Hi, it's certainly an option for future projects, but I won't be doing that for vcfanno. By now, any users are dependent on the lua and there's no great reason to change. There's also no guarantee that the overhead of calling into C would be small enough to negate any benefit from the V8 performance.

thephoenixofthevoid commented 3 years ago

Also: https://github.com/rogchap/v8go If it's possible to make executor pluggable, that would be a solution.

thephoenixofthevoid commented 3 years ago

Also, It's very strange that lua code cannot be written inside a config. Would you like a PR with a feature of specifying it inside config?

brentp commented 3 years ago

The lua code can be specified inside of a file. If you're addressing a real problem, I'm happy to consider the issue and brainstorm a solution.

thephoenixofthevoid commented 3 years ago

I would like to have everything except maybe basepath to be specifiable via toml config. I checked a simple solution using triple-" syntax and it worked, but I think it's possible to do it in a more elegant way (consider a single file format of Vue as an example for the idea). Don't know if it falls into the category of real problems, just want to have fewer arguments to pass and files to maintain.