wfondrie / mokapot

Fast and flexible semi-supervised learning for peptide detection in Python
https://mokapot.readthedocs.io
Apache License 2.0
41 stars 15 forks source link

[Question] executable(e.g. pyinstaller) #101

Open timosachsenberg opened 1 year ago

timosachsenberg commented 1 year ago

Hi, thanks for the great tool and for making it open source.

Do you know if it is easily possible/has some experience to create executables for different platforms for mokapot?

Best

wfondrie commented 1 year ago

Hi @timosachsenberg 👋 - I'm glad mokapot has been useful. Also, thank you for all of the great open-source work you do too!

We're working on some major upgrades to mokapot currently (see #96 and #100 if curious), so I would want to look into this after we get those in place. I have fairly limited experience with pyinstaller, but @jspaezp might be able to comment how difficult it would be for mokapot.

I don't know if its helpful, but in the meantime we do already build a Docker image as part of our CI/CD: https://github.com/wfondrie/mokapot/pkgs/container/mokapot

jspaezp commented 1 year ago

Hello there!

I think it depends a bit on what the intended use is ... The easiest implementation would be to just have the cli be an executable that can be downloaded instead of installed via pip/pipx/docker (which is not too hard to do...); but I do not see a lot of value in it, since it would be just as hard to use.

On the other hand, having an executable that bundles some form of GUI (I am thinking something like the first release of fragpipe), would entail some more care.

Would you mind elaborating on how you would like to use the executable version?

[Thinking more about it, I can see it being used in the case where you want to run it on a computer, and cannot install either python or docker on it, but I am unsure of how common this is. Having said that in my experience you need admin access to run pyinstaller apps (since you need to authorize the executable), which would further restrict the "surface area" covered by the app]

timosachsenberg commented 1 year ago

I think one main motivation would be to create a drop-in replacement for the percolator executables (mac,linux,windows) e.g. in existing workflows (without having to care about the user being able to install python and all dependencies etc.).

jspaezp commented 1 year ago

@timosachsenberg that sounds like a good enough motivation to be honest! I think I could make a quick "prototype script" if you are willing to build it yourself for a tool you are using (while/if we add it to the regular release artifacts). @wfondrie want to add this to the roadmap of the project? I could make a proof of concept branch in the meantime, while we do the major upgrades to the project.

timosachsenberg commented 1 year ago

sounds great. happy to test it

RalfG commented 11 months ago

May be of interest for this thread: As part of compomics/ms2rescore, Mokapot is also packaged into the executable with a one-click installer. For this we use:

As this works for a package with Mokapot as dependency, I see no issues to use the same approach for Mokapot by itself.

If you have not yet started on this, @jspaezp, I can easily open a PR that implements this for Mokapot.

jspaezp commented 11 months ago

@RalfG Indeed I have not started tackling this, I would be happy to review the PR!