nanoporetech / pod5-file-format

Pod5: a high performance file format for nanopore reads.
https://pod5-file-format.readthedocs.io/
Other
130 stars 18 forks source link

No pod5 conda package #36

Open JannesSP opened 1 year ago

JannesSP commented 1 year ago

Dear pod5 developers,

please consider to create a conda package for pod5. I tried to create a pod5 recipe from the pypi pod5 package myself using grayskull, but it fails:

There is no sdist package on pypi for pod5.

It would be super helpful to create a conda pod5 package, as many scientists work with conda.

Kind regards, Jannes Spangenberg

HalfPhoton commented 1 year ago

Hi @JannesSP ,

We'll look into creating a conda package right away.

In the meantime, are you able to install pod5 into a conda environment via pip?

Kind regards, Rich

JannesSP commented 1 year ago

Hi @HalfPhoton,

Yes for now I am able to install pod5 via pip and it works fine. The problem is, that I want to create a conda package out of some code/software that uses pod5. As it has pod5 as a dependency, it requires a pod5 conda package. Sadly (AFAIK), it is not possible to have pypi packages in conda dependencies.

Kind regards, Jannes Spangenberg

HalfPhoton commented 1 year ago

Ok, we'll get this sorted soon and we'll let you know when it's done.

Kind regards, Rich

JannesSP commented 1 year ago

Hey @HalfPhoton,

How far are you with the conda package? Has anything happened there yet?

Kind Regards, Jannes

HalfPhoton commented 1 year ago

Hi @JannesSP ,

There's been no progress from us sorry. I've had some issues getting conda to build the package. We'll look into picking this back up to make some progress.

JannesSP commented 1 year ago

Hey @HalfPhoton,

during the last couple of days I tried to figure out how to build the conda package for 'lib-pod5'. I noticed, that you can build a conda package from the wheel files. I created a PR with the recipes I used to create the lib-pod5 and pod5 packages. After building the lib-pod5 package, building the pod5 conda package is simple. In the recipes you will find simple tests to check if the conda package was built correctly, like import lib-pod5, import pod5 or pod5 --help. Here real tests can be added and when using conda-build or conda mambabuild these tests will be executed. I also added some comments for you to add tests, otherwise check the documents for conda build.

You can see, the packages can be found in my anaconda channel. I would really recommend to add the recipes to the bioconda channel, where every relavant tool related to biology/bioinformatics can be found (and should be - imo). I already created a PR for lib-pod5 in the bioconda github.

If you have a look at the bioconda recipe, you will notice, that it looks a bit different. Bioconda enforces special requirements for their recipes. The lib-pod5 recipe already passed the checks there. The bioconda pod5 recipe can be added after the lib-pod5 is accepted, which might take a while.

I hope this helps to move forward building conda packages for each upcoming version. Kind Regards, Jannes

cjw85 commented 1 year ago

@JannesSP,

Historically we have used bioconda to distribute some of our software pacakges. However we are moving away from using bioconda as we cannot control the contents of such packages (there are no proper controls on who can merge recipes). If a bioconda package is accepted it will not be supported by Oxford Nanopore Technologies Plc.

JannesSP commented 1 year ago

@cjw85, I understand your problem!

This is just an idea: A way to solve this could be to create an ONT conda account and distribute your conda packages via an ONT conda channel? This way you have control over the recipes and packages and the user can be certain, that the package is officially from ONT (checked, tested and maintained).

Kind Regards, Jannes

cjw85 commented 1 year ago

We do have already our own conda channel :wink:

https://anaconda.org/nanoporetech

JannesSP commented 1 year ago

Ah, I figured. Looking forward to finding a pod5 conda package there. :D

Best, Jannes

mbhall88 commented 10 months ago

We do have already our own conda channel 😉

https://anaconda.org/nanoporetech

@cjw85 Would be great if you could add a recipe for pod5 to it :)

sandeepkasaragod commented 10 months ago

Might be useful to create environment.

name: pod5 channels:

dependencies:

mbhall88 commented 10 months ago

Yes, this is what I am doing at the moment. But as mentioned earlier in this thread there are advantages to having a recipe available for tools that rely on pod5

JannesSP commented 10 months ago

Hey @mbhall88 ,

if you want to, you can get pod5 from my channel: https://anaconda.org/JannesSP/pod5. Its my solution until a more official channel has a recipe/conda package.

Kind regards, Jannes

Macdot3 commented 7 months ago

Hi @JannesSP, thanks for your pod5 conda package, it allowed me to install it on the company PC where I didn't have administrator permissions. However, once installed in my custom environment and imported all the necessary plugins, I encounter this error:

Converting 22 Fast5s:   0%|          | 0/88000 [00:00<?, ?Reads/s]

Can't read data (can't open directory: /scratch/tmp/tmpjccgpwm2/lib)

I can't find any folder with this name, do I need to install something? they are temp files. I hope you can help me. Thank you

HalfPhoton commented 7 months ago

See: https://github.com/nanoporetech/pod5-file-format/issues/110