# Conditional analysis

In addition to fine-mapping, a more robust way is to use **stepwise forward selection** (also called **iterative conditioning**, or **conditional analysis**) to build iteratively a set *S* of SNPSs based on an initial "seed" variant, it usually being the lead variant (lowest pval) of a certain region. The next step is to perform a regular analysis where now variants in *S* are treated as covariates. If the new lead variant is significant, it's added to *S* and the analysis is repeated as long as lead variants remain within significance. This approach was made popular by [GCTA](https://cnsgenomics.com/software/gcta/#Overview)’s Conditional & joint (COJO) analysis of GWAS results.\
\
The algorithm works as follows:

```
initially S is empty
repeat until all P-values outside S are > threshold
  add SNP with the lowest P-value to S
  update P-values of all SNPs 'l' outside S using joint model Y ~ X.S + X.l
end repeat
```


---

# 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/background-reading/conditional-analysis.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.
