If all contigs are filtered out, for example due to short length, then Metacoag should end gracefully:
2022-07-04 13:49:45,194 - INFO - Welcome to MetaCoAG: Binning Metagenomic Contigs via Composition, Coverage and Assembly Graphs.
2022-07-04 13:49:45,195 - INFO - This version of MetaCoAG makes use of the assembly graph produced by SPAdes which is based on the de Bruijn graph approach.
2022-07-04 13:49:45,195 - INFO - Input arguments:
2022-07-04 13:49:45,195 - INFO - Assembler used: flye
2022-07-04 13:49:45,195 - INFO - Contigs file: contigs.fa.gz
2022-07-04 13:49:45,195 - INFO - Assembly graph file: nano_assembly_graph.gfa
2022-07-04 13:49:45,195 - INFO - Contig paths file: nano_assembly_info.txt
2022-07-04 13:49:45,195 - INFO - Abundance file: assembly_depth_final.tsv
2022-07-04 13:49:45,195 - INFO - Final binning output file: ./
2022-07-04 13:49:45,195 - INFO - Marker file: /MetaCoAG/auxiliary/marker.hmm
2022-07-04 13:49:45,195 - INFO - Minimum length of contigs to consider: 1000
2022-07-04 13:49:45,195 - INFO - Depth to consider for label propagation: 10
2022-07-04 13:49:45,195 - INFO - p_intra: 0.1
2022-07-04 13:49:45,195 - INFO - p_inter: 0.01
2022-07-04 13:49:45,195 - INFO - mg_threshold: 0.5
2022-07-04 13:49:45,195 - INFO - bin_mg_threshold: 0.1
2022-07-04 13:49:45,195 - INFO - min_bin_size: 200000 base pairs
2022-07-04 13:49:45,195 - INFO - d_limit: 20
2022-07-04 13:49:45,195 - INFO - Number of threads: 28
2022-07-04 13:49:45,195 - INFO - MetaCoAG started
2022-07-04 13:49:45,212 - INFO - Total number of contigs available: 121
2022-07-04 13:49:45,219 - INFO - Total number of edges in the assembly graph: 188
2022-07-04 13:49:45,219 - INFO - Total isolated contigs in the assembly graph: 37
2022-07-04 13:49:45,219 - INFO - Obtaining lengths and coverage values of contigs
Traceback (most recent call last):
File "/MetaCoAG/src/metacoag_main.py", line 303, in
abundance_file=abundance_file)
File "/MetaCoAG/src/metacoag_utils/feature_utils.py", line 155, in get_cov_len
n_samples = len(coverages[0])
KeyError: 0
Thank you for developing this tool!
If all contigs are filtered out, for example due to short length, then Metacoag should end gracefully:
2022-07-04 13:49:45,194 - INFO - Welcome to MetaCoAG: Binning Metagenomic Contigs via Composition, Coverage and Assembly Graphs. 2022-07-04 13:49:45,195 - INFO - This version of MetaCoAG makes use of the assembly graph produced by SPAdes which is based on the de Bruijn graph approach. 2022-07-04 13:49:45,195 - INFO - Input arguments: 2022-07-04 13:49:45,195 - INFO - Assembler used: flye 2022-07-04 13:49:45,195 - INFO - Contigs file: contigs.fa.gz 2022-07-04 13:49:45,195 - INFO - Assembly graph file: nano_assembly_graph.gfa 2022-07-04 13:49:45,195 - INFO - Contig paths file: nano_assembly_info.txt 2022-07-04 13:49:45,195 - INFO - Abundance file: assembly_depth_final.tsv 2022-07-04 13:49:45,195 - INFO - Final binning output file: ./ 2022-07-04 13:49:45,195 - INFO - Marker file: /MetaCoAG/auxiliary/marker.hmm 2022-07-04 13:49:45,195 - INFO - Minimum length of contigs to consider: 1000 2022-07-04 13:49:45,195 - INFO - Depth to consider for label propagation: 10 2022-07-04 13:49:45,195 - INFO - p_intra: 0.1 2022-07-04 13:49:45,195 - INFO - p_inter: 0.01 2022-07-04 13:49:45,195 - INFO - mg_threshold: 0.5 2022-07-04 13:49:45,195 - INFO - bin_mg_threshold: 0.1 2022-07-04 13:49:45,195 - INFO - min_bin_size: 200000 base pairs 2022-07-04 13:49:45,195 - INFO - d_limit: 20 2022-07-04 13:49:45,195 - INFO - Number of threads: 28 2022-07-04 13:49:45,195 - INFO - MetaCoAG started 2022-07-04 13:49:45,212 - INFO - Total number of contigs available: 121 2022-07-04 13:49:45,219 - INFO - Total number of edges in the assembly graph: 188 2022-07-04 13:49:45,219 - INFO - Total isolated contigs in the assembly graph: 37 2022-07-04 13:49:45,219 - INFO - Obtaining lengths and coverage values of contigs Traceback (most recent call last): File "/MetaCoAG/src/metacoag_main.py", line 303, in
abundance_file=abundance_file)
File "/MetaCoAG/src/metacoag_utils/feature_utils.py", line 155, in get_cov_len
n_samples = len(coverages[0])
KeyError: 0