Skip to content

Commit

Permalink
DOC: causal_sites
Browse files Browse the repository at this point in the history
Add documentation for causal_sites input
  • Loading branch information
daikitag committed Dec 4, 2023
1 parent 77b4897 commit 0b53c78
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions docs/effect-size.md
Original file line number Diff line number Diff line change
Expand Up @@ -296,3 +296,22 @@ plt.show()

We see that rarer variants have increased effect sizes, as expected from
the mathematical expression given in [](eq:freq-dep).

(trait_causal_sites)=

## Specifying Causal Sites

Instead of specifying the number of causal sites, users can directly provide the
causal sites as an input of {py:func}`sim_phenotype` and {py:func}`sim_trait`.
When `causal_sites` argument of these functions are provided, tstrait will use
the inputted site IDs as causal sites, instead of randomly selecting causal
site IDs.

Example:

```{code-cell}
trait_df = tstrait.sim_trait(ts, causal_sites=[0, 3, 4], model=model,
alpha=-1/2, random_seed=1)
trait_df
```

0 comments on commit 0b53c78

Please sign in to comment.