Closed jerome-f closed 3 years ago
Hi Jerome,
This is the intended behavior. indels cannot be flipped like regular SNPs, because the flip implies a different meaning. Specifically, T->TGTG is an insertion, TGTG->T is a deletion. If we allow for flips, we cannot distinguish between them. For example, if the reference has TGTG and you see a variant T->TGTG in your sumstats, and you allow for flips in the allele order, it could mean two things:
You cannot distinguish between these two options, unless the order of the alleles is preserved between the sumstats and the reference file.
Cheers,
Omer
Got it. Thanks for the clarification Omer. I appreciate it.
Best Jerome
On Sun, Mar 14, 2021 at 1:39 AM Omer Weissbrod @.***> wrote:
Hi Jerome,
This is the intended behavior. indels cannot be flipped like regular SNPs, because the flip implies a different meaning. Specifically, T->TGTG is an insertion, TGTG->T is a deletion. If we allow for flips, we cannot distinguish between them. For example, if the reference has TGTG and you see a variant T->TGTG in your sumstats, and you allow for flips in the allele order, it could mean two things:
- An individual has TGTGGTG in that locus
- An individual has T in that locus
You cannot distinguish between these two options, unless the order of the alleles is preserved between the sumstats and the reference file.
Cheers,
Omer
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/omerwe/polyfun/issues/41#issuecomment-798877202, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHBV7KX5N7TXYNUG6O2TNJLTDR76HANCNFSM4ZEYAUUQ .
-- Best Jerome
Hi Omer,
There is this code block in the _polyfunutils.py that checks for indels.
the logic here creates new snpid index which in the case of indels fails when the those indels are flipped in the summary stats compared to the LD panel. example below:
this ends up throwing a warning X variants with sumstats were not found in the LD file and will be omitted I am not sure if this is the intended behavior or a bug. If i comment out the is_indel in _polyfunutils.py then the finemapper.py identifies the flipped snps between the LD panel and the summary stats that are indels. Any help here is appreciated.
Best Jerome