weizhouUMICH / SAIGE

GNU Lesser General Public License v3.0
191 stars 73 forks source link

Does anyone know what's the meaning of this error message? #293

Closed garyzhubc closed 2 years ago

garyzhubc commented 3 years ago

Does anyone know what's the meaning of this error message?

[zhupy@cdr1132 zhupy]$ singularity exec -B /home -B /project -B /scratch -B /localscratch /scratch/zhupy/saige.sif /usr/local/bin/step2_SPAtests.R \
>   --bgenFile=ukb_imp_chr1_v3_pruned_reduced.bgen \
>   --bgenFileIndex=ukb_imp_chr1_v3_pruned_reduced.bgen.bgi \
>   --sampleFile=sample_ids_LDL_reduced.tsv \
>   --chrom=1 \
>   --minMAF=0 \
>   --minMAC=0.5 \
>   --maxMAFforGroupTest=0.01       \
>   --GMMATmodelFile=./output/example_quantitative.rda \
>   --varianceRatioFile=./output/example_quantitative_cate.varianceRatio.txt \
>   --SAIGEOutputFile=./output/example_quantitative.SAIGE.gene.txt \
>   --numLinesOutput=1 \
>   --groupFile=group_file.tsv    \
>   --sparseSigmaFile=./output/example_quantitative_cate.varianceRatio.txt_relatednessCutoff_0.125_2000_randomMarkersUsed.sparseSigma.mtx       \
>   --IsSingleVarinGroupTest=TRUE 
R version 3.5.1 (2018-07-02)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 16.04.6 LTS

Matrix products: default
BLAS/LAPACK: /usr/lib/libopenblasp-r0.2.18.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] SAIGE_0.38

loaded via a namespace (and not attached):
[1] compiler_3.5.1     Matrix_1.2-14      Rcpp_1.0.4.6       grid_3.5.1        
[5] RcppParallel_5.0.0 lattice_0.20-35   
$vcfFile
[1] ""

$vcfFileIndex
[1] ""

$vcfField
[1] "DS"

$bgenFile
[1] "ukb_imp_chr1_v3_pruned_reduced.bgen"

$bgenFileIndex
[1] "ukb_imp_chr1_v3_pruned_reduced.bgen.bgi"

$savFile
[1] ""

$savFileIndex
[1] ""

$idstoExcludeFile
[1] ""

$idstoIncludeFile
[1] ""

$rangestoExcludeFile
[1] ""

$rangestoIncludeFile
[1] ""

$chrom
[1] "1"

$start
[1] 1

$end
[1] 2.5e+08

$IsDropMissingDosages
[1] FALSE

$minMAF
[1] 0

$minMAC
[1] 0.5

$maxMAFforGroupTest
[1] 0.01

$minInfo
[1] 0

$sampleFile
[1] "sample_ids_LDL_reduced.tsv"

$GMMATmodelFile
[1] "./output/example_quantitative.rda"

$varianceRatioFile
[1] "./output/example_quantitative_cate.varianceRatio.txt"

$SAIGEOutputFile
[1] "./output/example_quantitative.SAIGE.gene.txt"

$numLinesOutput
[1] 1

$IsSparse
[1] TRUE

$SPAcutoff
[1] 2

$IsOutputAFinCaseCtrl
[1] FALSE

$IsOutputNinCaseCtrl
[1] FALSE

$IsOutputHetHomCountsinCaseCtrl
[1] FALSE

$LOCO
[1] FALSE

$condition
[1] ""

$sparseSigmaFile
[1] "./output/example_quantitative_cate.varianceRatio.txt_relatednessCutoff_0.125_2000_randomMarkersUsed.sparseSigma.mtx"

$groupFile
[1] "group_file.tsv"

$kernel
[1] "linear.weighted"

$method
[1] "optimal.adj"

$weights.beta.rare
[1] "1,25"

$weights.beta.common
[1] "1,25"

$weightMAFcutoff
[1] 0.01

$r.corr
[1] "0"

$IsSingleVarinGroupTest
[1] TRUE

$cateVarRatioMinMACVecExclude
[1] "0.5,1.5,2.5,3.5,4.5,5.5,10.5,20.5"

$cateVarRatioMaxMACVecInclude
[1] "1.5,2.5,3.5,4.5,5.5,10.5,20.5"

$dosageZerodCutoff
[1] 0.2

$IsOutputPvalueNAinGroupTestforBinary
[1] FALSE

$IsAccountforCasecontrolImbalanceinGroupTest
[1] TRUE

$weightsIncludeinGroupFile
[1] FALSE

$IsOutputBETASEinBurdenTest
[1] FALSE

$help
[1] FALSE

weights.beta.rare  is  1 25 
weights.beta.common  is  1 25 
cateVarRatioMinMACVecExclude  is  0.5 1.5 2.5 3.5 4.5 5.5 10.5 20.5 
cateVarRatioMaxMACVecInclude  is  1.5 2.5 3.5 4.5 5.5 10.5 20.5 
group-based test will be performed
Any dosages <=  0.2  for genetic variants with MAC <= 10 are set to be 0 in group tests
9248  samples have been used to fit the glmm null model
obj.glmm.null$LOCO:  FALSE 
Leave-one-chromosome-out option is not applied
variance Ratio is  1.007258 1.006768 1.007125 1.006785 1.006435 1.00594 1.004277 0.9627478 
93604  sample IDs are found in sample file
isCondition is  FALSE 
[1] 93604     6
[1] "IID"          "IndexInModel" "V2.x"         "IndexDose.x"  "V2.y"        
[6] "IndexDose.y" 
9248  samples were used in fitting the NULL glmm model and are found in sample file
sparse kinship matrix is going to be used
sparseSigmaFile:  ./output/example_quantitative_cate.varianceRatio.txt_relatednessCutoff_0.125_2000_randomMarkersUsed.sparseSigma.mtx 
Missing dosages will be mean imputed for the analysis
Analysis started at  1608536981 Seconds
minMAC:  0.5 
minMAF:  0 
Minimum MAF of markers to be tested is  2.703287e-05 
It is a quantitative trait
isCondition is  FALSE 
Analysis started at  1608536981 Seconds
It is a quantitative trait
isCondition is  FALSE 
geneID:  PAQR7 
[1] "PAQR7\trs12067275\trs213638\trs112214314\trs550838040\trs72879464\trs213637\trs7339978\trs76727523\t1:26189169_GCA_G\trs6689014\trs55948644\trs140408744\trs568914873\trs72879469\trs77605566\trs72879472\trs72879474\trs12096474\trs144514287\trs569218215\trs777730380\trs11810964\trs11247819\trs11247820\trs72879476\trs541789629\trs189623791\trs111810672\trs189509377\trs112826714\trs528642761\trs78259430\trs112914703\trs112368771\trs2782824\trs186242896\trs76568316\trs12059832\trs61775031\trs12058534\trs56194092\trs569201205\trs536093387\trs114053951\trs536154665\trs112575583\trs7552149\trs187531776\trs534145333\trs147112244\trs59136700\trs113573470\trs78156661\trs807066\t1:26196966_ACT_A\trs807067\trs41284315"
genetic variants with  2.703287e-05 <= MAF <=  0.01 are included for gene-based tests
[1] "ids_to_include"
 [1] "rs12067275"       "rs213638"         "rs112214314"      "rs550838040"     
 [5] "rs72879464"       "rs213637"         "rs7339978"        "rs76727523"      
 [9] "1:26189169_GCA_G" "rs6689014"        "rs55948644"       "rs140408744"     
[13] "rs568914873"      "rs72879469"       "rs77605566"       "rs72879472"      
[17] "rs72879474"       "rs12096474"       "rs144514287"      "rs569218215"     
[21] "rs777730380"      "rs11810964"       "rs11247819"       "rs11247820"      
[25] "rs72879476"       "rs541789629"      "rs189623791"      "rs111810672"     
[29] "rs189509377"      "rs112826714"      "rs528642761"      "rs78259430"      
[33] "rs112914703"      "rs112368771"      "rs2782824"        "rs186242896"     
[37] "rs76568316"       "rs12059832"       "rs61775031"       "rs12058534"      
[41] "rs56194092"       "rs569201205"      "rs536093387"      "rs114053951"     
[45] "rs536154665"      "rs112575583"      "rs7552149"        "rs187531776"     
[49] "rs534145333"      "rs147112244"      "rs59136700"       "rs113573470"     
[53] "rs78156661"       "rs807066"         "1:26196966_ACT_A" "rs807067"        
[57] "rs41284315"      
TEST 57
TEST 1 OK
TEST2 57
ranges_to_include.nrow() 0
ranges_to_exclude.nrow() 0
ids_to_include.size() 57
ids_to_exclude.size() 0
20 markers will be analyzed 
Mtest:  20 
Error in getDosage_bgen_withquery() : BGenError
Calls: SPAGMMATtest -> getGenoOfGene_bgen -> getDosage_bgen_withquery
Execution halted
dvh13 commented 3 years ago

I seem to remember SAIGE likes only 8 bit bgen. Maybe it is that. If you are making your bgen with qctools, use -ofiletype bgen_v1.2 -bgen-bits 8

garyzhubc commented 3 years ago

Hi @dvh13 Thanks for your answer. I was using PLINK so I think switching to --export bgen-1.2 from bgen-1.3 should be enough?

garyzhubc commented 3 years ago

I'm using --export bgen-1.2 bits=8 and now but the same problem still exists.

TEST 1288
TEST 1 OK
TEST2 1288
ranges_to_include.nrow() 0
ranges_to_exclude.nrow() 0
ids_to_include.size() 1288
ids_to_exclude.size() 0
Error in setgenoTest_bgenDosage_v2(bgenFile, bgenFileIndex, ranges_to_exclude = ranges_to_exclude,  : 
  db::StatementStepError
Calls: SPAGMMATtest ... getGenoOfGene_bgen_Sparse -> setgenoTest_bgenDosage_v2
Execution halted
weizhouUMICH commented 2 years ago

Sorry fo the late reply! We have just released a new version 1.0.0. It has computational efficiency improvements for both Step 1 and Step 2 for single-variant and set-based tests. We have created a new program github page https://github.com/saigegit/SAIGE with the documentation provided https://saigegit.github.io/SAIGE-doc/ The program will be maintained by multiple SAIGE developers there. The docker image has been updated. Please feel free to try the version 1.0.0 and report issues if any.

Thanks! Wei