Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
xin-huang committed May 30, 2024
1 parent 9c86892 commit 651a015
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 6 deletions.
14 changes: 8 additions & 6 deletions docs/userguide/stat.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,23 +16,25 @@ The output files from the above commands can be found in the `bootstrapping_syn`

## Confidence interval estimation

To estimate the confidence intervals for the demographic parameters, users can use
After obtaining bootstrapped spetra, users can estimate the confidence intervals for the demographic or DFE parameters.

For our [demographic inference example](https://dadi-cli.readthedocs.io/en/revision/userguide/demog/), users can use the following command to estimate the confidence intervals for the demographic parameters:

```
dadi-cli StatDM --fs ./examples/results/fs/1KG.YRI.CEU.20.synonymous.snps.unfold.fs --model split_mig --demo-popt ./examples/results/demog/1KG.YRI.CEU.20.split_mig.demog.params.InferDM.bestfits --grids 60 80 100 --bootstrapping-dir ./examples/results/fs/bootstrapping_syn/ --output ./examples/results/stat/1KG.YRI.CEU.20.split_mig.bestfit.demog.params.godambe.ci
dadi-cli StatDM --fs examples/results/fs/1KG.YRI.CEU.20.syn.unfolded.fs --model split_mig --demo-popt examples/results/demog/1KG.YRI.CEU.20.split_mig.demog.params.InferDM.bestfits --grids 60 80 100 --bootstrapping-dir examples/results/fs/bootstrapping_syn/ --output examples/results/stat/1KG.YRI.CEU.20.split_mig.bestfit.demog.params.godambe.ci
```

To estimate the confidence intervals for the joint DFE parameters, users can use
For our [DFE inference example](https://dadi-cli.readthedocs.io/en/revision/userguide/dfe/), users can use the following command to estimate the confidence intervals for the 1d DFE parameters:

```
dadi-cli StatDFE --fs ./examples/results/fs/1KG.YRI.CEU.20.nonsynonymous.snps.unfold.fs --dfe-popt ./examples/results/dfe/1KG.YRI.CEU.20.split_mig.dfe.1D_lognormal.params.InferDFE.bestfits --cache1d ./examples/results/caches/1KG.YRI.CEU.20.split_mig.sel.single.gamma.spectra.bpkl --pdf1d lognormal --bootstrapping-nonsynonymous-dir ./examples/results/fs/bootstrapping_non/ --bootstrapping-synonymous-dir ./examples/results/fs/bootstrapping_non/ --output ./examples/results/stat/1KG.YRI.CEU.20.split_mig.bestfit.dfe.1D_lognormal.params.godambe.ci
dadi-cli StatDFE --fs examples/results/fs/1KG.YRI.CEU.20.non.unfolded.fs --dfe-popt examples/results/dfe/1KG.YRI.CEU.20.split_mig.dfe.1D_lognormal.params.InferDFE.bestfits --cache1d examples/results/caches/1KG.YRI.CEU.20.split_mig_sel_single_gamma.spectra.bpkl --pdf1d lognormal --bootstrapping-nonsynonymous-dir examples/results/fs/bootstrapping_non/ --bootstrapping-synonymous-dir examples/results/fs/bootstrapping_non/ --output examples/results/stat/1KG.YRI.CEU.20.split_mig.bestfit.dfe.1D_lognormal.params.godambe.ci
```

Three different step sizes are tested when using the GIM. Ideally 95% confidence intervals will be consistent between step sizes.

## Arguments

For the `StatDM` subcommand:
### `StatDM`

| Argument | Description |
| - | - |
Expand All @@ -48,7 +50,7 @@ For the `StatDM` subcommand:
| `--bootstrapping-dir` | Directory containing boostrapping spectra. |
| `--logscale` | Determine whether estimating the uncertainties by assuming log-normal distribution of parameters; Default: False. |

For the `StatDFE` subcommand:
### `StatDFE`

| Argument | Description |
| - | - |
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
Estimated 95% uncerts (theta adj), with step size 0.1): [0.0652234 0.01448371 0.02478827 0.07938722 0.00287734]
Lower bounds of 95% confidence interval : [2.16878752 0.50740874 0.26407614 1.13594438 0.01764644]
Upper bounds of 95% confidence interval : [2.29923431 0.53637617 0.31365269 1.29471882 0.02340113]

Estimated 95% uncerts (theta adj), with step size 0.01): [0.07667109 0.02254708 0.02647544 0.07385703 0.00264314]
Lower bounds of 95% confidence interval : [2.15733983 0.49934538 0.26238897 1.14147457 0.01788065]
Upper bounds of 95% confidence interval : [2.310682 0.54443953 0.31533986 1.28918863 0.02316693]

Estimated 95% uncerts (theta adj), with step size 0.001): [0.05868048 0.00972338 0.00409709 0.01693387 0.00291598]
Lower bounds of 95% confidence interval : [2.17533044 0.51216908 0.28476733 1.19839773 0.0176078 ]
Upper bounds of 95% confidence interval : [2.2926914 0.53161583 0.29296151 1.23226547 0.02343977]

Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
Estimated 95% uncerts (theta adj), with step size 0.1): [4.96117706e+00 9.75414635e+00 7.45526698e-03]
Lower bounds of 95% confidence interval : [ 0.74663106 -1.81945177 0.00901819]
Upper bounds of 95% confidence interval : [10.66898517 17.68884093 0.02392873]

Estimated 95% uncerts (theta adj), with step size 0.01): [0.43131608 0.913255 0.0019672 ]
Lower bounds of 95% confidence interval : [5.27649204 7.02143958 0.01450626]
Upper bounds of 95% confidence interval : [6.1391242 8.84794958 0.01844066]

Estimated 95% uncerts (theta adj), with step size 0.001): [0.07007612 0.18519903 0.00193263]
Lower bounds of 95% confidence interval : [5.637732 7.74949554 0.01454083]
Upper bounds of 95% confidence interval : [5.77788423 8.11989361 0.01840609]

0 comments on commit 651a015

Please sign in to comment.