MetaCoAG icon indicating copy to clipboard operation
MetaCoAG copied to clipboard

question of megahit

Open yuyuyu-fy opened this issue 3 years ago • 6 comments

Hello! Sorry to bother you again. I ran several experiments with metacoag. There is no problem with running in spades mode, but this error is always reported when running several samples in megahit mode. I suspect it is the problem of name and ID. how can we solve it? image

yuyuyu-fy avatar Jun 11 '22 07:06 yuyuyu-fy

Hello @yuyuyu-fy,

Can you let me know what files you use as input and their format (copy-paste the output from head <file>), especially the format of the abundance file?

Thank you!

Vini2 avatar Jun 13 '22 23:06 Vini2

command is image abundance file image contigs file image gfa file image

yuyuyu-fy avatar Jun 15 '22 15:06 yuyuyu-fy

Hello @yuyuyu-fy,

I'm extremely sorry for the late reply. Can you share the files you are using so I can run a test?

Thank you!

Vini2 avatar Jul 18 '22 04:07 Vini2

Hello @Vini2,

I'm also trying to run MetaCoAG for a megahit assembly and getting the error described above.

This is the code I used to produce the input files megahit_core contig2fastg k-value path/to/contigs > path/to/fastg_out (also used megahit_toolkit)

gfastats path/to/fastg_out -o gfa > path/to/gfa_out

coverm contig -1 path/to/read1 -2 path/to/read2 -r path/to/contigs -o path/to/abundance -t 8 && sed -i '1d' path/to/abundance

MetaCoAG code: metacoag --assembler megahit --graph path/to/gfa_out --contigs path/to/contigs --abundance path/to/abundance --output path/to/binning/

I've tried to modify the contigs.fa file:

  1. rename fasta header & remove the k-value (see above 'k141_' )
  2. sort fasta file by renamed ID

I've also tried to run it with the data you used in your paper (accession numbers ERR970400, ERR970477) Always got the same error..

I suspect the problem is that there is no connection between the contigs header and the fastg header. Could you help me, I don't know what else to try?

Thanks!

josefawelling avatar May 31 '23 12:05 josefawelling

Hi @josefawelling,

Thanks for your interest in MetaCoAG.

Can you show me the first few lines of your --graph file and --contigs file?

Also, can you try running metacoag with the --assembler parameter as megahitc and see if it works.

Let me know what happens!

Vini2 avatar Jun 01 '23 00:06 Vini2

Hi @Vini2,

thanks for the quick reply! Changing to --assembler megahitc leads to the same key error. Here are the first few lines of the contig & graph files.

contigs graph

josefawelling avatar Jun 01 '23 07:06 josefawelling