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

Phecodes #183

Open
vkp3 opened this issue Oct 26, 2021 · 1 comment
Open

Phecodes #183

vkp3 opened this issue Oct 26, 2021 · 1 comment

Comments

@vkp3
Copy link

vkp3 commented Oct 26, 2021

Hello,

Please forgive these naive questions as I am new to PheWAS analysis.

For the UK Biobank dataset, I have run a PHESANT (https://github.com/MRCIEU/PHESANT) analysis for a subgroup of individuals known to be carriers of mutations associated with a given trait of interest. In other words, I've let PHESANT test association of the group of carriers to non-carriers for all available UKB phenotypes. I have an output file that lists association test results for each of these tests, with associated beta, pvalue.

My questions are

  1. how can I convert the individual phenotypes to groups under related phecodes, such as I see in your plots on PheWeb instances (e.g. you have phenotypes color-coded / categorized into "infectious diseases","neoplams","neurological","circulatory system", etc.)?

    • Can this grouping be done for all phenotypes or only those with ICD codes?
    • In the TOPMED PheWeb instance, it says, for example, there were 1419 "broad" phecodes - how do they establish this, and how can I group my output tests to these broad phecodes?
  2. Could you please point me to code (preferably R code within PheWeb) that allows color-coded plotting of a 'phewas' manhattan coded by the groups I mentioned above?

Thank you so much for fielding my fairly naive questions!

Vamsee

@ttbek
Copy link

ttbek commented Feb 23, 2023

For question 1. The groups are made based on the 'category' variable you can include in the pheno-list.json, see step 4 in the README file. They just need to be strings, the names don't need to be ICD codes. I find it easiest to get my pheno-list.json by making a .csv file first and then doing the conversion. They show how this is done as the 1st of the 'other' methods to create the pheno-list.json https://github.com/statgen/pheweb/blob/df1530809e0821b53dd5feb1e405277d1a74c9bc/etc/detailed-loading-instructions.md#making-pheno-listjson TOPMED decides that however they want, ask them directly I suppose.

For 2, I think you're stuck with python for Pheweb, I think the section you would want to start with is https://github.com/statgen/pheweb/blob/df1530809e0821b53dd5feb1e405277d1a74c9bc/pheweb/load/manhattan.py

There is R code for that could be modified for this, just not in Pheweb as far as I know.

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