Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is there any way to output the variant_id or rsID for the SNPs used in S-PrediXcan ? #180

Open
Stray357 opened this issue Sep 7, 2023 · 2 comments

Comments

@Stray357
Copy link

Stray357 commented Sep 7, 2023

Hi, I'm using S-PrediXcan with MASHR model on summary GWAS data following the tutorial at: https://github.com/hakyimlab/MetaXcan/wiki/Tutorial:-GTEx-v8-MASH-models-integration-with-a-Coronary-Artery-Disease-GWAS

Everything goes fine from harmonization to imputation, and I successfully get the output with headings like (NA column omitted):
image

However, I can only see the number of SNPs used in the model. Is there any way that I can see the exact SNP rsID or variant ID used in the model?

Thanks a lot!

@Heroico
Copy link
Collaborator

Heroico commented Sep 7, 2023

Hi there!

The base SPrediXcan implementation doesn't output this.

Since prediction model files (.db) are sqlite files, you can identifiy this using an interactive scripting environment like R or Python with the adequate packages. At a conceptual level:

  • Load the sqlite file
  • query the weights table. For every gene, this has a row for every variant in its model
  • load your GWAS file
  • perform an inner join by variant id
    • If you used the harmonization script in this repository, variant ids in your GWAS file are compatible
    • If not, I recommend you keep only variants that have the same effect and non-effect allele on both model and GWAS (or at most where the effect and non-effect allele are swapped)

@Stray357
Copy link
Author

Thank you very much for the reply.
Just to be sure, may I understand that every SNP in the GWAS with a match in the MASHR model would be included?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants