Skip to content

Commit

Permalink
DOC: Minor changes
Browse files Browse the repository at this point in the history
Minor changes to documentation
  • Loading branch information
daikitag authored and mergify[bot] committed Dec 4, 2023
1 parent 7b7af67 commit fdd1a81
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 16 deletions.
7 changes: 2 additions & 5 deletions docs/effect-size.md
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,6 @@ a normal distribution trait model with 1,000 causal sites.
```{code-cell}
import matplotlib.pyplot as plt
model = tstrait.trait_model(distribution="normal", mean=0, var=1)
trait_df = tstrait.sim_trait(ts, num_causal=1000, model=model, random_seed=1)
trait_df.head()
Expand Down Expand Up @@ -238,8 +237,8 @@ frequency dependent model.

The frequency dependence architecture is still an ongoing research topic. While the
frequency dependence model can be used for any trait models in tstrait, it is
suggested that you use the normal distribution with mean 0 as a trait model and
`alpha` to be -1/2 to conduct simulations that are widely used in
suggested that you use the trait model with mean 0 and `alpha` to be -1/2 to conduct
simulations that are widely used in
simulation-based research projects (See
[Speed et al. (2017)](https://doi.org/10.1038/ng.3865) for details).

Expand All @@ -266,8 +265,6 @@ it in your trait simulation.

```{code-cell}
import matplotlib.pyplot as plt
# trait.sim_trait(ts, num_causal=1000, model=model, random_seed=1)
# also works here
trait_df = tstrait.sim_trait(ts, num_causal=1000, model=model,
Expand Down
8 changes: 4 additions & 4 deletions docs/environment.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,10 +122,10 @@ there are several options available for the user.

### Simulating from the output of {py:func}`genetic_value`

The output of {py:func}`genetic_value` only includes genetic values, and it doesn't
simulate environmental noise. For example, if the user wants to simulate
environmental noise from a normal distribution with mean 0 and variance 1, it
would be possible to run the following code:
The output of {py:func}`genetic_value` only includes relevant information regarding
genetic values, and it doesn't simulate environmental noise. For example, if the
user wants to simulate environmental noise from a normal distribution with mean 0
and variance 1, it would be possible to run the following code:

```{code-cell}
Expand Down
3 changes: 1 addition & 2 deletions docs/genetic.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,7 @@ After this genetic value page, you will be able to:

Genetic value is computed in tstrait by using the trait information in the input trait dataframe.
It uses a tree traversal algorithm to count the number of causal allele in each individual and adds
the corresponding effect size to individual's genetic value depending on the presence of causal
mutation in that individual.
the corresponding effect size to individual's genetic value.

## Input

Expand Down
4 changes: 3 additions & 1 deletion docs/multi-trait.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ import numpy as np
model = tstrait.trait_model(
distribution="multi_normal", mean=np.zeros(2), cov=np.eye(2)
)
model.name
model.num_trait
```

Expand Down Expand Up @@ -87,6 +86,9 @@ sim_result = tstrait.sim_phenotype(
)
sim_result.phenotype
```

```{code-cell}
sim_result.trait
```

Expand Down
6 changes: 2 additions & 4 deletions docs/quick-start.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@ Simulated traits from {func}`sim_phenotype` can be extracted through `.trait`.
```{code-cell}
trait_df = sim_result.trait
trait_df.columns
trait_df.head()
```

Expand All @@ -116,9 +115,8 @@ Simulated phenotypes from {func}`sim_phenotype` can be extracted through `.pheno

```{code-cell}
phenotype_df = sim_result.phenotype
phenotype_df.columns
phenotype_df.head()
phenotype_df = sim_result.phenotype
phenotype_df.head()
```

The `phenotype_df` is a {class}`pandas.DataFrame` object that includes the following 5 columns:
Expand Down

0 comments on commit fdd1a81

Please sign in to comment.