opain / eQTL_to_TWAS

Methods for converting eQTL summary statistics into TWAS SNP-weights
GNU General Public License v3.0
11 stars 4 forks source link

Error encountered while running TWAS with FUSION scripts #18

Closed 1667857557 closed 5 months ago

1667857557 commented 5 months ago

Hi Oliver,

We encountered an error while running TWAS using the generated weights for a gene. This gene was running well when using the FUSION-provided script FUSION.assoc_test.R, and only generated the top 1 model result. However, when we used the provided script FUSION.assoc_test.edit.R with the command, it reported an error

huang@TNR:/mnt/g/linux/fusion_twas-master$ Rscript FUSION.assoc_test.edit.R \
--sumstats GBM_TCSC.sumstats \
--weights ./brain/A.pos \
--weights_dir ./brain/ \
--ref_ld_chr ./LDREF/1000G.EUR. \
--chr 16 \
--out GBM_A16.dat
WARNING :  A A/ENSG00000155393.RDat ENSG00000155393 16 50099852 50140298 2974 had no overlapping GWAS Z-scores, skipping this gene
WARNING :  A A/ENSG00000155393.RDat ENSG00000155393 16 50099852 50140298 2974 had no overlapping GWAS Z-scores, skipping this gene
WARNING :  A A/ENSG00000155393.RDat ENSG00000155393 16 50099852 50140298 2974 had no overlapping GWAS Z-scores, skipping this gene
WARNING :  A A/ENSG00000155393.RDat ENSG00000155393 16 50099852 50140298 2974 had no overlapping GWAS Z-scores, skipping this gene
WARNING :  A A/ENSG00000155393.RDat ENSG00000155393 16 50099852 50140298 2974 had no overlapping GWAS Z-scores, skipping this gene
WARNING :  A A/ENSG00000155393.RDat ENSG00000155393 16 50099852 50140298 2974 had no overlapping GWAS Z-scores, skipping this gene
WARNING :  A A/ENSG00000155393.RDat ENSG00000155393 16 50099852 50140298 2974 had no overlapping GWAS Z-scores, skipping this gene
WARNING :  A A/ENSG00000155393.RDat ENSG00000155393 16 50099852 50140298 2974 lassosum had 821 overlapping SNPs, but none with non-zero expression weights, try more SNPS or a different model
WARNING :  A A/ENSG00000155393.RDat ENSG00000155393 16 50099852 50140298 2974 had no overlapping GWAS Z-scores, skipping this [gene]([A.zip](https://github.com/opain/eQTL_to_TWAS/files/14892146/A.zip))
Analysis completed.
NOTE: 9 genes-model pairs were skipped

Can you give me some suggestions? Thanks in advance! A.zip Huang

opain commented 5 months ago

Hello Huang,

Thanks for reaching out. Apologies for the bug. I accidentally left a requirement that the CHR column was present in the GWAS sumstats file.

I have just merged a commit updating 'FUSION.assoc_test.edit.R' so that it only requires SNP, A1, A2, and Z columns (like the original 'FUSION.assoc_test.R' script). This should resolve the error you were encountering.

Note. the commit also includes a few other minor updates - I haven't updated the docs yet. To avoid disrupting your workflow you might want to just replace the 'FUSION.assoc_test.edit.R' script in your cloned version of the repo.

Let me know if you run into other issues!

Best wishes,

Ollie

1667857557 commented 5 months ago

Dear Ollie,

Thanks for your work. The code is running well. I have another question. As you mentioned, if the direction of effect identified by the aggregate test (ACAT-O) is questionable, can we simply refer to the direction of the top1 model if its result is available?

Best wishes, Huang

opain commented 5 months ago

Hi Huang,

Glad the code is running!

To determine the direction of effect, I would look at the TWAS Z-scores coming from each model, rather than looking at just one model. Models showing significant associations should usually show the same direction of effect. If the direction of effect is significantly different between models, then these associations should be interpreted with caution.

I hope this helps.

Ollie

1667857557 commented 5 months ago

Hi Ollie,

Thanks for the help! This has solved my long standing problem.

Best, Yu-Feng