metagentools / MetaCoAG

🚦🧬 Binning Metagenomic Contigs via Composition, Coverage and Assembly Graphs
https://metacoag.readthedocs.io/en/stable/
GNU General Public License v3.0
57 stars 5 forks source link

KeyError: 'Contig' #32

Closed htaohan closed 2 months ago

htaohan commented 1 year ago

metacoag --assembler megahit --graph final.contigs.gfa --contigs final.contigs.fa --abundance abundance.tsv --output /xx/short_real_result/Metacoag

Traceback (most recent call last): File "/xx/tools/MetaCoAG-develop/metacoag", line 1066, in main() File "/xx/tools/MetaCoAG-develop/metacoag", line 279, in main ) = feature_utils.get_cov_len_megahit( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/xx/tools/MetaCoAG-develop/metacoag_utils/feature_utils.py", line 194, in get_cov_len_megahit contig_num = contig_names_rev[graph_to_contig_map_rev[strings[0]]]


KeyError: 'Contig'

abundance file header:
![image](https://user-images.githubusercontent.com/49517797/235825364-a02a5ca0-b7e8-4eb1-bf70-a5371f822788.png)

I am sorry to bother you. I follow the pipeline but ran into problems, how can i fix it?
Vini2 commented 1 year ago

Hi @masterhan666,

Just remove the first line (starting with Contig final.contigs.fa/...) of the abundance file and try running again. MetaCoAG expects the abundance file without the header row.

Let me know how it goes.

Vini2 commented 2 months ago

Closing issue due to inactivity. Please re-open if needed.