Closed complexgenome closed 2 years ago
Hi Sanjeev,
Thanks for your question. When the dataset contains related samples, MetaSTAAR assumes a sparse GRM as input when fitting the null mixed model to better facilitate sparse matrix computations. There is a use_sparse
option in the fit_null_glmmkin()
function to transform a dense GRM to sparse GRM, with a specified cutoff as kins_cutoff
. Alternatively, you can convert a dense GRM to sparse GRM before fitting the null model.
Best,
Xihao
Dear Developers,
I am interested in using metaSTAAR to conduct meta-analysis from large-scale GWAS studies.
I fit null model using dense genetic relationship matrix (GRM) with STAAR R library. Later on I use null model object from STAAR library in metaSTAAR where I receive an error for using sparse GRM.
Fit null model:
CH_GWAS_obj_nullmodel<-fit_null_glmmkin( AD~ AGE+as.factor(SEX)+PC1+PC2+PC3+PC4,data=pheno,family=binomial(link="logit"),id="IID",kins=grm_all)
Move to metaSTAAR:
MetaSTAAR_worker_sumstat(df_genotype_ch,CH_GWAS_obj_nullmodel,df_snp_ch)
Error:
Can you please help?
I use tutorial from https://htmlpreview.github.io/?https://github.com/xihaoli/STAAR/blob/master/docs/STAAR_vignette.html
Library and R versions:
R 4.0 MetaSTAAR_0.9.6 STAAR_0.9.6