weizhouUMICH / SAIGE

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

error with chrX in step 2 (version 0.44.2) #333

Open Mingxi-HUANG-Sunnia opened 3 years ago

Mingxi-HUANG-Sunnia commented 3 years ago

Hi Wei, I am using the newest version saige:0.44.2, and I got an error when running the X chromosome in step2, but it works well in autosomes. what's more, last week, I have used the 0.43.2 version, it works well for all chorm. What would be the reason for this?

command: step2_SPAtests.R --vcfFile=$vcf --vcfField=DS --chrom=chrX --minMAF=0.01 --minMAC=4 --sampleFile=weight.id --GMMATmodelFile=weight.rda --varianceRatioFile=weight.varianceRatio.txt --SAIGEOutputFile=chrX.weight.txt --numLinesOutput=200000 --IsOutputAFinCaseCtrl=TRUE --LOCO=FALSE && echo "chrX done"

Error info: Analysis started at 1618798315 Seconds Error in rbind(OUT, c(rowHeader, N, out1$BETA, out1$SE, out1$Tstat, out1$p.value, : Value of SET_STRING_ELT() must be a 'CHARSXP' not a 'NULL' Calls: SPAGMMATtest -> rbind Execution halted

Thanks!

matuskosut commented 3 years ago

Hi @Mingxi-HUANG-Sunnia cold you try if it still works with version 0.44.0 ? There were some changes done regarding VCF files in 0.44.1 and 0.44.2 so might be good to confirm that 0.44.0 is working,

sgagliano commented 3 years ago

I am also getting this error for chrX using the latest version, 0.44.5. Autosomes run fine.

matuskosut commented 3 years ago

Hi @sgagliano could you confirm if this step is working with version 0.44.0? I don't have data to run it, but if we manage to narrow it down it will help.

sgagliano commented 3 years ago

Hi @matuskosut. Sorry, I don't think see a branch for 0.44.0, and so am not sure how to test that version...

matuskosut commented 3 years ago

@sgagliano if you will have time to test it out, there are two options how to install 0.44.0:

  1. conda (https://anaconda.org/bioconda/r-saige/files) - conda create -n saige -c conda-forge -c bioconda r-saige==0.44.0
  2. checkout/compile or install based on the commit ID (https://github.com/weizhouUMICH/SAIGE/tree/92a3c2cd288474c66d82eeb09ed5dd590fb59f31): 92a3c2cd288474c66d82eeb09ed5dd590fb59f31

example with git

git checkout 92a3c2cd288474c66d82eeb09ed5dd590fb59f31
weizhouUMICH commented 3 years ago

Hi @Mingxi-HUANG-Sunnia,

Can you please also try setting --numLinesOutput to a smaller number, for example --numLinesOutput = 1000 or 10 to see for which marker this error is seen?

Thanks, Wei

Mingxi-HUANG-Sunnia commented 3 years ago

@weizhouUMICH

Hi, The weird thing is that I have several group traits, one group chrX works well, two groups failed with "Error in rbind(OUT, c(rowHeader, N, out1$BETA, out1$SE, out1$Tstat, out1$p.value ", one group with error "Aborted (core dumped)" and generate a large core file which may be related to the sample size.

The only group that works well is female only, and other groups are both female and male.

All these errors disappeared when I work with the 0.43.2 version.

and another small bug is "--vcfFileIndex" parameter doesn't work when I give it an idx format index file, saige 0.44.2 reported an error "can't find .csi", so I have to re-index it, but .idx works in 0.43.2.

matuskosut commented 3 years ago

@jonathonl sorry for bothering, could this be some bug related to changes of VCF implementation in savvy? Might be some missing part in saige, but I though it's still good to have your eyes on it.

jonathonl commented 3 years ago

I am not familiar with .idx files. Which software generated the .idx file?

sgagliano commented 3 years ago

@matuskosut Thanks for the instructions for downloading version 0.40.0. I am still getting the same error chrX.

sgagliano commented 3 years ago

In case anyone is still having trouble with chrX analyses, chrX worked for me with version 0.42:

conda create -n saige0.42 -c conda-forge -c bioconda -y r-base=4.0 r-saige=0.42 savvy=1.3.0 conda activate saige0.42