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 84606d5 commit 2c52c72
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
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
```
1 change: 0 additions & 1 deletion tstrait/simulate_effect_size.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import numbers
from dataclasses import dataclass

import numpy as np
Expand Down

0 comments on commit 2c52c72

Please sign in to comment.