Closed trinetn closed 1 month ago
So, final_pred
is only 0s?
I would check two things:
final_beta_auto
final_beta_auto
has non-zero valuesYes, final_pred is only 0s
The length of final_beta_auto is around 1,1 mio SNPs and the vector contains only non-zero values
And G does not contain only 0s?
No, it contains 0s,1s and 2s for all three individuals
Odd.
Is this on GenomeDK, somewhere I can access?
If you can save both final_beta_auto
and map_pgs2
in some rds file, close to "Test_object.rds"
somewhere I can access, I can have a look at it.
Yes, I am working in the closed zone Brain on genomeDK, but I can´t share data with you - it is data from the ABCD cohort. I will try with a new target sample (a dataset from the Plink webpage) and see if I get the same results. I will write back when I have run the new analysis. Thank you for now
Update: Even after running my code with a different dataset, I still get PGSs equal zero. The issue seems to stem from the nb_cores() function (actually not shown in the code above), the function returns 0 and depending on, if I run the nb_cores function or not I get PGSs equal zero or non-zero values
Thanks for this. Seems to be a bug on my end.
What do you get for
parallelly::availableCores(logical = FALSE)
parallelly::availableCores(logical = TRUE)
Sys.getenv("SLURM_JOB_CPUS_PER_NODE")
packageVersion("bigparallelr")
packageVersion("parallelly")
I get: nproc 1 nproc 1 [1] "1" [1] "0.3.1" [1] "1.27.0"
What if you update to the latest CRAN version install.packages("bigparallelr")
and try bigstatsr::nb_cores()
again?
Then I get: [1] 1
Perfect. It seems to be a bug I fixed 3y ago ahah. Glad that it now works for you.
Dear Florian
I have been using LDpred2 to estimate PG-scores for a while now and I have been very happy with the tool. I am currently having an issue with an LDpred2 analysis. I hope you might be able to help us. Any help is much appreciated!!
I want to estimate PGSs using weights estimated with LDpred2 using a reference sample, but for some reason I keep getting PGSs equal 0. My code can be seen below:
Can you think of any thing that I am doing wrong? I would be grateful for any suggestions
Best wishes Trine