You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am running into this issue with the Unicycler assembly step. It has apparently been fixed in 0.5.1, but I am using the 2.4.0dev version of Bacass, which uses Unicycler 0.5.0. Is it possible to update the Unicycler version to 0.5.1 within Bacass?
Command used and terminal output
The issue seems to be triggered by certain fastq files when performing short-read assembly with Unicycler/Spades.
nextflow run nf-core/bacass
-r dev
-profile singularity
--input samplesheet.csv
--outdir bacass
--kmerfinderdb ~/kmerFinder/bacteria/
--ncbi_assembly_metadata ~/kmerFinder/assembly_summary_genbank.txt
--skip_kraken2
--assembly_type short
--assembler unicycler
-resume
-[nf-core/bacass] Pipeline completed with errors-
ERROR ~ Error executing process > 'NFCORE_BACASS:BACASS:UNICYCLER (EC-7350)'
Caused by:
Process NFCORE_BACASS:BACASS:UNICYCLER (EC-7350) terminated with an error exit status (1)
Command output:
Choosing k-mer range for assembly (2024-10-23 02:21:01)
Unicycler chooses a k-mer range for SPAdes based on the length of the input
reads. It uses a wide range of many k-mer sizes to maximise the chance of
finding an ideal assembly.
SPAdes maximum k-mer: 127
Median read length: 151
K-mer range: 27, 53, 71, 87, 99, 111, 119, 127
SPAdes assemblies (2024-10-23 02:21:17)
Unicycler now uses SPAdes to assemble the short reads. It scores the
assembly graph for each k-mer using the number of contigs (fewer is better) and
the number of dead ends (fewer is better). The score function is 1/(c*(d+2)),
where c is the contig count and d is the dead end count.
Determining graph multiplicity (2024-10-23 02:47:53)
Multiplicity is the number of times a sequence occurs in the underlying
sequence. Single-copy contigs (those with a multiplicity of one, occurring only
once in the underlying sequence) are particularly useful.
Determining graph multiplicity (2024-10-23 02:47:53)
Multiplicity is the number of times a sequence occurs in the underlying
sequence. Single-copy contigs (those with a multiplicity of one, occurring only
once in the underlying sequence) are particularly useful.
Traceback (most recent call last):
File "/usr/local/bin/unicycler", line 10, in
sys.exit(main())
^^^^^^
File "/usr/local/lib/python3.12/site-packages/unicycler/unicycler.py", line 82, in main
determine_copy_depth(graph)
File "/usr/local/lib/python3.12/site-packages/unicycler/assembly_graph_copy_depth.py", line 74, in determine_copy_depth
determine_copy_depth_part_2(graph, settings.COPY_PROPAGATION_TOLERANCE, copy_depth_table)
File "/usr/local/lib/python3.12/site-packages/unicycler/assembly_graph_copy_depth.py", line 104, in determine_copy_depth_part_2
determine_copy_depth_part_2(graph, tolerance, copy_depth_table)
File "/usr/local/lib/python3.12/site-packages/unicycler/assembly_graph_copy_depth.py", line 104, in determine_copy_depth_part_2
determine_copy_depth_part_2(graph, tolerance, copy_depth_table)
File "/usr/local/lib/python3.12/site-packages/unicycler/assembly_graph_copy_depth.py", line 104, in determine_copy_depth_part_2
determine_copy_depth_part_2(graph, tolerance, copy_depth_table)
[Previous line repeated 987 more times]
File "/usr/local/lib/python3.12/site-packages/unicycler/assembly_graph_copy_depth.py", line 103, in determine_copy_depth_part_2
if redistribute_copy_depths(graph, tolerance, copy_depth_table):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/unicycler/assembly_graph_copy_depth.py", line 240, in redistribute_copy_depths
arrangements = shuffle_into_bins(copy_depths, bins, targets)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/unicycler/assembly_graph_copy_depth.py", line 459, in shuffle_into_bins
arrangements += shuffle_into_bins(items[1:], bins_copy, targets)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/unicycler/assembly_graph_copy_depth.py", line 459, in shuffle_into_bins
arrangements += shuffle_into_bins(items[1:], bins_copy, targets)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/unicycler/assembly_graph_copy_depth.py", line 459, in shuffle_into_bins
arrangements += shuffle_into_bins(items[1:], bins_copy, targets)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[Previous line repeated 1 more time]
File "/usr/local/lib/python3.12/site-packages/unicycler/assembly_graph_copy_depth.py", line 463, in shuffle_into_bins
elif all(x for x in bins) and
^^^^^^^^^^^^^^^^^
RecursionError: maximum recursion depth exceeded
Relevant files
No response
System information
Nextflow version 24.04.2
HPC
slurm
Singularity
Ubuntu 22.04
Bacass 2.4.0dev
The text was updated successfully, but these errors were encountered:
Sure, I have opened a new issue in the nf-core/modules repository (nf-core/modules#6838). Once the Unicycler version is updated there, the fix will be easily extended to all nf-core pipelines that use Unicycler.
Description of the bug
I am running into this issue with the Unicycler assembly step. It has apparently been fixed in 0.5.1, but I am using the 2.4.0dev version of Bacass, which uses Unicycler 0.5.0. Is it possible to update the Unicycler version to 0.5.1 within Bacass?
Command used and terminal output
The issue seems to be triggered by certain fastq files when performing short-read assembly with Unicycler/Spades.
nextflow run nf-core/bacass
-r dev
-profile singularity
--input samplesheet.csv
--outdir bacass
--kmerfinderdb ~/kmerFinder/bacteria/
--ncbi_assembly_metadata ~/kmerFinder/assembly_summary_genbank.txt
--skip_kraken2
--assembly_type short
--assembler unicycler
-resume
-[nf-core/bacass] Pipeline completed with errors-
ERROR ~ Error executing process > 'NFCORE_BACASS:BACASS:UNICYCLER (EC-7350)'
Caused by:
Process
NFCORE_BACASS:BACASS:UNICYCLER (EC-7350)
terminated with an error exit status (1)Command executed:
unicycler
--threads 12
-1 EC-7350_1.fastp.fastq.gz -2 EC-7350_2.fastp.fastq.gz
--out ./
mv assembly.fasta EC-7350.scaffolds.fa
gzip -n EC-7350.scaffolds.fa
mv assembly.gfa EC-7350.assembly.gfa
gzip -n EC-7350.assembly.gfa
mv unicycler.log EC-7350.unicycler.log
cat <<-END_VERSIONS > versions.yml$(echo $ (unicycler --version 2>&1) | sed 's/^.Unicycler v//; s/ .$//')
"NFCORE_BACASS:BACASS:UNICYCLER":
unicycler:
END_VERSIONS
Command exit status:
1
Command output:
Choosing k-mer range for assembly (2024-10-23 02:21:01)
Unicycler chooses a k-mer range for SPAdes based on the length of the input
reads. It uses a wide range of many k-mer sizes to maximise the chance of
finding an ideal assembly.
SPAdes maximum k-mer: 127
Median read length: 151
K-mer range: 27, 53, 71, 87, 99, 111, 119, 127
SPAdes assemblies (2024-10-23 02:21:17)
Unicycler now uses SPAdes to assemble the short reads. It scores the
assembly graph for each k-mer using the number of contigs (fewer is better) and
the number of dead ends (fewer is better). The score function is 1/(c*(d+2)),
where c is the contig count and d is the dead end count.
spades.py -o spades_assembly -k 27 --threads 12 --isolate -1 EC-7350_1.fastp.fastq.gz -2 EC-7350_2.fastp.fastq.gz -m 1024
spades.py -o spades_assembly -k 27,53 --threads 12 --restart-from k27 -m 1024
spades.py -o spades_assembly -k 27,53,71 --threads 12 --restart-from k53 -m 1024
spades.py -o spades_assembly -k 27,53,71,87 --threads 12 --restart-from k71 -m 1024
spades.py -o spades_assembly -k 27,53,71,87,99 --threads 12 --restart-from k87 -m 1024
spades.py -o spades_assembly -k 27,53,71,87,99,111 --threads 12 --restart-from k99 -m 1024
spades.py -o spades_assembly -k 27,53,71,87,99,111,119 --threads 12 --restart-from k111 -m 1024
spades.py -o spades_assembly -k 27,53,71,87,99,111,119,127 --threads 12 --restart-from k119 -m 1024
K-mer Contigs Dead ends Score
27 11,587 52 1.60e-06
53 11,810 17 4.46e-06
71 9,169 10 9.09e-06
87 7,932 9 1.15e-05 <-best
99 11,685 7 9.51e-06
111 10,147 60 1.59e-06
119 9,552 265 3.92e-07
127 11,974 1,647 5.06e-08
Read depth filter: removed 1775 contigs totalling 1390462 bp
Deleting spades_assembly/
Determining graph multiplicity (2024-10-23 02:47:53)
Multiplicity is the number of times a sequence occurs in the underlying
sequence. Single-copy contigs (those with a multiplicity of one, occurring only
once in the underlying sequence) are particularly useful.
Command error:
71 9,169 10 9.09e-06
87 7,932 9 1.15e-05 <-best
99 11,685 7 9.51e-06
111 10,147 60 1.59e-06
119 9,552 265 3.92e-07
127 11,974 1,647 5.06e-08
Read depth filter: removed 1775 contigs totalling 1390462 bp
Deleting spades_assembly/
Determining graph multiplicity (2024-10-23 02:47:53)
Multiplicity is the number of times a sequence occurs in the underlying
sequence. Single-copy contigs (those with a multiplicity of one, occurring only
once in the underlying sequence) are particularly useful.
Traceback (most recent call last):
File "/usr/local/bin/unicycler", line 10, in
sys.exit(main())
^^^^^^
File "/usr/local/lib/python3.12/site-packages/unicycler/unicycler.py", line 82, in main
determine_copy_depth(graph)
File "/usr/local/lib/python3.12/site-packages/unicycler/assembly_graph_copy_depth.py", line 74, in determine_copy_depth
determine_copy_depth_part_2(graph, settings.COPY_PROPAGATION_TOLERANCE, copy_depth_table)
File "/usr/local/lib/python3.12/site-packages/unicycler/assembly_graph_copy_depth.py", line 104, in determine_copy_depth_part_2
determine_copy_depth_part_2(graph, tolerance, copy_depth_table)
File "/usr/local/lib/python3.12/site-packages/unicycler/assembly_graph_copy_depth.py", line 104, in determine_copy_depth_part_2
determine_copy_depth_part_2(graph, tolerance, copy_depth_table)
File "/usr/local/lib/python3.12/site-packages/unicycler/assembly_graph_copy_depth.py", line 104, in determine_copy_depth_part_2
determine_copy_depth_part_2(graph, tolerance, copy_depth_table)
[Previous line repeated 987 more times]
File "/usr/local/lib/python3.12/site-packages/unicycler/assembly_graph_copy_depth.py", line 103, in determine_copy_depth_part_2
if redistribute_copy_depths(graph, tolerance, copy_depth_table):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/unicycler/assembly_graph_copy_depth.py", line 240, in redistribute_copy_depths
arrangements = shuffle_into_bins(copy_depths, bins, targets)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/unicycler/assembly_graph_copy_depth.py", line 459, in shuffle_into_bins
arrangements += shuffle_into_bins(items[1:], bins_copy, targets)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/unicycler/assembly_graph_copy_depth.py", line 459, in shuffle_into_bins
arrangements += shuffle_into_bins(items[1:], bins_copy, targets)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/unicycler/assembly_graph_copy_depth.py", line 459, in shuffle_into_bins
arrangements += shuffle_into_bins(items[1:], bins_copy, targets)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[Previous line repeated 1 more time]
File "/usr/local/lib/python3.12/site-packages/unicycler/assembly_graph_copy_depth.py", line 463, in shuffle_into_bins
elif all(x for x in bins) and
^^^^^^^^^^^^^^^^^
RecursionError: maximum recursion depth exceeded
Relevant files
No response
System information
Nextflow version 24.04.2
HPC
slurm
Singularity
Ubuntu 22.04
Bacass 2.4.0dev
The text was updated successfully, but these errors were encountered: