chhylp123 / hifiasm

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

Hifi asm using hifi long reads of both parents and child #75

Closed Skorn33 closed 3 years ago

Skorn33 commented 3 years ago

Hi there, How can I use hifi asm to do a haplotype assembly using PacBio hifi long reads for the child and both parents? It's not clear to me what would happen if the parents files are long reads rather than short reads as mentionned in the user guide.

Thanks for your help !

chhylp123 commented 3 years ago

If you just want to get child assembly, I think it's fine to use current pipeline. Do you also want to get parental assembly?

shilpagarg commented 3 years ago

You may also wanna check out this paper: https://doi.org/10.1093/bioinformatics/btz942 that partitions reads for each individual in a trio in an integrative graph space. I believe that this method first introduces the idea of joint graph binning and local phasing for trios. With slight adjustments, this method could be helpful to produce phased sequences for all three individuals. Hope this helps!

lh3 commented 3 years ago

@Skorn33 Elaborate on @chhylp123's answer: you can count k-mers from parental reads with yak and run hifiasm trio binning the normal way (see Getting Started in README). This procedure works for both short and long parental reads. In theory we should be able to get better assembly when we have parental long reads but hifiasm doesn't take advantage of that for now.

elcortegano commented 2 years ago

Wanted to ask in relation to this issue and @chhylp123 's question, how should be generate the parental assemblies. Should it be trio-bin mode for the offspring and regular mode for parents?

I am also wondering what the recommendation would be in a scenario with highly inbred, mutation accumulation lines. Could founders, several generations away from a set of descendants, be used as parents during assembly? Are there benefits of using trio-bin mode in such a scenario with high homozygosity? Thanks!

chhylp123 commented 2 years ago

I guess you are trying to use genetic maps for phasing? Yes, hifiasm can support that by the options -3 and -4. Alternatively, you can also use the Hi-C phasing module of hifiasm.