rpetit3 / dragonflye

:dragon: :fly: Assemble bacterial isolate genomes from Nanopore reads
GNU General Public License v3.0
117 stars 10 forks source link

Polypolish error #29

Closed ayoraind closed 6 months ago

ayoraind commented 7 months ago

Hi @rpetit3,

Thanks for your excellent tool. I ran dragonflye (v1.1.2) with the intent of assembling long reads and polishing with short reads. However, I encountered an error when the pipeline got to the polypolish step.

[dragonflye] Polishing with Polypolish
[dragonflye] Running: polypolish flye/polish/racon/1/consensus.fasta flye/polish/short_reads/polypolish/1/polypolish_R1-1.sam flye/polish/short_reads/polypolish/1/polypolish-R2-1.sam > flye/polish/short_reads/polypolish/1/polypolish-1.fasta | sed 's/^/[short read polishing - polypolish (1 of 1)] /' | tee -a dragonflye.logerror: unrecognized subcommand 'flye/polish/racon/1/consensus.fasta'
Usage: polypolish <COMMAND>

For more information, try '--help'.

The command I ran is

dragonflye --reads /MIGE/01_DATA/01_FASTQ/15059.fastq.gz --R1 /MIGE/01_DATA/01_FASTQ/15059_1.fastq.gz --R2 /MIGE/01_DATA/01_FASTQ/15059_2.fastq.gz --prefix 15059 --outdir dragonflye_direct --force

I thought this was due to the dragonflye version that I used. However, the current version (v1.2.0) isn't installable using conda (I tried, but I encountered an error).

The error message gives the impression that polypolish requires a sub-command (e.g., polypolish filter or polypolish polish), which is currently missing from the dragonflye pipeline.

I look forward to hearing back from you.

ayoraind commented 7 months ago

I see from this section (https://github.com/rpetit3/dragonflye/blob/main/bin/dragonflye#L416) that the current version of dragonflye has the correct Polypolish sub-command. So, I edited that section of the dragonflye script. Everything now works correctly. I guess the dragonflye version from nfcore (https://github.com/nf-core/modules/blob/master/modules/nf-core/dragonflye/environment.yml) needs to be updated accordingly.

rpetit3 commented 7 months ago

Hi @ayoraind

Thank you for letting me know about this, and I'm glad you found a solution.

I'm curious what error v1.2.0 was giving you on the install. I wonder if I need to make a fix on the recipe on bioconda

Thanks again! Robert

ayoraind commented 7 months ago

Hi @rpetit3,

I am not entirely sure what to infer from the error message on dragonflye v1.2.0 installation trial. I show you the exact error message below:

Failed to create Conda environment  command: conda env create --prefix /MIGE/01_DATA/07_TOOLS_AND_SOFTWARE/nextflow_pipelines/genome_assembly/bacass_local/work/conda/dragonflye-d3b17908bb97f659610e7f564f13c8d5 --file /MIGE/01_DATA/07_TOOLS_AND_SOFTWARE/nextflow_pipelines/genome_assembly/bacass_local/conda_environments/dragonflye.yml  status : 143  message:    Retrieving notices: ...working... done    Collecting package metadata (repodata.json): ...working... WARNING conda.models.version:get_matcher(544): Using .* with relational operator is superfluous and deprecated and will be removed in a future version of conda. Your spec was 1.7.1.*, but conda is ignoring the .* and treating it as 1.7.1    WARNING conda.models.version:get_matcher(544): Using .* with relational operator is superfluous and deprecated and will be removed in a future version of conda. Your spec was 1.6.0.*, but conda is ignoring the .* and treating it as 1.6.0    WARNING conda.models.version:get_matcher(544): Using .* with relational operator is superfluous and deprecated and will be removed in a future version of conda. Your spec was 1.9.0.*, but conda is ignoring the .* and treating it as 1.9.0    WARNING conda.models.version:get_matcher(544): Using .* with relational operator is superfluous and deprecated and will be removed in a future version of conda. Your spec was 1.8.0.*, but conda is ignoring the .* and treating it as 1.8.0    done    Solving environment: ...working... done

    ==> WARNING: A newer version of conda exists. <==      current version: 22.11.1      latest version: 24.3.0
    Please update conda by running
        $ conda update -n base -c conda-forge conda
    Or to minimize the number of packages updated during conda update use
         conda install conda=24.3.0

    Downloading and Extracting Packages
    pyyaml-6.0.1         | 167 KB    |            |   0%

On the other hand, I was able to conda install the previous version (dragonflye v1.1.2) without any issue.

rpetit3 commented 7 months ago

Hi @ayoraind

Looks like it might be a conda issue. I'm able to solve the environment using conda version 24.3.0, but not on version 23.7.3.

I think its related to conda 24 using libmamba, so in your case if its possible to upgrade or use mamba I think you'll be able to use v1.2.0.

Cheers, Robert

ayoraind commented 7 months ago

Hi @rpetit3,

Many thanks. I updated my conda version as you suggested and re-ran dragonflye (v1.2.0). Everything works perfectly.

ayoraind commented 7 months ago

Just a quick note on the FAQs

Can I assemble more than one genome at a time?

If you would like to assemble more than one genome using Dragonflye, I would recommend you do this with [Bactopia](https://bactopia.github.io/). Bactopia will allow you to process a single genome or thousands, and it also includes many other bacterial genome analyses. If you don't want to use Bactopia, I suggest you see the next question!"

You could also include a note in the above statement about the bacass Nextflow pipeline (https://github.com/nf-core/bacass), which uses Dragonflye (or other select assemblers) to assemble more than one genome.

Thanks once again for your excellent pipeline.

rpetit3 commented 6 months ago

Ok I added mention of bacass is the alternatives.

Going to go ahead and close this, feel free to reopen