chhylp123 / hifiasm

Hifiasm: a haplotype-resolved assembler for accurate Hifi reads
MIT License
530 stars 87 forks source link

Somthing wrong in hifiasm_dev_debug #331

Closed socialhang closed 1 year ago

socialhang commented 1 year ago

hi,@chhylp123

I was using hifiasm_dev_debug to assemble a polyploidy genome, but somthing wrong happened. I used the "-5" parameter to introduce phase information, and the format is the same as that of Potato_C88. But the software only outputs the "r_utg.gfa" file, and no error is reported. Even when I use the "-5" parameter to introduce a file that does not exist in the path, no error is reported. So, what should I do please?

I rerun it and this is output information. image

baozg commented 1 year ago

Hi, @socialhang

Would you mind sharing the input table for hifiasm -5 ? Just a screenshot is enough.

socialhang commented 1 year ago

Hi, @socialhang

Would you mind sharing the input table for hifiasm -5 ? Just a screenshot is enough.

there is "\t" between two columns. image

baozg commented 1 year ago

It looks fine. How many group you have? Would you mind share this information?

socialhang commented 1 year ago

It looks fine. How many group you have? Would you mind share this information?

I have 32 chromosomes, so I have 32 groups. I wouldn't mind to share the file, but it is 300Mb, too large to share. And I don't think the file content is the cause of the problem. hifiasm does not appear to have read this file or even checked to see if it exists in the path.

baozg commented 1 year ago

In my case, hifiasm will produce four haplotype contig fasta and also someone already reported that he can successfully run. You can just put all the unique 32 group name on here first.

socialhang commented 1 year ago

In my case, hifiasm will produce four haplotype contig fasta and also someone already reported that he can successfully run. You can just put all the unique 32 group name on here first.

ok, thanks for your reply. this is the unique group name.

LG1_1 LG1_2 LG1_3 LG1_4 LG2_1 LG2_2 LG2_3 LG2_4 LG3_1 LG3_2 LG3_3 LG3_4 LG4_1 LG4_2 LG4_3 LG4_4 LG5_1 LG5_2 LG5_3 LG5_4 LG6_1 LG6_2 LG6_3 LG6_4 LG7_1 LG7_2 LG7_3 LG7_4 LG8_1 LG8_2 LG8_3 LG8_4

baozg commented 1 year ago

It looks fine. Would you mind sharing all the hifiasm log?

socialhang commented 1 year ago

It looks fine. Would you mind sharing all the hifiasm log?

e.log

This is the log file.

socialhang commented 1 year ago

Hi, @chhylp123

I got some warnings during compiling hifiasm. Does that affect its function?

g++ -c -g -O3 -msse4.2 -mpopcnt -fomit-frame-pointer -Wall CommandLines.cpp -o CommandLines.o g++ -c -g -O3 -msse4.2 -mpopcnt -fomit-frame-pointer -Wall Process_Read.cpp -o Process_Read.o g++ -c -g -O3 -msse4.2 -mpopcnt -fomit-frame-pointer -Wall Assembly.cpp -o Assembly.o g++ -c -g -O3 -msse4.2 -mpopcnt -fomit-frame-pointer -Wall Hash_Table.cpp -o Hash_Table.o g++ -c -g -O3 -msse4.2 -mpopcnt -fomit-frame-pointer -Wall POA.cpp -o POA.o g++ -c -g -O3 -msse4.2 -mpopcnt -fomit-frame-pointer -Wall Correct.cpp -o Correct.o g++ -c -g -O3 -msse4.2 -mpopcnt -fomit-frame-pointer -Wall Levenshtein_distance.cpp -o Levenshtein_distance.o g++ -c -g -O3 -msse4.2 -mpopcnt -fomit-frame-pointer -Wall Overlaps.cpp -o Overlaps.o g++ -c -g -O3 -msse4.2 -mpopcnt -fomit-frame-pointer -Wall Trio.cpp -o Trio.o g++ -c -g -O3 -msse4.2 -mpopcnt -fomit-frame-pointer -Wall kthread.cpp -o kthread.o g++ -c -g -O3 -msse4.2 -mpopcnt -fomit-frame-pointer -Wall Purge_Dups.cpp -o Purge_Dups.o g++ -c -g -O3 -msse4.2 -mpopcnt -fomit-frame-pointer -Wall htab.cpp -o htab.o g++ -c -g -O3 -msse4.2 -mpopcnt -fomit-frame-pointer -Wall hist.cpp -o hist.o g++ -c -g -O3 -msse4.2 -mpopcnt -fomit-frame-pointer -Wall sketch.cpp -o sketch.o g++ -c -g -O3 -msse4.2 -mpopcnt -fomit-frame-pointer -Wall anchor.cpp -o anchor.o g++ -c -g -O3 -msse4.2 -mpopcnt -fomit-frame-pointer -Wall extract.cpp -o extract.o g++ -c -g -O3 -msse4.2 -mpopcnt -fomit-frame-pointer -Wall sys.cpp -o sys.o gcc -c -g -O3 -msse4.2 -mpopcnt -fomit-frame-pointer -Wall ksw2_extz2_sse.c -o ksw2_extz2_sse.o g++ -c -g -O3 -msse4.2 -mpopcnt -fomit-frame-pointer -Wall hic.cpp -o hic.o hic.cpp: In function ‘void phase_bubble(uint64_t, bub_p_t_warp, bubble_type, uint8_t, const ma_ug_t, min_cut_t, hc_links, G_partition)’: hic.cpp:6032:13: warning: ‘uv’ may be used uninitialized in this function [-Wmaybe-uninitialized] if(uv != v) continue; ^ g++ -c -g -O3 -msse4.2 -mpopcnt -fomit-frame-pointer -Wall rcut.cpp -o rcut.o g++ -c -g -O3 -msse4.2 -mpopcnt -fomit-frame-pointer -Wall horder.cpp -o horder.o g++ -c -g -O3 -msse4.2 -mpopcnt -fomit-frame-pointer -Wall tovlp.cpp -o tovlp.o g++ -c -g -O3 -msse4.2 -mpopcnt -fomit-frame-pointer -Wall inter.cpp -o inter.o g++ -c -g -O3 -msse4.2 -mpopcnt -fomit-frame-pointer -Wall kalloc.cpp -o kalloc.o g++ -c -g -O3 -msse4.2 -mpopcnt -fomit-frame-pointer -Wall gfa_ut.cpp -o gfa_ut.o gfa_ut.cpp: In function ‘void asg_arc_cut_length(asg_t, asg64_v, int32_t, float, float, uint32_t, uint32_t, uint32_t, ma_hit_t_alloc, R_to_U, uint32_t)’: gfa_ut.cpp:1073:64: warning: ‘we’ may be used uninitialized in this function [-Wmaybe-uninitialized] if(vl_max && wl_max) assert(ve->v!=vl_max->v||we->v!=wl_max->v); ^ gfa_ut.cpp: In function ‘void asg_arc_cut_inexact(asg_t, ma_hit_t_alloc, asg64_v, int32_t, uint32_t, uint32_t)’: gfa_ut.cpp:766:41: warning: ‘we’ may be used uninitialized in this function [-Wmaybe-uninitialized] ve->del = we->del = 1, ++cnt; ^ gfa_ut.cpp: In function ‘void asg_arc_cut_length(asg_t, asg64_v, int32_t, float, float, uint32_t, uint32_t, uint32_t, ma_hit_t_alloc, R_to_U, uint32_t)’: gfa_ut.cpp:1073:64: warning: ‘we’ may be used uninitialized in this function [-Wmaybe-uninitialized] if(vl_max && wl_max) assert(ve->v!=vl_max->v||we->v!=wl_max->v); ^ gfa_ut.cpp: At global scope: gfa_ut.cpp:4769:13: warning: ‘void worker_integer_postprecess(void, long int, int)’ defined but not used [-Wunused-function] static void worker_integer_postprecess(void data, long i, int tid) // callback for kt_for() ^ g++ -c -g -O3 -msse4.2 -mpopcnt -fomit-frame-pointer -Wall main.cpp -o main.o g++ -g -O3 -msse4.2 -mpopcnt -fomit-frame-pointer -Wall CommandLines.o Process_Read.o Assembly.o Hash_Table.o POA.o Correct.o Levenshtein_distance.o Overlaps.o Trio.o kthread.o Purge_Dups.o htab.o hist.o sketch.o anchor.o extract.o sys.o ksw2_extz2_sse.o hic.o rcut.o horder.o tovlp.o inter.o kalloc.o gfa_ut.o main.o -o hifiasm -lz -lpthread -lm

baozg commented 1 year ago

And would you mind sharing the second run log with command?

socialhang commented 1 year ago

And would you mind sharing the second run log with command?

image

only this.

baozg commented 1 year ago

What's your second run command?

socialhang commented 1 year ago

As same as the first running.

"hifiasm -t 32 -o xy -5 group_reads.txt --n-hap 4 --hom-cov 230 cell_1.fq.filtered.fq.gz cell_2.fq.filtered.fq.gz cell_3.fq.filtered.fq.gz cell_4.fq.filtered.fq.gz"

socialhang commented 1 year ago

Hi, @baozg @chhylp123

I have a new information.

I tested this version hifiasm (0.16.5-r409) with the following code.

wget https://github.com/chhylp123/hifiasm/releases/download/v0.7/chr11-2M.fa.gz ./hifiasm -o test -t4 -f0 chr11-2M.fa.gz 2> test.log

But it only outputs the "r_utg.gfa" file (As shown in figure) .

image

And, this is the log file. test.log

What should I do? Thanks in advance for any help!

baozg commented 1 year ago

I am not sure about the version of hifiasm will affect polyploid graph binning, I will test new branch with our potato data. For your turn, maybe you can choose an early commit? Maybe @chhylp123 can give answer.

socialhang commented 1 year ago

I am not sure about the version of hifiasm will affect polyploid graph binning, I will test new branch with our potato data. For your turn, maybe you can choose an early commit? Maybe @chhylp123 can give answer.

Thanks a lot ! I will try it with early version.

baozg commented 1 year ago

Sorry, I forget I already met with hifiasm dev branch didn't generate utg since one specific commit (for new feauture). I think you could try the commit b640289b19f38388dbeb9b34e78210afeac2eedc for polyploidy graph binning. I will add the commit in the document.

socialhang commented 1 year ago

Sorry, I forget I already met with hifiasm dev branch didn't generate utg since one specific commit (for new feauture). I think you could try the commit b640289b19f38388dbeb9b34e78210afeac2eedc for polyploidy graph binning. I will add the commit in the document.

Thanks a lot. It works well !