bacass icon indicating copy to clipboard operation
bacass copied to clipboard

Pilon issue (default_jvm_mem_opts)

Open xlinxlin opened this issue 4 years ago • 8 comments

Hi!

I would like to know is there a way to set default_jvm_mem_opts in Pilon (which is a part of Unicycler) through nextflow run command line? Especially when one uses -profile conda or -profile docker. Or there always be a problem by dealing with large genomes.

xlinxlin avatar Jul 20 '20 07:07 xlinxlin

Currently there is no such option, but we're happy to integrate one - or you could add one yourself and supply this as optional parameter and open a pull request? :-)

apeltzer avatar Jul 20 '20 07:07 apeltzer

Ok this is not as easy as thought - the pilon recipe from bioconda sets this already to a hard value and changing this from within the pipeline isn't easily possible:

https://github.com/rrwick/Unicycler/issues/147

Maybe this is something we should report upstream in bioconda and then consider fixing this afterwards here.

apeltzer avatar Oct 08 '20 17:10 apeltzer

Asked here: https://github.com/bioconda/bioconda-recipes/issues/24749

apeltzer avatar Oct 08 '20 17:10 apeltzer

Should be possible to replace this pilon -Xmx64g

apeltzer avatar Oct 22 '20 11:10 apeltzer

Hi @apeltzer @xlinxlin

A suggested fix (which I had to do): I used conda to install pilon and then hand edited the pilon file with your favorite editor

<path_to>/envs/my-conda_env_name/bin/pilon

# change this line below from
default_jvm_mem_opts = ['-Xms512m', '-Xmx1g']
 
# to 16GB or something bigger depending on what you want
default_jvm_mem_opts = ['-Xms512m', '-Xmx16g']

Probably the same could be done within unicycler?

tamuanand avatar Dec 03 '20 00:12 tamuanand

Hi @tamuanand !

Yes, this is an option in general, but unfortunately not a reproducible one and not one that works with containers (which ship pilon, but don't allow us to modify how unicycler is calling pilon unfortunately. The other fixes proposed here https://github.com/rrwick/Unicycler/issues/212 and here https://github.com/rrwick/Unicycler/issues/147 describe pretty much the same. Changing this simply isn't possible in a container very easily and its actually even a bad practice to do so in terms of reproducibility.

I currently don't really see an easy / straightforward fix without modifying conda recipes, which is a bad thing to do .... one potential solution would be to add an option to unicycler that allows to modify the memory requested for pilon - that would be a.) a good solution and b.) reproducible / clean.

apeltzer avatar Dec 03 '20 07:12 apeltzer

Hi @apeltzer

A slightly related question:

I am trying to build a container using Docker that has pilon, quast, multiqc, spades etc. I am unable to get the container built because of (probably python version conflicts) and incompatibility withh quast.

Any suggestions?

tamuanand avatar Dec 03 '20 21:12 tamuanand

Exactly the reason why we have multiple containers - these tools are inherently using as you said different python versions and are hard to make Them work nicely along each other. Not much you can do about this :-(

apeltzer avatar Dec 03 '20 21:12 apeltzer

Clossing this issue, please feel free to reopen it if needed

Daniel-VM avatar Jun 11 '24 20:06 Daniel-VM