pheweb icon indicating copy to clipboard operation
pheweb copied to clipboard

Phecodes

Open vkp3 opened this issue 4 years ago • 1 comments

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

vkp3 avatar Oct 26 '21 00:10 vkp3

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.

ttbek avatar Feb 23 '23 18:02 ttbek