smart_merge crashes when x.index is different from y.index #72
Closed
Description
I'm getting the following error when running LDSC:
Call:
./ldsc.py \
--h2 mytrait.csv.gz \
--ref-ld-chr EUR_100K_1M_chr/ \
--out test_h2 \
--w-ld-chr EUR_100K_1M_chr/
Beginning analysis at Mon Feb 27 11:40:42 2017
Reading summary statistics from mytrait.csv.gz ...
Read summary statistics for 1188973 SNPs.
Reading reference panel LD Score from EUR_100K_1M_chr/[1-22] ...
Read reference panel LD Scores for 1188973 SNPs.
Removing partitioned LD Scores with zero variance.
Reading regression weight LD Score from EUR_100K_1M_chr/[1-22] ...
Read regression weight LD Scores for 1188973 SNPs.
Traceback (most recent call last):
File "ldsc.py", line 628, in <module>
sumstats.estimate_h2(args, log)
File "/mnt/c/Users/Oleksandr/Documents/GitHub/ldsc/ldscore/sumstats.py", line 265, in estimate_h2
args, log, args.h2)
File "/mnt/c/Users/Oleksandr/Documents/GitHub/ldsc/ldscore/sumstats.py", line 247, in _read_ld_sumstats
sumstats = _merge_and_log(ref_ld, sumstats, 'reference panel LD', log)
File "/mnt/c/Users/Oleksandr/Documents/GitHub/ldsc/ldscore/sumstats.py", line 230, in _merge_and_log
sumstats = smart_merge(ld, sumstats)
File "/mnt/c/Users/Oleksandr/Documents/GitHub/ldsc/ldscore/sumstats.py", line 69, in smart_merge
if len(x) == len(y) and (x.SNP == y.SNP).all():
File "/usr/local/lib/python2.7/dist-packages/pandas/core/ops.py", line 812, in wrapper
raise ValueError(msg)
ValueError: Can only compare identically-labeled Series objects
I'll submit in a moment a PR that fixed this problem.
Metadata
Assignees
Labels
No labels