xfengnefx / hifiasm-meta

hifiasm_meta - de novo metagenome assembler, based on hifiasm, a haplotype-resolved de novo assembler for PacBio Hifi reads.
MIT License
60 stars 8 forks source link

Input file? #27

Open PeymanDerik opened 1 year ago

PeymanDerik commented 1 year ago

Hello

Sorry if I am asking silly questions. I am a beginner and a bit confused with the pipeline. Is there any tutorial showing how to run this workflow? I do not know where should we add our input HiFi FASTA files to run the workflow?! Also it seems all the outputs are graphs (Contig graph, Raw unitig graph, Cleaned unitig graph). Will we get SAMPLE.contigs.fasta files to use in "HiFi-MAG-Pipeline"?

Thanks

xfengnefx commented 1 year ago

input files

Take the readme example: hifiasm_meta -t32 -o asm reads.fq.gz 2>asm.log , you just need to list the file name(s). Note that the files will have to be opened for more than one time, so no pipes, just regular files or symlinks.

output format

For contig sequences, it's in the *.p_ctg.gfa . gfatools has a gfa2fa command. Or you can simply extract the 2nd and 3rd column from the gfa file's S lines, for example: awk '$1=="S" {printf ">%s\n%s\n", $2, $3} ' asm.p_ctg.gfa| pigz -p4 > contigs.fa.gz . Use *.r_utg.gfa for unitigs.

PeymanDerik commented 1 year ago

Hi

I am trying to use hifiasm-meta to assemble my PacBio HiFi reads. I was wondering if there is an option for “co-assembly” of multiple samples in the hifiasm-meta tool. I would appreciate it if you could help me with this.

Thanks,

xfengnefx commented 1 year ago

It has no co-assembly mode that makes use of sample labels.

As for assemble simple pooling of samples, you can try, but I think outcome depends on the data. In a time series cheese dataset, the pooled co-assembly had minor improvements over per time points'. https://github.com/xfengnefx/hifiasm-meta/issues/8 is a pooling of unrelated samples. The co-assembly contigs were likely to be sample-specific. I don't remember the total yield being better than the sum of individual assemblies.