To compose a gene detail page, you can combine information from the following set of endpoints:
Let's say you want to compose a gene detail page for the gene BRCA1.
/open-target-gene/
Get non-personalized details about the gene itself. Refer to the endpoint for more details.
Example Request
GET https://selfdecode.com/service/b2b-integrations/open-target-gene/?slug=BRCA1
Example Response
[
{
"slug": "BRCA1",
"open_target_description": "BRCA1 DNA repair associated [Source:HGNC Symbol;Acc:HGNC:1100]",
"sd_description": "<p>BRCA1 is a tumor suppressor gene and is responsible for DNA repairs as well as playing a role in transcription and recombination (<a href=\"http://www.ncbi.nlm.nih.gov/gene/672\">R</a>). </p>\r\n\r\n<p>Mutations in this gene can cause breast or ovarian cancer (<a href=\"http://www.ncbi.nlm.nih.gov/gene/672\">R</a>). </p>\r\n\r\n<p>Researchers have identified more than 1,800 mutations in the BRCA1 gene. Many of these mutations are associated with an increased risk of breast cancer in both men and women, as well as several other types of cancer. These mutations are present in every cell in the body and can be passed from one generation to the next. As a result, they are associated with cancers that cluster in families. However, not everyone who inherits a mutation in the BRCA1 gene will develop cancer. Other genetic, environmental, and lifestyle factors also contribute to a person's cancer risk. Most BRCA1 gene mutations lead to the production of an abnormally short version of the BRCA1 protein or prevent any protein from being made from one copy of the gene. As a result, less of this protein is available to help repair damaged DNA or fix mutations that occur in other genes. As these defects accumulate, they can trigger cells to grow and divide uncontrollably to form a tumor. ovarian cancer Many of the same BRCA1 gene mutations that increase the risk of breast cancer (described above) also increase the risk of ovarian cancer. Families with these mutations are often said to be affected by hereditary breast and ovarian cancer syndrome. Women with BRCA1 gene mutations have a 35 to 60 percent chance of developing ovarian cancer in their lifetimes, as compared with 1.6 percent in the general population. prostate cancer At least five inherited BRCA1 gene mutations have been found to increase the risk of prostate cancer. These mutations likely reduce the BRCA1 protein's ability to repair DNA, allowing potentially damaging mutations to persist in various other genes. The accumulation of damaging mutations can lead to the out-of-control cell growth and division that can cause a tumor to develop. Men who carry a BRCA1 gene mutation that increases the risk of prostate cancer may also be at increased risk for other cancers. other cancers Inherited mutations in the BRCA1 gene also increase the risk of several other types of cancer, including pancreatic cancer and colon cancer. These mutations impair the ability of the BRCA1 protein to help repair damaged DNA. As defects accumulate in DNA, they can trigger cells to grow and divide without order to form a tumor. It is not clear why different individuals with BRCA1 mutations develop cancers in different organs. Environmental factors that affect specific organs may contribute to the development of cancers at particular sites.</p>\r\n\r\n<p>The BRCA1 gene provides instructions for making a protein that acts as a tumor suppressor. Tumor suppressor proteins help prevent cells from growing and dividing too rapidly or in an uncontrolled way. The BRCA1 protein is involved in repairing damaged DNA. In the nucleus of many types of normal cells, the BRCA1 protein interacts with several other proteins to mend breaks in DNA. These breaks can be caused by natural and medical radiation or other environmental exposures, and they also occur when chromosomes exchange genetic material in preparation for cell division. By helping to repair DNA, the BRCA1 protein plays a critical role in maintaining the stability of a cell's genetic information. Research suggests that the BRCA1 protein also regulates the activity of other genes and plays an essential role in embryonic development. To carry out these functions, the BRCA1 protein interacts with many other proteins, including other tumor suppressors and proteins that regulate cell division.</p>",
"sd_summary": "<p style=\"text-align:justify\">The <em>BRCA1</em> gene codes for BRCA1 DNA repair-associated (BRCA1). BRCA1 is a tumor suppressor [<a href=\"https://medlineplus.gov/genetics/gene/brca1/\">R</a>]. </p>\r\n\r\n<p style=\"text-align:justify\">It helps suppress tumors by:</p>\r\n\r\n<ul>\r\n\t<li style=\"text-align:justify\">Repairing DNA damage (caused by radiation or chemical exposure) [<a href=\"https://pubmed.ncbi.nlm.nih.gov/18171670/\">R</a>, <a href=\"https://www.ncbi.nlm.nih.gov/pmc/articles/PMC2678481/\">R</a>]</li>\r\n\t<li style=\"text-align:justify\">Stopping the cell cycle to prevent passing damaged DNA to new cells [<a href=\"https://www.ncbi.nlm.nih.gov/pmc/articles/PMC1390683/\">R</a>, <a href=\"https://pubmed.ncbi.nlm.nih.gov/11836499/\">R</a>, <a href=\"https://pubmed.ncbi.nlm.nih.gov/10550055/\">R</a>, <a href=\"https://pubmed.ncbi.nlm.nih.gov/10644742/\">R</a>]</li>\r\n\t<li style=\"text-align:justify\">Regulating the production and activity of proteins implicated in cancer [<a href=\"https://www.ncbi.nlm.nih.gov/pmc/articles/PMC1083733/\">R</a>, <a href=\"https://www.ncbi.nlm.nih.gov/pmc/articles/PMC19361/\">R</a>, <a href=\"https://www.ncbi.nlm.nih.gov/pmc/articles/PMC3240576/\">R</a>, <a href=\"https://pubmed.ncbi.nlm.nih.gov/10943845/\">R</a>, <a href=\"https://www.ncbi.nlm.nih.gov/pmc/articles/PMC3446364/\">R</a>, <a href=\"https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4012741/\">R</a>]</li>\r\n</ul>\r\n\r\n<p style=\"text-align:justify\"><em>BRCA1</em> polymorphisms have been linked to various forms of cancer, including [<a href=\"https://www.mayoclinic.org/tests-procedures/brca-gene-test/about/pac-20384815\">R</a>]:</p>\r\n\r\n<ul>\r\n\t<li style=\"text-align:justify\">Breast cancer</li>\r\n\t<li style=\"text-align:justify\">Ovarian cancer</li>\r\n\t<li style=\"text-align:justify\">Prostate cancer</li>\r\n\t<li style=\"text-align:justify\">Pancreatic cancer</li>\r\n</ul>",
"sd_ghr_function": "<p>The BRCA1 gene provides instructions for making a protein that acts as a tumor suppressor. Tumor suppressor proteins help prevent cells from growing and dividing too rapidly or in an uncontrolled way.</p>\r\n\r\n<p> </p>\r\n\r\n<p>The BRCA1 protein is involved in repairing damaged DNA. In the nucleus of many types of normal cells, the BRCA1 protein interacts with several other proteins to mend breaks in DNA. These breaks can be caused by natural and medical radiation or other environmental exposures, and they also occur when chromosomes exchange genetic material in preparation for cell division. By helping to repair DNA, the BRCA1 protein plays a critical role in maintaining the stability of a cell's genetic information.</p>\r\n\r\n<p> </p>\r\n\r\n<p> </p>\r\n\r\n<p>Research suggests that the BRCA1 protein also regulates the activity of other genes and plays an essential role in embryonic development. To carry out these functions, the BRCA1 protein interacts with many other proteins, including other tumor suppressors and proteins that regulate cell division.</p>\r\n\r\n<p> </p>",
"sd_recommendation": "<p><span style=\"font-size:14px\"><strong>How to increase active BRCA1 levels:</strong></span></p>\r\n\r\n<ul>\r\n\t<li>Increase Selenium intake [<a href=\"http://cebp.aacrjournals.org/content/14/5/1302.short\">R</a>][<a href=\"http://cebp.aacrjournals.org/content/18/11/2923.short\">R</a>].</li>\r\n\t<li>Increase DHA intake <span style=\"background-color:#ffffff; color:#505050; font-family:arial; font-size:16px\">[</span><a href=\"https://www.spandidos-publications.com/or/17/4/713/download\" style=\"text-decoration:none;\"><u>R</u></a><span style=\"background-color:#ffffff; color:#505050; font-family:arial; font-size:16px\">]. </span></li>\r\n</ul>"
}
]
/open-target-snp-summary/
Get non-personalized details about the SNPs associated with the gene. It would return a paginated response. Refer to the endpoint for details about handling pagination and what each field in the response means.
Example Request
GET https://selfdecode.com/service/b2b-integrations/open-target-snp-summary/?gene_slug=BRCA1
Example Response
{
"count": 19862,
"next": "https://selfdecode.com/service/health-analysis/genes/open-target-snp-summary/?gene_slug=BRCA1&page=2",
"previous": null,
"results": [
{
"rsid": "rs16941",
"alts": [
"C" // frequency of this alt allele maps to frequency_tables[0], and it's variant ID is found at variant_ids[0] (linear mapping)
],
"variant_ids": [
"17_43092418_T_C"
],
"frequency_tables": [
{
"gnomad_afr": 0.1731830726770929,
"gnomad_amr": 0.30851063829787234,
"gnomad_asj": 0.3137931034482759,
"gnomad_eas": 0.36726804123711343,
"gnomad_fin": 0.39314516129032256,
"gnomad_nfe": 0.3398310591293047,
"gnomad_oth": 0.3701657458563536,
"gnomad_nfe_est": 0.3502183406113537,
"gnomad_nfe_nwe": 0.33399440037330846,
"gnomad_nfe_onf": 0.3428705440900563,
"gnomad_nfe_seu": 0.3018867924528302
}
],
"overall_score": 0.382367758186398,
"gene_slug": "BRCA1"
},
{
"rsid": "rs16942",
"alts": [
"C"
],
"variant_ids": [
"17_43091983_T_C"
],
"frequency_tables": [
{
"gnomad_afr": 0.22672948747414387,
"gnomad_amr": 0.31485849056603776,
"gnomad_asj": 0.3137931034482759,
"gnomad_eas": 0.3664516129032258,
"gnomad_fin": 0.39337175792507206,
"gnomad_nfe": 0.33876623376623377,
"gnomad_oth": 0.3756906077348066,
"gnomad_nfe_est": 0.34969458987783597,
"gnomad_nfe_nwe": 0.3325169115931887,
"gnomad_nfe_onf": 0.34222846441947563,
"gnomad_nfe_seu": 0.3018867924528302
}
],
"overall_score": 0.382367758186398,
"gene_slug": "BRCA1"
},
...
]
}
/genotype/
Get personalized genotype information for your profile against the SNPs (rsIDs) associated with the gene under consideration. Extract the rsids from the above response, and use them as input to this endpoint. For more details about what each field in the response means, refer to the endpoint.
Example Request
Example Response
[
{
"profile_id": "91997a8b-f8d8-4a02-b207-25c7258ba6ee",
"rsid": "rs16941",
"genotypes": [
"C", // its variant ID is found at variant_ids[0] (linear mapping)
"T"
],
"variant_ids": [
"17_43092418_T_C",
"ref" // because "T" is the reference allele
]
},
{
"profile_id": "91997a8b-f8d8-4a02-b207-25c7258ba6ee",
"rsid": "rs16942",
"genotypes": [
"C",
"T"
],
"variant_ids": [
"17_43091983_T_C",
"ref"
]
},
...
]
Illustration
For illustrative purposes, let's refer to the response from
/open-target-gene/asgenes/open-target-snp-summary/assnps/genotype/asgenotypes
Below is an illustration of a gene detail page, along with annotations of how each element in the UI relates to the fields returned from the three endpoints.

Gene Detail Page for BRCA1 Gene
Personalized Frequency for SNPs (Optional)
If you're interested in computing the personalized frequency of a SNP for a profile's genotype, as shown in the illustration above, you'll have to rely on some extra computation. Personalized frequency of a SNP is the frequency of the profile's genotype for that SNP, among the ethnicity of the profile.
Let's consider the first entry in the SNP table in the illustration above, with rsID rs16941 that has a frequency of 24%. To obtain that frequency value, three sources were used, namely:
- Profile
ethnicityobtained fromGET /profile/endpoint for the desired profile. genotypes[0]["genotypes"]snps["results"][0]["frequency_tables"]andsnps["results"][0]["alts"]
Profile ethnicity mapping to Open Targets' ethnicities
Here's how the profile ethnicities returned from the /profile/ endpoint map to profile ethnicities in the frequency_tables:
| Profile ethnicity from GET /profile/ | Ethnicity from frequency_tables |
|---|---|
| East Asian | gnomadEas |
| African American | gnomadAfr |
| Latino (e.g. Mexican, Peruvian, Colombian) | gnomadAmr |
| White or European | gnomadNfe |
| Native American | gnomadAmr |
| Other | gnomadOth |
| Sub-Saharan African | gnomadAfr |
| Ashkenazi Jewish | gnomadAsj |
| Middle Eastern (eg. Arab, Turkish, Persian, or Non-Ashkenazi Jewish) | gnomadEas |
| Central Asian (e.g. Kazakh, Kyrgyz, Afghan) | gnomadEas |
| South Asian (e.g. Indian, Pakistani, Bangladeshi, Nepali) | gnomadEas |
| Southeast Asian (e.g. Indonesian, Thai, Khmer) | gnomadEas |
| Filipino, Polynesian (including Hawaiian), or Malagasy | gnomadEas |
| Melanesian (e.g. Indigenous Australian, Papuan, Fijian | gnomadEas |
The profile under consideration for this example has the ethnicity South Asian (e.g. Indian, Pakistani, Bangladeshi, Nepali) which maps to gnomadEas.
Profile genotype for SNP rs16941
rs16941The profile also carries the "C" and "T" genotypes for the SNP as obtained from genotypes[0]["genotypes"]:
{
"profile_id": "91997a8b-f8d8-4a02-b207-25c7258ba6ee",
"rsid": "rs16941",
"genotypes": [
"C", // profile carries the alt allele, maps to variant_ids[0]
"T" // profile also carries the ref allele, maps to variant_ids[1]
],
"variant_ids": [
"17_43092418_T_C",
"ref"
]
}
Interpreting frequency table for SNP rs16941
rs16941The frequency table for the C allele, as shown in the example response of /open-target-snp-summary/ above is:
{
"gnomad_afr": 0.1731830726770929,
"gnomad_amr": 0.30851063829787234,
"gnomad_asj": 0.3137931034482759,
"gnomad_eas": 0.36726804123711343,
"gnomad_fin": 0.39314516129032256,
"gnomad_nfe": 0.3398310591293047,
"gnomad_oth": 0.3701657458563536,
"gnomad_nfe_est": 0.3502183406113537,
"gnomad_nfe_nwe": 0.33399440037330846,
"gnomad_nfe_onf": 0.3428705440900563,
"gnomad_nfe_seu": 0.3018867924528302
}
gnomad_eas has a frequency of 0.36726804123711343 for the alt allele C.
The frequency of the ref allele, i.e. T in this case, would always be 1 - (sum of frequency of all alt alleles). Since there is only one alt allele for rs16941, frequency of T for the profile would be. 1 - 0.36726804123711343 = 0.63273195876.
Calculating frequency specific to the profile
The frequency of the pair of genotypes that the profile has, i.e. C and T would be a product of frequency of C and T, i.e. 0.36726804123711343 x 0.63273195876 = 0.23238222712 which rounds up to 24%.
Had the profile's genotype been C, C (containing both alt alleles), the frequency would have been 0.36726804123711343^2 and had it been T, T (containing both ref alleles), the frequency would have been 0.63273195876^2.
