xihaoli / STAARpipeline-Tutorial

The tutorial for performing single-/multi-trait association analysis of whole-genome/whole-exome sequencing (WGS/WES) studies using FAVORannotator, STAARpipeline and STAARpipelineSummary
GNU General Public License v3.0
21 stars 17 forks source link

Phenofile in STAARpipeline_Null_Model.r #32

Closed SheaCheng2000 closed 8 months ago

SheaCheng2000 commented 10 months ago

Hi,

Thanks for the amazing tool! When constructing the null model using STAARpipeline_Null_Model.r, should the sample in 'pheno.csv' be the same as input vcf (which is used in the very beginning and converted to GDS files)? Or the sample in 'pheno.csv' could be a subset of that in input vcf?

Now I only want to analyze the samples in 'pheno.csv'. When I used STAARpipeline_STAAR2SCANG.r, it reported Error in y %*% diag(eigen_diff) : non-integral arguments. So I am wondering if the inconsistency of pheno.csv and input vcf is the reason for the error?

Thanks! Shea

xihaoli commented 10 months ago

Hi Shea,

Thanks for your question. When fitting the null model, the samples in 'pheno.csv' can either be exactly the same as the samples in the input vcf file, or a subset of it. Just need to make sure that there should not be samples that are used in your null model, but not part of the input vcf file.

Hope this helps.

Best, Xihao

SheaCheng2000 commented 10 months ago

Hi Xihao,

Thanks for your reply! I checked that the samples in 'pheno.csv' is indeed a subset of the input vcf samples. Then what could be the possible reason for the error? Error in y %*% diag(eigen_diff) : non-integral arguments.

Regards, Shea

zilinli1988 commented 9 months ago

We have never seen this error before. We recommend you run the code of STAAR2SCANG.r line by line to check.

SheaCheng2000 commented 8 months ago

Hi Zilin,

Thanks for your guidance! I have checked the STAAR2SCANG.r line by line, and identified the potential issue. I fit the null model only use sex as covariate, while my cohort is a female cohort, possibly causing the matrix to be not fully rank? To address this, I replaced the sex with PC1-3 and no errors were encountered thereafter.)

Thanks again for your kind help!

Shea