PharmGKB / PharmCAT

The Pharmacogenomic Clinical Annotation Tool
Mozilla Public License 2.0
120 stars 39 forks source link

Adding Genes to Pharmcat Report #145

Open pbrennan-mvz opened 1 year ago

pbrennan-mvz commented 1 year ago

Feature

Pharmcat only reports on select genes

Our team would like to use pharmcat, but have a more extensive list of pharmaco genes. We would like these genes to make it into the final report.

We see that there are a select list of variants and drugs that are able to be reported using pharmcat. The gene and drug infromation seems to be listed in json files with these directories.

src/main/resources/org/pharmgkb/pharmcat/phenotype src/main/resources/org/pharmgkb/pharmcat/guidelines

I would like pharmcat to allow for reporting of the following genes:

abcb1, aldh2, cyp1a2, cyp2c8, f2, f5, grik4, mthfr, bche

In these genes, we are interested in reporting these specific variants:

<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns="http://www.w3.org/TR/REC-html40">

gene | rs_id | grc38_coordinates:REF>ALT -- | -- | -- abcb1 | rs1045642 | 87509329:G>A abcb1 | rs1128503 | 87550285:G>A abcb1 | rs2032582 | 87531302:C>A abcb1 | rs3213619 | 87600877:A>G, aldh2 | rs671 | 111803962:G>A, cyp1a2 | rs12720461 | 74749010:C>T cyp1a2 | rs2069514 | 74745879:G>A cyp1a2 | rs56107638 | 74753271:G>A,C cyp1a2 | rs762551 | 74749576:C>A cyp2c8 | rs10509681 | 95038992:T>C cyp2c8 | rs1058930 | 95058362:G>C cyp2c8 | rs11572080 | 95067273:C>T cyp2c8 | rs11572103 | 95058349:T>A cyp2c8 | rs72558195 | 95064886:G>A cyp2c8 | rs72558195 | 95064886:G>C cyp2c8 | rs72558196 | 95067213:GT>G f2 | rs1799963 | 46739505:G>A f5 | rs6025 | 169549811:C>T grik4 | rs1954787 | 120792654:T>C mthfr | rs1801131 | 11794419:T>G mthfr | rs1801133 | 11796321:G>A bche |   | c.209A>G bche |   | c.1615A>G

Is it possible for the Pharmcat team to support these genes and variants so they make it into the final report? If not, do you have recommendations for how best for us to add it ourselves? Would it be as simples as adding the necessary .json files to the src/main/resources/org/pharmgkb/pharmcat/phenotype and src/main/resources/org/pharmgkb/pharmcat/guidelines directories?

Thank you for your help!

markwoon commented 1 year ago

Can I confirm that you are interested in adding custom recommendations in addition to or instead of the existing PGx recommendations?

pbrennan-mvz commented 1 year ago

You are correct. We are interested in adding the above genes/variants to the existing PGx recommendations.

markwoon commented 1 year ago

I'm sorry, but how do you intend to add genes/variants to the existing PGx recommendations?

Adding extra genes won't change the recommendations. Adding extra variants could change the diplotype that gets called, but still won't really change the recommendations (i.e. if the same diplotype gets called, you get the same recommendation, but if the added variation yields a completely different named allele that the recommendation doesn't take into account, you just get no recommendation).

I'm trying to understand your use case. If you want PharmCAT to give a diplotype for a gene, adding genes/variants would make a difference. However, that would not impact the existing recommendations

pbrennan-mvz commented 1 year ago

I apologize -- I think my comment above was unclear.

It is my understanding that variants in certain genes (for example, abcb1) do not get reported in the pharmcat HTML report even if they are present in the VCF file. Even if there is not a PGx recommendation, we are still interested in reporting the genes/variants from the list I provided. So my question is how can I ensure that our list of additional genes/variants make it into the HTML report?

I was curious if Pharmcat could support something like this? For example, we could pass our list of additional variants, and then those variant could make it into the Pharmcat HTML report? If a variant did not have any recommendations, then the field could just be blank or N/A.

Let me know if this sort of feature is possible to add or if it is outside the scope of Pharmcat. Thanks!

markwoon commented 1 year ago

This is definitely possible. However, we don't have the bandwidth to easily support this right now.

To add support for additional genes, you would need to create a custom xxx_translation.json where xxx is the name of the gene in org.pharmgkb.pharmcat.definition.alleles.

The trickier part is to update all the other files that depends on this. You'll have to take a look at DataManager for details on what needs to happen. This class is responsible for pulling all the data PharmCAT needs and packaging it for use by PharmCAT. The short version is that you need to update the pharmcat_positions.vcf files.

Bioinf-usr commented 6 months ago

Hello,

I have the similar request. I would like to use pharmcat purely for annotation purpose not for star allele calling. Then how can we add our custom annotations related to that gene? I mean, instead of CPIC or DPWG if we want to use our custom sources of recommendations as well.

Please let me know if it's unclear.

Thank you.

markwoon commented 6 months ago

I have the similar request. I would like to use pharmcat purely for annotation purpose not for star allele calling.

If that's the case you would only need to use the Reporter.

Then how can we add our custom annotations related to that gene? I mean, instead of CPIC or DPWG if we want to use our custom sources of recommendations as well.

You would need to add your custom recommendation data.

You can see the existing ones at https://github.com/PharmGKB/PharmCAT/tree/development/src/main/resources/org/pharmgkb/pharmcat/reporter/guidelines.

Unfortunately we don't have the bandwidth to support this directly other than pointing you in the right direction.

Bioinf-usr commented 6 months ago

Understood, thank you for pointing in the right direction. Once we add our custom jsons, I would assume we need to change the part of the code that reads these json files as well?

whaleyr commented 6 months ago

@Bioinf-usr Only if you change the schema. You may run into problems when you specify a different source for the DosingGuideline because that value is used to determine which phenotype translation data to use since different sources can use different phenotypes.

Again, you'll be on your own if you want to customize that part of the code. We don't have the resources to properly build out user-customization of that data or to spend a lot of time teaching others how to customize it themselves.