Open laurajb opened 7 years ago
Hi Laura, Just from the error message I’d guess that it has something to do with having mismatched variants between your LD scores and the frqfile. From a quick read of that section of the ldsc code it does appear to assume those files are for the same variants. Can you check the variants differ for your annotation that’s failing and whether they match for the annotations that are running successfully? Cheers, Raymond
On Jul 19, 2017, at 5:47 PM, Laura JB notifications@github.com wrote:
Hi, I am trying to run partition heritability with my previously calculated LD scores for a new annotation and I am getting this error message:
Call: ./ldsc.py --h2 file.sumstats --ref-ld-chr ld. --out out --overlap-annot --frqfile-chr FRQ/chr. --w-ld-chr weights_hm3_no_hla/weights.
Reading annot matrix from ld.[1-22] ... ldsc/ldscore/parse.py:120: UserWarning: Boolean Series key will be reindexed to match DataFrame index. df_annot = df_annot[(.95 > df_frq.FRQ) & (df_frq.FRQ > 0.05)] Error parsing .annot file. Traceback (most recent call last): File "/ldsc/ldsc.py", line 644, in sumstats.estimate_h2(args, log) File "/ldsc/ldscore/sumstats.py", line 369, in estimate_h2 overlap_matrix, M_tot = _read_annot(args, log) File "/ldsc/ldscore/sumstats.py", line 96, in _read_annot 'annot matrix', ps.annot, frqfile=args.frqfile_chr) File "/ldsc/ldscore/sumstats.py", line 152, in _read_chr_split_files out = parsefunc(_splitp(chr_arg), _N_CHR, **kwargs) File "/ldsc/ldscore/parse.py", line 197, in annot for i, fh in enumerate(fh_list)] File "/ldsc/ldscore/parse.py", line 120, in annot_parser df_annot = df_annot[(.95 > df_frq.FRQ) & (df_frq.FRQ > 0.05)] File "/usr/lib64/python2.7/site-packages/pandas/core/frame.py", line 2056, in getitem return self._getitem_array(key) File "/usr/lib64/python2.7/site-packages/pandas/core/frame.py", line 2096, in _getitem_array key = check_bool_indexer(self.index, key) File "/usr/lib64/python2.7/site-packages/pandas/core/indexing.py", line 1939, in check_bool_indexer raise IndexingError('Unalignable boolean Series provided as ' IndexingError: Unalignable boolean Series provided as indexer (index of the boolean Series and of the indexed object do not match
I managed to run it for other annotations so I have no idea what could be wrong...
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/bulik/ldsc/issues/85, or mute the thread https://github.com/notifications/unsubscribe-auth/AILEvSDEvU613WEMjf3wVO0HqOce3T6Qks5sPnl4gaJpZM4OdV1h.
Hi Raymond, Thanks a lot for your response, it was actually the frq files that were not matching. All the best, Laura
Hi, I am trying to run partition heritability with my previously calculated LD scores for a new annotation and I am getting this error message:
Call: ./ldsc.py \ --h2 file.sumstats \ --ref-ld-chr ld. \ --out out \ --overlap-annot \ --frqfile-chr FRQ/chr. \ --w-ld-chr weights_hm3_no_hla/weights.
Reading annot matrix from ld.[1-22] ... ldsc/ldscore/parse.py:120: UserWarning: Boolean Series key will be reindexed to match DataFrame index. df_annot = df_annot[(.95 > df_frq.FRQ) & (df_frq.FRQ > 0.05)] Error parsing .annot file. Traceback (most recent call last): File "/ldsc/ldsc.py", line 644, in
sumstats.estimate_h2(args, log)
File "/ldsc/ldscore/sumstats.py", line 369, in estimate_h2
overlap_matrix, M_tot = _read_annot(args, log)
File "/ldsc/ldscore/sumstats.py", line 96, in _read_annot
'annot matrix', ps.annot, frqfile=args.frqfile_chr)
File "/ldsc/ldscore/sumstats.py", line 152, in _read_chr_split_files
out = parsefunc(_splitp(chr_arg), _N_CHR, **kwargs)
File "/ldsc/ldscore/parse.py", line 197, in annot
for i, fh in enumerate(fh_list)]
File "/ldsc/ldscore/parse.py", line 120, in annot_parser
df_annot = df_annot[(.95 > df_frq.FRQ) & (df_frq.FRQ > 0.05)]
File "/usr/lib64/python2.7/site-packages/pandas/core/frame.py", line 2056, in getitem
return self._getitem_array(key)
File "/usr/lib64/python2.7/site-packages/pandas/core/frame.py", line 2096, in _getitem_array
key = check_bool_indexer(self.index, key)
File "/usr/lib64/python2.7/site-packages/pandas/core/indexing.py", line 1939, in check_bool_indexer
raise IndexingError('Unalignable boolean Series provided as '
IndexingError: Unalignable boolean Series provided as indexer (index of the boolean Series and of the indexed object do not match
I managed to run it for other annotations so I have no idea what could be wrong...