error report on estimating the heritability and genetic correlation

179 views
Skip to first unread message

Tong Gong

unread,
Jul 28, 2016, 11:17:06 AM7/28/16
to ldsc_users
Hi, 

I am quite new to LDSC and currently experience with an error while running the tutorial codes to estimate the heritability and genetic correlation. Could someone take a look at the log and let me know what the problem and possible solution could be?

I have successfully got the anaconda and python 2.7 under my working server. By following each step of the tutorial (https://github.com/bulik/ldsc/wiki/Heritability-and-Genetic-Correlation), I was able to download summary statistics data from pgc website etc. and munge the data. However, the codes for LD score regression and heritabiliy did not go through after reading the SNPs data (see below for the log file). 

*********************************************************************
* LD Score Regression (LDSC)
* Version 1.0.0
* (C) 2014-2015 Brendan Bulik-Sullivan and Hilary Finucane
* Broad Institute of MIT and Harvard / MIT Department of Mathematics
* GNU General Public License v3
*********************************************************************
Call: 
./ldsc.py \
--ref-ld-chr eur_w_ld_chr/ \
--out scz_bip \
--rg scz.sumstats.gz,bip.sumstats.gz \
--w-ld-chr eur_w_ld_chr/ 

Beginning analysis at Thu Jul 28 16:59:32 2016
Reading summary statistics from scz.sumstats.gz ...
Read summary statistics for 844500 SNPs.
Reading reference panel LD Score from eur_w_ld_chr/[1-22] ...
Traceback (most recent call last):
  File "./ldsc.py", line 626, in <module>
    sumstats.estimate_rg(args, log)
  File "/home/tongon/ldsc/ldscore/sumstats.py", line 330, in estimate_rg
    alleles=True, dropna=True)
  File "/home/tongon/ldsc/ldscore/sumstats.py", line 237, in _read_ld_sumstats
    ref_ld = _read_ref_ld(args, log)
  File "/home/tongon/ldsc/ldscore/sumstats.py", line 81, in _read_ref_ld
    'reference panel LD Score', ps.ldscore_fromlist)
  File "/home/tongon/ldsc/ldscore/sumstats.py", line 151, in _read_chr_split_files
    out = parsefunc(_splitp(chr_arg), _N_CHR, **kwargs)
  File "/home/tongon/ldsc/ldscore/parse.py", line 93, in ldscore_fromlist
    y = ldscore(fh, num)
  File "/home/tongon/ldsc/ldscore/parse.py", line 145, in ldscore
    x = x.sort_values(by=['CHR', 'BP']) # SEs will be wrong unless sorted
  File "/usr/local/anaconda/lib/python2.7/site-packages/pandas/core/generic.py", line 2150, in __getattr__
    (type(self).__name__, name))
AttributeError: 'DataFrame' object has no attribute 'sort_values'

Analysis finished at Thu Jul 28 16:59:38 2016
Total time elapsed: 6.16s

Does anyone know what the problem could have been? Many thanks in advance.

Best regards,
Tong 

Tong Gong | PhD 

Department of Medical Epidemiology and Biostatistics | Nobels väg 12A

Karolinska Institutet | 17 177 Stockholm

tong...@ki.se | +46 70 032 08 47 | ki.se


Raymond Walters

unread,
Jul 28, 2016, 11:25:08 AM7/28/16
to Tong Gong, ldsc_users
Hi Tong,
This error comes from having a older version of pandas. I believe the current requirement is version 0.17 or higher. Probably easiest to resolve by updating Anaconda (any Anaconda version 2.4.0 or later should work).
Cheers,
Raymond


--
You received this message because you are subscribed to the Google Groups "ldsc_users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ldsc_users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ldsc_users/a4727e1d-1642-4aeb-bd03-6104c09215ae%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Tong Gong

unread,
Jul 28, 2016, 11:38:56 AM7/28/16
to ldsc_users, tong.be...@gmail.com
Hi Raymond, 

Thanks very much for the quick check. I will update the Anaconda then.

Best, 
Tong
Reply all
Reply to author
Forward
0 new messages