weizhouUMICH / SAIGE

GNU Lesser General Public License v3.0
187 stars 72 forks source link

createSparseGRM script (step0) doesn’t work #438

Open omrak opened 10 months ago

omrak commented 10 months ago

While trying to run a rare variant burden test for WES data using SAIGE-GENE an error was received while running 'Step 0: Generate sparse GRM'. The run was done in versions 1.1.8 and 1.1.9.

Following the instructions in your guide I ran the 'createSparseGRM.R' script as follows:
Rscript ./extdata/createSparseGRM.R \ --plinkFile=./pkd_project/wes/unsolved_cases/input/PKD_Controls_Exomes_All_Variants_PASS_anno_PKD_Controls_cov \ --nThreads=4 \ --outputPrefix=./pkd_project/wes/unsolved_cases/output/sparseGRM \ --numRandomMarkerforSparseKin=2000 \ --relatednessCutoff=0.125

I got the following output: Loading required package: optparse R version 4.2.3 (2023-03-15) Platform: x86_64-conda-linux-gnu (64-bit) Running under: Ubuntu 20.04.6 LTS

Matrix products: default BLAS/LAPACK: /home/omriteltsh/miniconda3/envs/saige/lib/libopenblasp-r0.3.21.so

locale: [1] LC_CTYPE=C.UTF-8 LC_NUMERIC=C LC_TIME=C.UTF-8 [4] LC_COLLATE=C.UTF-8 LC_MONETARY=C.UTF-8 LC_MESSAGES=C.UTF-8 [7] LC_PAPER=C.UTF-8 LC_NAME=C LC_ADDRESS=C [10] LC_TELEPHONE=C LC_MEASUREMENT=C.UTF-8 LC_IDENTIFICATION=C

attached base packages: [1] stats graphics grDevices utils datasets methods base

other attached packages: [1] optparse_1.7.3 SAIGE_0.45

loaded via a namespace (and not attached): [1] compiler_4.2.3 Matrix_1.5-4 Rcpp_1.0.10 getopt_1.20.3 [5] grid_4.2.3 RcppParallel_5.1.6 lattice_0.21-8

$plinkFile [1] "./pkd_project/wes/unsolved_cases/input/PKD_Controls_Exomes_All_Variants_PASS_anno_PKD_Controls_cov" $bedFile [1] "" $bimFile [1] "" $famFile [1] "" $nThreads [1] 4 $memoryChunk [1] 2 $outputPrefix [1] "./pkd_project/wes/unsolved_cases/output/sparseGRM" $numRandomMarkerforSparseKin [1] 2000 $relatednessCutoff [1] 0.125 $isDiagofKinSetAsOne [1] FALSE $minMAFforGRM [1] 0.01 $maxMissingRateforGRM [1] 0.15 $help [1] FALSE

Error in createSparseGRM(bedFile = bedFile, bimFile = bimFile, famFile = famFile, : unused arguments (bedFile = bedFile, bimFile = bimFile, famFile = famFile, maxMissingRateforGRM = opt$maxMissingRateforGRM) Execution halted

Additionally I tried running this step with the demo data you provided here using exact commands shown in the tutorial and got the same error message. I also tried running this script specifying the path and names of the bim, fam and bed files using the ‘bimFile’, ‘famFile’ and ‘bedFile’ arguments (instead of the ‘plinkFile’ argument) as well as running this script from within R itself line by line but I got the same error message.

Do you think I should run this script in a different way or is there a bug in the code? Since I was not able to generate the exact sparse GRM with the other methods you suggest in the tutorial would greatly appreciate it if you could help me solve this problem so that I can complete the analysis.

Many thanks!