Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KeyError: 'Contig' #32

Open
htaohan opened this issue May 3, 2023 · 1 comment
Open

KeyError: 'Contig' #32

htaohan opened this issue May 3, 2023 · 1 comment
Labels
help wanted Extra attention is needed

Comments

@htaohan
Copy link

htaohan commented May 3, 2023

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

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

@Vini2
Copy link
Collaborator

Vini2 commented May 15, 2023

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 Vini2 added the help wanted Extra attention is needed label May 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants