Closed pazpark closed 2 years ago
Hello,
Thank you for highlighting this error and apologies for not replying sooner. I am not receiving notifications on issues for some reason. Please email me (oliver.pain@kcl.ac.uk) if I do not reply within two weeks.
Indeed, the script failed if there were no variants surpassing a given pT. I have now edited the script to account for this.
# Retain pTs with at least one variant
opt$pTs<-opt$pTs[opt$pTs > min(GWAS$P)]
Let me know if you have any other issues.
Best wishes,
Ollie
Thank you, works great now!
Hi, thank you for the great pipeline.
I've noticed that the
prs_scoring_pt_clump
rule fails when the GWAS study doesn't have any SNPs that are P < 1e-08.Error in setnames(x, value) : Can't assign 12 names to a 11 column data.table Calls: names<- -> names<-.data.table -> setnames
The issues seems to be in
polygenic_score_file_creator_plink2.R
, in the following linenames(scores)<-c('FID','IID',names(score)[-1:-2])
, since thescore
will have 12 (default parameters), whilescores
will have 11 columns.Actually, in seems the problem starts with the
.sscore
files. e.g. here's an example one. It seems like it truncates one column, but the R code assumes all P-value cutoff columns are present when reading them insscore<-fread(paste0(opt$output,'.profiles.chr',i,'.sscore'))
(maybe also the wrong column got cut in .sscore file, probably should have kept theSCORE_0_1_AVG
)?Thank you again!