Closed cmlakhan closed 3 years ago
Hi Chirag,
Thanks for the bug report. Can you please prepare a small (minimal) use example that demonstrates the problem? If you can do this and send to oweissbrod@hsph.harvard.edu, this will be a great help.
Best,
Omer
Sure, will send you an email today.
Hi Chirag,
My apologies for the delay in getting back to you.
I looked into the errors, and found that there were differences in the order of the alleles of multi-allelic SNPs between the two files. For example, for SNP rs62639980 in chr1, the first pair of alleles in the BaselineLD files is A:G, and the second is C:G. However, the order is reversed in your files. I know that this is a silly mistake, but unfortunately the code requires the exact same order of SNPs, including the identities of their alleles.
Incidentally, the code had another problem where the error message wasn't communicated clearly. I fixed this bug, so hopefully the error message will be clearer in the future.
I hope this answers your question, please let me know if not!
Best,
Omer
I am trying to run the polyfun --compute-h2-L2 command using your baseline UKB annotation and a set of annotations I have created myself. I used the SNPs from your baseline annotation to create my own annotation. Initially, I was getting an error because for chromosomes 6, 8, and 11 there seemed to be issues with the calculation of the LD score based on the annotations. While it created the ldscore files the log files showed these errors below:
The result was the ldscore files for chromosomes 6, 8, and 11 had fewer SNPs than the annotation. I subsequently fixed this by reprocessing my 3 ldscore files to include all of the SNPs from your baseline ldscore files for chromosomes 6, 8, and 11. This results in the ldscore files from your baseline annotation and my new annotation to have the same number of SNPs. However, I am still getting an error. From my debugging it seems that I am getting an error when the
ldscore_fromlist
function in the 'parse.py' file is being called. The error seems to occur at the step where it is trying to append the second annotation to the baseline annotation. The error seems to occur at this lineif (not series_eq(y.SNP, ldscore_array[0].SNP)) or (not series_eq(y.index, ldscore_array[0].index)):
The error I get is the following:
which is due to
series_eq(y.SNP, ldscore_array[0].SNP)
It is unclear why this might be the case. When I look at y.SNP it looks like this
and when I look at ldscore_array[0].SNP it looks like this
I am curious if you know why this might be the case? If it helps I can provide you the annotation and the summary statistics I used to run my analysis.