Coder Social home page Coder Social logo

Comments (4)

Heroico avatar Heroico commented on July 28, 2024

Hi Amy,

If a gene was imputed as 0 for all subjects, then it is likely that PrediXcan is not able to match the variants in your GWAS to the variants in the models. This can be caused by several issues.

Feel free to post here the full command line you are issuing to run PrediXcan.py.

Also, the --prediction_summary_output argument generates an additional file that might be useful.
It contains, for each gene in the database, how many variants are in its model, and how many of these variants are also available in the GWAS.

You can also implement a sanity check.
The prediction model files are sqlite databases.
You can access them programmatically in tools like R or python, and check if the variants in the model coincide with the variants in your genotypes.
For example, assuming you assemble a table with your variants like so (in a text file):

id      effect_allele non_effect_allele
rsid1   C             G
rsid2   A             T
....

Then you can run in R

library(RSQLite)
library(tidyverse)
db <- dbConnect(RSQLite::SQLite(), "my_model.db")
weights <- dbReadTable(db, "weights")
dbDisconnect()

# then load variants and alleles
variants <- read_tsv("my_variants.txt.gz")
# aligned variants
weights %>% inner_join(variants, by=c("rsid"="id", "ref_allele"="non_effect_allele", "eff_allele"="effect_allele")) %>% nrow
# swapped variants
weights %>% inner_join(variants, by=c("rsid"="id", "ref_allele"="effect_allele", "eff_allele"="non_effect_allele")) %>% nrow

from metaxcan.

amymiles avatar amymiles commented on July 28, 2024

Thanks very much for the prompt response. I ran PrediXcan as follows:

python PrediXcan.py
--predict
--dosages data/dosages
--dosages_prefix chr
--samples samples.fam
--weights data/weights/gtex_v7_Brain_Cortex_imputed_europeans_tw_0.5_signif.db
--output_prefix results/${DATE}_cortex

When I included the '--prediction_summary_output' flag, I received the following error message: PrediXcan.py: error: unrecognized arguments: --prediction_summary_output

Please let me know if there are errors in the code that I have missed. If not, I will look into running the sanity check, as described. As a side note, I initially ran the above command with python 2.7.8, but I have also tried with python 3.8.1.

Thanks again for all of your help,
Amy

from metaxcan.

Heroico avatar Heroico commented on July 28, 2024

Hi Amy, this looks like a command meant for the deprecated implementation:
https://github.com/hakyimlab/PrediXcan

You can find a tutorial for the new implementation in this repository (https://github.com/hakyimlab/MetaXcan) following this link.

Best,

Alvaro

from metaxcan.

Heroico avatar Heroico commented on July 28, 2024

Closing due to inactivity

from metaxcan.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.