WansonChoi/CookHLA

MakeGeneticMap with FATAL ERROR Marker # is duplicated

Closed this issue · 6 comments

@WansonChoi
Hi ,when i try to use CookHLA on a reference panel build by myself, MakeGeneticMap scripts will go wrong with FATAL ERROR Marker AA_C_-18_31347808_Rx is duplicated.
i check the .markers file it include marks :
AA_C_-18_31347808_R 31347808 P A
AA_C_-18_31347808_x 31347808 P A
AA_C_-18_31347808_Q 31347808 P A
AA_C_-18_31347808_X 31347808 P A
AA_C_-18_31347808_Rx 31347808 P A
AA_C_-18_31347808_RQ 31347808 P A
AA_C_-18_31347808_RX 31347808 P A
it may be caused by "AA_C_-18_31347808_Rx 31347808 P A" and "AA_C_-18_31347808_RX 31347808 P A"
because it seem like Rx/RX make this error.
And some times error like this "Error: Duplicate ID 'chr6_31529929_C_T'. "
Do u have any suggestion?

@masen0407

Hi, Thank you for your interest in CookHLA.

I guess your expectation is right. I've experienced a very similar error before because of mach's case-insensitive manner.

Can you try removing the marker "AA_C_-18_31347808_X" and its related markers(ex. "AA_C_-18_31347808_RX") in your reference panel?

Not only the amino acid residue 'X' is somewhat rare but also genetic distance information of amino acid markers are not critical for HLA imputation.

@WansonChoi
Thank you for your reply.
Can you give some advice on removing the marker "AA_C_-18_31347808_X" and its related markers(ex. "AA_C_-18_31347808_RX") in my reference panel?
it will be some other duplicated marks and i use cat |grep -v "##" to remove from many files such as (*.{FRQ.frq,bgl.phased,markers},and i try to use ' plink --bfile *.{bed,bim,fam} --export vcf --out new' and then use cat |grep -v "##" to remove marks and plink to change vcf to *bed,bim,fam )
But when i use new file ,Mach go wrong with
"FATAL ERROR -
Read ZERO reference haplotypes from test.subset.GCchange.haps"

So how to remove duplicated marks from reference panel?

@masen0407

Could you consider sending your reference panel with duplicated markers to me so that I can try to fix them myself? Maybe this way would be faster.

@WansonChoi
i send my reference panel to your gamil.hope there is some scripts or tools to solver this bug because others day if i try to build some other reference panel it may come again.

@masen0407

I sent the fixed reference panel by email on December 21, 2021. Did you get it well?

@WansonChoi
I have received your email. Sorry for the late reply. The problem has been solved, thank you very much