Closed explodecomputer closed 5 years ago
In gwas_processing
clump.py
is fine but ldsc.py
has issues in it and I could not get a completed ldsc.txt.log.
Here is the log:
*********************************************************************
* 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 \
--h2 /data/2/data.bcf \
--ref-ld-chr /ref/eur_w_ld_chr/ \
--out /data/2/ldsc.txt \
--snplist /ref/snplist.gz \
--w-ld-chr /ref/eur_w_ld_chr/
Beginning analysis at Sun Feb 10 19:44:50 2019
Reading summary statistics from /data/2/data.bcf ...
and extracting SNPs specified in /ref/snplist.gz ...
Read summary statistics for 1090052 SNPs.
Reading reference panel LD Score from /ref/eur_w_ld_chr/[1-22] ...
Read reference panel LD Scores for 1290028 SNPs.
Removing partitioned LD Scores with zero variance.
Reading regression weight LD Score from /ref/eur_w_ld_chr/[1-22] ...
Read regression weight LD Scores for 1290028 SNPs.
After merging with reference panel LD, 1077077 SNPs remain.
After merging with regression SNP LD, 1077077 SNPs remain.
Traceback (most recent call last):
File "/ldsc/ldsc.py", line 647, in <module>
sumstats.estimate_h2(args, log)
File "/ldsc/ldscore/sumstats.py", line 348, in estimate_h2
chisq = s(sumstats.Z**2)
File "/opt/conda/envs/ldsc/lib/python2.7/site-packages/pandas/core/ops.py", line 721, in wrapper
result = wrap_results(safe_na_op(lvalues, rvalues))
File "/opt/conda/envs/ldsc/lib/python2.7/site-packages/pandas/core/ops.py", line 692, in safe_na_op
lambda x: op(x, rvalues))
File "pandas/_libs/algos_common_helper.pxi", line 1212, in pandas._libs.algos.arrmap_object
File "/opt/conda/envs/ldsc/lib/python2.7/site-packages/pandas/core/ops.py", line 692, in <lambda>
lambda x: op(x, rvalues))
TypeError: unsupported operand type(s) for ** or pow(): 'str' and 'int'
Analysis finished at Sun Feb 10 19:45:20 2019
Total time elapsed: 29.48s
Thanks @YiLiu6240 I have updated the repository and it should work now
Hi @explodecomputer metrics from ldsc have been added to the report, see on epi-franklin:
/projects/MRC-IEU/research/projects/ieu2/p4/013/workidng/data/results/report-ldsc.html
@YiLiu6240 This is wonderful, really impressed =] In that directory there was no json file but presumably being generated also?
@explodecomputer The current file structure for 2
is available at /projects/MRC-IEU/research/projects/ieu2/p4/013/working/data/mrbase-report-module/2
as
data.bcf
metadata.json
ldsc.txt.log
data.bcf.csi
qc_metrics.json
clump.txt
report.html
Great!
there will be three input files
clump.txt is a list of tophits, that looks like this:
Need to report this in the json file as
clumped_hits=<nrow clump.txt>
The LDSC file looks like this:
Print verbatim in the report
For the json need to parse the following: