gkichaev / PAINTOR_V3.0

Fast, integrative fine mapping with functional data
55 stars 21 forks source link

Error from CalcLD_1KG_VCF.py for SNPs with MAF=0? #25

Open karaesmen opened 6 years ago

karaesmen commented 6 years ago

Hi! I was generating the LD matrix with CalcLD_1KG_VCF.py and I got the following error:

/usr/lib/python2.7/dist-packages/numpy/lib/function_base.py:2558: RuntimeWarning: invalid value encountered in true_divide
c /= stddev[:, None]
/usr/lib/python2.7/dist-packages/numpy/lib/function_base.py:2559: RuntimeWarning: invalid value encountered in true_divide
c /= stddev[None, :]

A Google search suggests this is because when one of the vectors' sd=0 it throws an error when calculating correlation. And I thought it was because I had SNPs with MAF=0 in my reference data.

Is that a correct assumption?

I am not sure how to track that SNP exactly to check for this though. I thought 2558 and 2559 could be the row index of my locus info file? If that's the case my reference panel doesn't seem to have a MAF=0 for those SNPs...

But I did end up getting the .ld output from all of this and it doesn't seem to have any missing values. Should I just ignore the error?