Giter Site home page Giter Site logo

Comments (6)

oceancongliu avatar oceancongliu commented on June 26, 2024 1

Thanks for your generous help and suggestion, i will try to combin with HiPhase and WhatsHap.
I think that a progressive algorithm will help a lot.
I hope HiPhase will be better in the future.

THANKS.

from hiphase.

holtjma avatar holtjma commented on June 26, 2024

Hello,

From user guide instruction, HiPhase follows the same haplotagging convention as WhatsHap,and each mapping is tagged with both a phase set ID (PS) and a haplotype ID (HP). So, what is the relationship of 1 and 2 to their parents? the HP tag "1" represent his paternal resource or the HP tag "2" represent his maternal resource?

HiPhase is a read-backed phaser only right now, so the short answer is that there is no relationship between the HP tag output and the maternal/paternal origin. A separate step would need to ingest the phased VCF as well as the pedigree and assign each haplotype to maternal/paternal origin. Currently, HiPhase does not do that.

The second quenstion: Within a single phase block, all mappings with the same read name will have the same HP tag. Mappings of the same read to different phase blocks (e.g. to different chromosomes) are not guaranteed to have matching HP tags. Can you explain this sentence clearly? Is it possible that HP tag "1" or HP tag "2" has different meanings on different chromosomes?

Yea, so HP "1" or "2" are just arbitrary labels representing the two haplotypes within a single phase block. In HiPhase, this corresponds to the "first" and "second" set of alleles. The meaning of "1" and "2" is only meaningful within a phase block. Once you step outside of the phase block, there is a 50% chance that the phase blocks "flip" relative to each other. This is because there were no spanning reads to connect two consecutive heterozygous variants. To my knowledge, this definition of HP "1" or "2" is fairly standard for read-backed phasing tools.

An example, if you had 3 variants with the following GT fields:

0|1
0|1
1|0

Then, we would expect HP:1 and HP:2 to contain variants correspond to alleles:

HP:1 001
HP:2 110

Let me know if you have follow-up questions or clarifications!

Matt

from hiphase.

oceancongliu avatar oceancongliu commented on June 26, 2024

Hi, Matt,
Thank you for your reply, i have read you answer patiently and I have got the answer I need.

Another question: I have compared this tool with WhatShap. From the instruction of WhatShap, In the resulting VCF file (phased.vcf), haplotype alleles of a child were given as paternal | maternal, does this mean that paternal | maternal only exist a single phase set,same with Hiphase?

Thanks,
Cong.

from hiphase.

holtjma avatar holtjma commented on June 26, 2024

My understanding is that the ordered phasing like that only applies if you specifically provide a pedigree file, like so:
https://whatshap.readthedocs.io/en/latest/guide.html#phasing-pedigrees. I have not tested this mode of WhatsHap, so I can’t comment on the accuracy or compute costs.

If you do not provide a pedigree file, my understanding is the behavior is the same as HiPhase (i.e. there is no association between 1/2 and maternal/paternal).

For your use case, are you wanting to do both read-backed and trio phasing at the same time?

from hiphase.

oceancongliu avatar oceancongliu commented on June 26, 2024

Hi, Matt,
As you mentioned, I tested the Pedigree Phasing model of WhatsHap, offering pedigree file and trio SNV infimations following the instruction (https://link.springer.com/protocol/10.1007/978-1-0716-2819-5_8#Abs1). The haplotypes in the resulting variant file are reported as paternal|maternal in the GT tag. That is, the first allele is the one inherited from the father and the second one is the allele inherited from the mother.

My main goal was to trio phasing the reads of the child, get the methylation information from the paternal and maternal haplotype, try to look for differences. I need to know the association between HP:i:1/2 and maternal/paternal.

If whatshap works smoothly, Can this tool solve my problem? or, do you have any better advice?

THANKS

from hiphase.

holtjma avatar holtjma commented on June 26, 2024

I can't vouch for the accuracy of the pedigree-based phasing of WhatsHap (I've never benchmarked it). However, if I needed that analysis today, it's what I would start with given the current tooling. One possible suggestion is that you could provide the HiPhase results to WhatsHap through this mechanism: https://whatshap.readthedocs.io/en/latest/guide.html#vcfs-as-reads. Again, I have not tested this, so I can't vouch for the accuracy of the result.

Pedigree phasing is a potential improvement we may make to HiPhase at some point, but I don't know if or when that will happen.

from hiphase.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.