jianyangqt / gcta

GCTA software
GNU General Public License v3.0
84 stars 26 forks source link

Segmentation fault (core dumped) during fastGWA-GLMM #47

Closed lawspread closed 9 months ago

lawspread commented 1 year ago

Hi I got a Segmentation fault error during --fastGWA-mlm-binary using sparse grm. I used the bgen file and phenotype information for mixed model. Can developers please help with this?

The version of GCTA is v1.94.1 on Ubuntu 22.04.1 LTS. This is my code to conduct analysis. I deleted some information.

gcta --bgen chr3.dose.vcf_plink2.bgen --sample chr3.dose.vcf_plink2.sample --grm-sparse sp_grm --fastGWA-mlm-binary --pheno pheno_GCTA.phen --qcovar qcovar_GCTA.qcovar --covar covar_GCTA.covar --out chr3.dose.vcf_plink2_sp_grm_geno_assoc

I matched the form about phenotype and additional covariate files.

longmanz commented 1 year ago

Hi, Your command looks good to me. Which version of GCTA did you download? There are several versions of GCTA for different linux kernels at (https://yanglab.westlake.edu.cn/software/gcta/index.html#Download). You may try the kernel 3 or 4 one.

lawspread commented 1 year ago

Hi, Your command looks good to me. Which version of GCTA did you download? There are several versions of GCTA for different linux kernels at (https://yanglab.westlake.edu.cn/software/gcta/index.html#Download). You may try the kernel 3 or 4 one.

Hi, longmanz! First of all, thank you for reply! I checked my versions of GCTA and my version is gcta-1.94.1-linux-kernel-3. So, I think that the problem is not due to an old version.

By the way, could you tell me how to make grm file in dataframe format using R? I want to use this calculated grm file using GCTA to employ for another LMM model. Because i think this Segmentation fault was made by some issues with making files. If this is not an issue with converting imputed vcf files (I used michigan imputation server) using plink2 to calculate LMM model with dosage, it seems like a possible bug. Any insight into what I'm thinking would be appreciated.

I'm waiting for your opinions.

Best Regards

lawspread commented 1 year ago

Hi again!

I figure out how to fix this problem. I used the bgen file format. When I modify my bgen_file.sample file, this problem has been gone. I replaced the ID column and set the phenotype column too. (When I converted vcf file to bgen file format using plink2 tool, it automatically created a sample file, but it was in "before" format, so I changed it to "after" format.)

Before ID_1 ID_2 missing sex 0 0 0 D 0 sample1 0 NA 0 sample2 0 NA 0 sample3 0 NA

After

ID_1 ID_2 missing sex 0 0 0 D sample1 sample1 0 NA sample2 sample2 0 NA sample3 sample3 0 NA

This method might be a suitable modification for this problem, but for anyone who has a problem like this, it might be one of the options to fix this.

I'm not closing this issue just yet, in case you run into any other suspicious issues related to this, or in case the developers can show you a better way.