Open Sabor117 opened 2 months ago
Many thanks for trying LDAK, and sorry for the difficulty. Thanks for the clear questions / scripts, I will test out and get back to you. In the meantime, do things improve if you use --model bayesr (instead of mega)?
Thanks, Doug
Hi Doug, thanks for getting back to me so quickly about this. I've tried what you suggested by changing the model to bayesr instead of mega. Here is the output from my log file:
There are 9 pairs of arguments:
--mega-prs /scratch/project_2007428/projects/prj_001_cost_gwas/outputs/megaPRS_output/weights/IN_ALL_meta_V4
--model bayesr
--summary /scratch/project_2007428/projects/prj_001_cost_gwas/processing/megaPRS_processing/IN_ALL_meta_sumstats_for_megaPRS.txt
--power -0.25
--max-threads 8
--cors /scratch/project_2007428/data/processing/1000G/megaPRS_cors/cors
--window-cm 1
--allow-ambiguous YES
--extract /scratch/project_2007428/projects/prj_001_cost_gwas/processing/megaPRS_processing/IN_ALL_meta_snplist_for_megaPRS.txt
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Constructing a MegaPRS prediction model - will consider BayesR models
Will use the default parameter choices (printed out in the file /scratch/project_2007428/projects/prj_001_cost_gwas/outputs/megaPRS_output/weights/IN_ALL_meta_V4.parameters); to instead specify your own, use "--parameters"
Will select the best parameters via cross-validation, using 0.10 randomly-picked test samples (use "--cv-proportion" to change this proportion or "--cv-skip" to turn off cross-validation)
Will use windows of size 1.0000cM, each divided into 8 segments (change these settings using "--window-cm" or "--window-kb" and "--segments")
The heritability estimates must be between 0.01 and 0.8000 (change the upper bound using "--max-her")
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Reading details for 8519089 predictors from /scratch/project_2007428/data/processing/1000G/megaPRS_cors/cors.cors.bim
Warning, Predictor 2:10554 has a negative genetic distance (-0.001231)
Warning, Predictor 2:10560 has a negative genetic distance (-0.001228)
Warning, Predictor 2:10566 has a negative genetic distance (-0.001225)
Warning, Predictor 2:10574 has a negative genetic distance (-0.001221)
Warning, Predictor 2:10587 has a negative genetic distance (-0.001214)
In total 1987 predictors have negative genetic distances
Reading list of 1309689 predictors to extract from /scratch/project_2007428/projects/prj_001_cost_gwas/processing/megaPRS_processing/IN_ALL_meta_snplist_for_megaPRS.txt
Reading summary statistics from /scratch/project_2007428/projects/prj_001_cost_gwas/processing/megaPRS_processing/IN_ALL_meta_sumstats_for_megaPRS.txt
Have found summary statistics for all 1309689 predictors
First few stats and ns are: 1:565935 0.028 16135.0 | 1:741397 2.152 520993.0 | 1:752721 0.016 1175473.0
Reading list of 70925 high-LD predictors from /scratch/project_2007428/data/processing/1000G/megaPRS_cors/cors.cors.highld
Warning, only 8353 of these are in the data
Estimated heritability is 0.9721
Warning, to perform the analysis requires 2.0 Gb
Estimating effect sizes for 35 models using pseudo training summary statistics (if using multiple cores, models will finish in a random order)
Constructed Model 1: bayesr, heritability 0.2072, p1 0.9900, p2 0.0000, p3 0.0000, p4 0.0100 - effect sizes failed to converge for 205 predictors
Constructed Model 4: bayesr, heritability 0.2072, p1 0.8000, p2 0.0000, p3 0.0000, p4 0.2000 - effect sizes failed to converge for 52 predictors
Constructed Model 3: bayesr, heritability 0.2072, p1 0.9000, p2 0.0000, p3 0.0000, p4 0.1000 - effect sizes failed to converge for 199 predictors
Constructed Model 2: bayesr, heritability 0.2072, p1 0.9500, p2 0.0000, p3 0.0000, p4 0.0500 - effect sizes failed to converge for 245 predictors
Constructed Model 6: bayesr, heritability 0.2072, p1 0.9400, p2 0.0000, p3 0.0500, p4 0.0100 - effect sizes failed to converge for 230 predictors
Constructed Model 5: bayesr, heritability 0.2072, p1 0.9800, p2 0.0000, p3 0.0100, p4 0.0100 - effect sizes failed to converge for 165 predictors
Constructed Model 7: bayesr, heritability 0.2072, p1 0.8900, p2 0.0000, p3 0.1000, p4 0.0100 - effect sizes failed to converge for 375 predictors
Constructed Model 8: bayesr, heritability 0.2072, p1 0.7900, p2 0.0000, p3 0.2000, p4 0.0100 - effect sizes failed to converge for 201 predictors
Constructed Model 9: bayesr, heritability 0.2072, p1 0.9000, p2 0.0000, p3 0.0500, p4 0.0500 - effect sizes failed to converge for 126 predictors
Constructed Model 10: bayesr, heritability 0.2072, p1 0.8500, p2 0.0000, p3 0.1000, p4 0.0500 - effect sizes failed to converge for 139 predictors
Constructed Model 11: bayesr, heritability 0.2072, p1 0.7500, p2 0.0000, p3 0.2000, p4 0.0500 - effect sizes failed to converge for 113 predictors
Constructed Model 12: bayesr, heritability 0.2072, p1 0.8000, p2 0.0000, p3 0.1000, p4 0.1000 - effect sizes failed to converge for 55 predictors
Constructed Model 13: bayesr, heritability 0.2072, p1 0.7000, p2 0.0000, p3 0.2000, p4 0.1000 - effect sizes failed to converge for 102 predictors
Constructed Model 14: bayesr, heritability 0.2072, p1 0.6000, p2 0.0000, p3 0.2000, p4 0.2000 - effect sizes failed to converge for 26 predictors
Constructed Model 15: bayesr, heritability 0.2072, p1 0.9700, p2 0.0100, p3 0.0100, p4 0.0100 - effect sizes failed to converge for 193 predictors
Constructed Model 16: bayesr, heritability 0.2072, p1 0.9300, p2 0.0500, p3 0.0100, p4 0.0100 - effect sizes failed to converge for 119 predictors
Constructed Model 19: bayesr, heritability 0.2072, p1 0.8900, p2 0.0500, p3 0.0500, p4 0.0100 - effect sizes failed to converge for 189 predictors
Constructed Model 18: bayesr, heritability 0.2072, p1 0.7800, p2 0.2000, p3 0.0100, p4 0.0100 - effect sizes failed to converge for 170 predictors
Constructed Model 17: bayesr, heritability 0.2072, p1 0.8800, p2 0.1000, p3 0.0100, p4 0.0100 - effect sizes failed to converge for 117 predictors
Constructed Model 20: bayesr, heritability 0.2072, p1 0.8400, p2 0.1000, p3 0.0500, p4 0.0100 - effect sizes failed to converge for 224 predictors
Constructed Model 21: bayesr, heritability 0.2072, p1 0.7400, p2 0.2000, p3 0.0500, p4 0.0100 - effect sizes failed to converge for 242 predictors
Constructed Model 22: bayesr, heritability 0.2072, p1 0.7900, p2 0.1000, p3 0.1000, p4 0.0100 - effect sizes failed to converge for 118 predictors
Constructed Model 23: bayesr, heritability 0.2072, p1 0.6900, p2 0.2000, p3 0.1000, p4 0.0100 - effect sizes failed to converge for 186 predictors
Constructed Model 24: bayesr, heritability 0.2072, p1 0.5900, p2 0.2000, p3 0.2000, p4 0.0100 - effect sizes failed to converge for 163 predictors
Constructed Model 27: bayesr, heritability 0.2072, p1 0.7000, p2 0.2000, p3 0.0500, p4 0.0500 - effect sizes failed to converge for 87 predictors
Constructed Model 26: bayesr, heritability 0.2072, p1 0.8000, p2 0.1000, p3 0.0500, p4 0.0500 - effect sizes failed to converge for 140 predictors
Constructed Model 25: bayesr, heritability 0.2072, p1 0.8500, p2 0.0500, p3 0.0500, p4 0.0500 - effect sizes failed to converge for 156 predictors
Constructed Model 28: bayesr, heritability 0.2072, p1 0.7500, p2 0.1000, p3 0.1000, p4 0.0500 - effect sizes failed to converge for 201 predictors
Constructed Model 29: bayesr, heritability 0.2072, p1 0.6500, p2 0.2000, p3 0.1000, p4 0.0500 - effect sizes failed to converge for 134 predictors
Constructed Model 30: bayesr, heritability 0.2072, p1 0.5500, p2 0.2000, p3 0.2000, p4 0.0500 - effect sizes failed to converge for 115 predictors
Constructed Model 31: bayesr, heritability 0.2072, p1 0.7000, p2 0.1000, p3 0.1000, p4 0.1000 - effect sizes failed to converge for 93 predictors
Constructed Model 32: bayesr, heritability 0.2072, p1 0.6000, p2 0.2000, p3 0.1000, p4 0.1000 - effect sizes failed to converge for 99 predictors
Constructed Model 35: bayesr, heritability 0.2072, p1 0.0000, p2 0.0000, p3 0.0000, p4 1.0000 - effect sizes converged for all predictors
Constructed Model 34: bayesr, heritability 0.2072, p1 0.4000, p2 0.2000, p3 0.2000, p4 0.2000 - effect sizes failed to converge for 37 predictors
Constructed Model 33: bayesr, heritability 0.2072, p1 0.5000, p2 0.2000, p3 0.2000, p4 0.1000 - effect sizes failed to converge for 120 predictors
Testing the models using pseudo test summary statistics
The estimated correlations of models are saved in /scratch/project_2007428/projects/prj_001_cost_gwas/outputs/megaPRS_output/weights/IN_ALL_meta_V4.cors, while the parameters corresponding to the best model are saved in /scratch/project_2007428/projects/prj_001_cost_gwas/outputs/megaPRS_output/weights/IN_ALL_meta_V4.best
Estimating effect sizes using the best parameters and summary statistics in /scratch/project_2007428/projects/prj_001_cost_gwas/processing/megaPRS_processing/IN_ALL_meta_sumstats_for_megaPRS.txt
Constructed Model 1: bayesr, heritability 0.2072, p1 0.0000, p2 0.0000, p3 0.0000, p4 1.0000 - effect sizes failed to converge for 2734 predictors
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
This command started at Sun Sep 15 18:16:24 2024 and ended at Sun Sep 15 18:17:54 2024
The elapsed time was 0.0250 hours
Given the command used 8 threads, this means the CPU time was 0.2000 hours
Mission completed. All your basepair are belong to us :)
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Again, however, this has only produced a .best, .cors, .progress and .parameters file. No effects file.
I have recently been running a MegaPRS on some meta-analysis summary statistics and using 1000G as a reference panel. This is something I have run earlier this year (prior to version 6) and it worked well, but the meta-analysis has since been updated so I've had to create new versions of the polygenic weights.
The MegaPRS command seems to run correctly and runs to completion, producing .best, .progress, .cors and .parameters files but it does not produce a .effects file (despite the logs saying it is going to create the effects).
The command I am using is as follows:
Where the variables included are all directories and names for the different inputs (e.g.
${snplist}
refers to the list of SNP names in the summary stats (${sumstats}
).The end of the log file says this:
But has not produced any .effects files.
One thing I did note was earlier on in the script it said:
Could this be causing some kind of issue? If it would help I could upload some of the complete log files?