LDSC: Could not open Corces_ATAC_1000Gv3_ldscores/Corces_ATAC.1.1.l2.ldscore[./gz/bz2]

The error that occurs when running the following script IOError: Could not open Corces_ATAC_1000Gv3_ldscores/Corces_ATAC.1.1.l2.ldscore[./gz/bz2]:

ldsc.py \
    --h2-cts UKBB_BMI.sumstats.gz \
    --ref-ld-chr 1000G_EUR_Phase3_baseline/baseline. \
    --out BMI_Corces_ATAC \
    --ref-ld-chr-cts /ldsc/data/Corces_ATAC.ldcts \
    --w-ld-chr weights_hm3_no_hla/weights.

Solution, specify the absolute path of the Corces_ATAC_1000Gv3_ldscores folder, for example, the Corces_ATAC_1000Gv3_ldscores folder is stored in /ldsc/data, then it can be modified as follows:

cd /ldsc/data
ldsc.py \
    --h2-cts UKBB_BMI.sumstats.gz \
    --ref-ld-chr 1000G_EUR_Phase3_baseline/baseline. \
    --out BMI_Corces_ATAC \
    --ref-ld-chr-cts /ldsc/data/Corces_ATAC.ldcts \
    --w-ld-chr weights_hm3_no_hla/weights.

It can be understood that this is a bug of ldsc. ldsc needs to call Corces_ATAC_1000Gv3_ldscores/Corces_ATAC.1.1.l2.ldscoredata internally, but there is no such parameter in the official script to specify Corces_ATAC_1000Gv3_ldscores/Corces_ATAC.1.1.l2.ldscorethe data, so the data cannot be found when running.
Therefore, you only need to add cd /ldsc/datasuch a parameter before running.

Read More:

Leave a Reply

Your email address will not be published. Required fields are marked *