# Custom GWAS tools

### Trade-offs of different methods

We provide a number of methods that enable you to run GWAS for your custom endpoint(s). This table describes the trade-offs of different methods. All methods use [REGENIE](/working-in-the-sandbox/running-analyses-in-sandbox/how-to-run-genome-wide-association-studies-gwas/how-to-run-gwas-using-regenie.md). There are also instructions to use [SAIGE](/working-in-the-sandbox/running-analyses-in-sandbox/how-to-run-genome-wide-association-studies-gwas/how-to-run-gwas-using-saige.md) available, but since DF7 we have moved to use REGENIE, and SAIGE has not been supported similarly since.

#### The fastest way to get results calculated

The easiest way to get results calculated and out of the sandbox is to use the methods in the first 2 rows - these methods enable the summary statistics to be automatically put into the green bucket and [user.results pheweb browser](https://userresults.finngen.fi).

If you want to browse your results outside of sandbox, the 2 lower methods require that you request to have results downloaded, which can take more time especially off-hours Helsinki time. These methods also require a bit more coding skills. Using these methods, however, you are able to modify some parameters in your job, e.g. covariates.

| Category    | Methods Available                | Running time                                                     | Cost                                                                                                             | When to use                                                                                                           | How to launch                                                        | Viewing your results                                                                                                                           | Pros                                                                                                      | Cons                                                                                         |
| ----------- | -------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- |
| Custom-GWAS | Custom GWAS Command-line version | Usually <24 hours until results in userresults.finngen.fi PheWeb | 20–50€ per GWAS depending on availability in Google Cloud and increases with each DF. Charged to sandbox account | List of FinnGen IDs and case/control status in plink format (can be generated programmatically)                       | From terminal: `finngen-cli request-gwas --help`                     | Results automatically moved to userresults.finngen.fi (outside sandbox). Available for download and further analysis. Whole process \~24 hours | No coding required; results automatically available in PheWeb; fine-mapping can be requested from support | Cannot modify covariates (age, sex, genotyping batch, PC1–10 fixed); only releases 7 onwards |
| Pipelines   | Command line                     | \~8 hours for DF11                                               | Same as above                                                                                                    | Running >5 GWAS; need different covariates or private results; additional analysis steps (e.g., subset summary stats) | From terminal: `finngen-cli request-workflow --help`                 | View and interpret results inside sandbox using R/Python (libraries preinstalled; can request more). To view outside sandbox, download data    | Can modify covariates; can run multiple phenotypes in one job                                             | No automated import to PheWeb; requires coding skills (editing input files)                  |
| Pipelines   | Standard pipelines               | \~8 hours for DF11                                               | Same as above                                                                                                    | Pipeline scalability: submit multiple phenotypes simultaneously using phenotype list                                  | From sandbox menu: Applications > Pipelines > New job from Templates | Same as above                                                                                                                                  | Same as command line pipelines                                                                            | Same as command line pipelines                                                               |

In the subsection below we describe the method you can use to have your results visible in userresults.finngen.fi:

* [Custom GWAS commandline (CLI) tool](/working-in-the-sandbox/which-tools-are-available/untitled/custom-gwas-command-line-cli-tool.md)

And in the subsections here we describe the two other methods you can use to run GWAS for your custom endpoint:

* [REGENIE pipelines using command line](/working-in-the-sandbox/running-analyses-in-sandbox/how-to-run-genome-wide-association-studies-gwas/how-to-run-gwas-using-regenie.md)
* H[ow to use standard pipelines](/working-in-the-sandbox/running-analyses-in-sandbox/pipelines-tool-instructions/how-to-use-the-pipelines-area.md#submit-a-standard-job)

However you can learn more about other additional methods under ["How to create a user-defined endpoint"](/finngen-data-specifics/endpoints/link-to-how-to-make-a-user-defined-endpoint.md).

### Upstream analysis

Before entering GWAS consider investigating your phenotype and genotype cohorts. For further instructions see:

* [General workflows for the most common analyses](/working-in-the-sandbox/general-workflows-for-the-most-common-analyses.md) researchers are conducting with FinnGen data in FinnGen Sandbox
* [Trajectory Visualization tool](/working-in-the-sandbox/which-tools-are-available/trajectory-visualization-tool-tvt.md)
* [Cohort Operations tool](/working-in-the-sandbox/which-tools-are-available/cohort-operations-tool-co.md)

### Downstream analysis

After custom GWAS is conducted you may consider further downstream analyses like

* [How to conduct Finemapping](/working-in-the-sandbox/running-analyses-in-sandbox/how-to-run-finemapping-pipeline.md) to assign a probability that each significant variant at a locus is the causal variant. More [background reading about Finemapping](/background-reading/finemapping.md).
* [Multiple Manhattan Plot](/working-outside-the-sandbox/multiple-manhattan-plot-mmp.md) to compare several GWAS summary statistics.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.finngen.fi/working-in-the-sandbox/which-tools-are-available/untitled.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
