How do I make a custom endpoint?
Last updated
Was this helpful?
Last updated
Was this helpful?
Whether you are a clinician or an analyst, you might have a specific disorder of interest for which you would like to create an endpoint using your own criteria and be able to use that endpoint for downstream analyses. This is, in fact, very straightforward in FinnGen! However, we recommend that you first take a look at the to see if there already is an endpoint that suits your needs.
If you found the endpoint that you are interested in from Risteys, keep in mind that in FinnGen we have . are run only on core endpoints, so if your endpoint is a core endpoint, great! It already has PheWas results you can view in the , and you only need to follow that link to view and download its summary statistics. If the Risteys or PheWeb browsers are new to you, please take look at sections and .
However, if you're interested in a non-core endpoint or if you didn't find your favourite endpoint anywhere in , you can still create your own endpoint or run your own by following these instructions.
First, you should decide what your criteria are. How you would like to define your endpoint, and how specific would you like it to be?
Which do you wish to use?
Which from the Health Registers do you wish to use?
If you are not familiar with Finnish National Health Registers and the register codes used in them, see sections and .
We recommend selecting register codes with help of medical professionals, who better understand how codes are used and how register data was collected for specific codes.
It is especially important to understand explicitly . Some register codes are Finnish-specific, meaning that they differ from their corresponding international codes, so it's important to check that you are using the correct codes from the correct code sets. For example, Finnish versions of ICD-// are not the same as the US clinical versions, nor do they map exactly to the (although the Finnish versions do extend and modify the WHO versions). Take a look at the section to find out where you can find code translation files if you aren't comfortable in Finnish. From those files you can find the condition(s) you are interested in, and the codes that map on to them.
Launch Atlas by going to the Applications menu in Sandbox and selecting FinnGen > Atlas.
Hilmo inpatient data and specialist outpatient data
Primary care data
KELA drug purchases and reimbursement data
Cancer register data
Cause of death register data
When you are certain about what registers and register codes you would like to use to define your endpoint, you can create your custom endpoint using , or by using R in the Sandbox if you prefer (and have more experience).
In the section you can find detailed instructions on defining your case and control cohorts for analysis. These cohorts can then be used to define an endpoint, and you can run, for example, a GWAS using FinnGen's or tool to analyse them.
When using Atlas for creating an endpoint, you can use registers that are in the found in . are not yet implemented for use by Atlas, and thus if you wish to use them you will have to use R.
For more information, see the section . See also researchers are conducting in the Sandbox with the FinnGen data.
Creating an endpoint using will require some programming skills and experience using R. We have and that can help you with this in /finngen/library-green/scripts/code_snippets
. The section shows several example commands that you can use. Though this will require more effort, after you've created an endpoint successfully, you can run any analyses you like with it (see ). Also be careful using R to select not only the codes of interest but also the code set - e.g. in ICD10 F29 = psychosis but in the ICPC2 code set F29 = eye discomfort.