Skip to content

Commit 829f665

Browse files
committed
Fixing grammar, style, wrong links and typos
1 parent 5403640 commit 829f665

8 files changed

Lines changed: 102 additions & 144 deletions

nbs/01-getting_started.ipynb

Lines changed: 13 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -27,16 +27,16 @@
2727
"source": [
2828
"\n",
2929
"\n",
30-
"Python 3.8 is strongly recommended. DABEST has also been tested with Python 3.6 and 3.7.\n",
30+
"Python 3.10 is strongly recommended. DABEST has also been tested with Python 3.6, 3.7 and 3.8.\n",
3131
"\n",
3232
"In addition, the following packages are also required (listed with their minimal versions):\n",
3333
"\n",
34-
"* [numpy 1.22.3](https://www.numpy.org)\n",
34+
"* [numpy 1.22.4](https://www.numpy.org)\n",
3535
"* [scipy 1.9.3](https://www.scipy.org)\n",
36-
"* [matplotlib 3.5.1](https://www.matplotlib.org)\n",
37-
"* [pandas 1.5.0](https://pandas.pydata.org)\n",
36+
"* [matplotlib 3.6.3](https://www.matplotlib.org)\n",
37+
"* [pandas 1.5.3](https://pandas.pydata.org)\n",
3838
"* [seaborn 0.12.2](https://seaborn.pydata.org)\n",
39-
"* [lqrt 0.3](https://github.com/alyakin314/lqrt)\n",
39+
"* [lqrt 0.3.3](https://github.com/alyakin314/lqrt)\n",
4040
"\n",
4141
"To obtain these package dependencies easily, it is highly recommended to download the [Anaconda](https://www.continuum.io/downloads) distribution of Python.\n"
4242
]
@@ -58,8 +58,10 @@
5858
"\n",
5959
"At the command line, run\n",
6060
"\n",
61+
"``` shell\n",
62+
"$ pip install dabest\n",
63+
"```\n",
6164
"\n",
62-
"**$ pip install dabest**\n",
6365
"\n"
6466
]
6567
},
@@ -73,8 +75,9 @@
7375
"Clone the [DABEST-python repo](https://github.com/ACCLAB/DABEST-python) locally (see instructions [here](https://help.github.com/articles/cloning-a-repository/)).\n",
7476
"\n",
7577
"Then, navigate to the cloned repo in the command line and run\n",
76-
"\n",
77-
"**$ pip install**"
78+
"```\n",
79+
"$ pip install .\n",
80+
"```"
7881
]
7982
},
8083
{
@@ -90,9 +93,9 @@
9093
"id": "a9f8cb3e",
9194
"metadata": {},
9295
"source": [
93-
"To test DABEST, you will need to install [pytest](https://docs.pytest.org/en/latest/).\n",
96+
"To test DABEST, you will need to install [pytest](https://docs.pytest.org/en/latest/). \n",
9497
"\n",
95-
"Run ``pytest`` in the root directory of the source distribution. This runs the test suite in ``dabest/tests`` folder. The test suite will ensure that the bootstrapping functions and the plotting functions perform as expected.\n",
98+
"Run ``pytest`` in the root directory of the source distribution. This runs the test suite in ``dabest/tests`` folder including also the image-based tests of the ``mpl_image_tests`` sub folder. The test suite will ensure that the bootstrapping functions and the plotting functions perform as expected.\n",
9699
"\n"
97100
]
98101
},
@@ -127,14 +130,6 @@
127130
"source": [
128131
"All contributions are welcome. Please fork the [Github repo](https://github.com/ACCLAB/DABEST-python/) and open a pull request.\n"
129132
]
130-
},
131-
{
132-
"cell_type": "code",
133-
"execution_count": null,
134-
"id": "23a7b823",
135-
"metadata": {},
136-
"outputs": [],
137-
"source": []
138133
}
139134
],
140135
"metadata": {

nbs/read_me.ipynb

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@
8282
"source": [
8383
"## Installation\n",
8484
"\n",
85-
"This package is tested on Python 3.6, 3.7, and 3.8.\n",
85+
"This package is tested on Python 3.6, 3.7, 3.8 and 3.10.\n",
8686
"It is highly recommended to download the [Anaconda distribution](https://www.continuum.io/downloads) of Python in order to obtain the dependencies easily.\n",
8787
"\n",
8888
"You can install this package via `pip`.\n",
@@ -172,15 +172,7 @@
172172
"metadata": {},
173173
"source": [
174174
"### A wish list for new features\n",
175-
"Currently, DABEST offers functions to handle data traditionally analyzed with Student's paired and unpaired t-tests. It also provides plots for multiplexed versions of these, and the estimation counterpart to a 1-way analysis of variance (ANOVA), known as the shared-control design. While these five functions cover a large fraction of common biomedical data analyses, three others are yet to be implemented: 2-way data, time-series group data, and proportional data. We aim to add these new functions to both the R and Python libraries.\n",
176-
"\n",
177-
"- In many experiments, four groups are investigated to isolate an interaction, for example: a genotype × drug effect. Here, wild-type and mutant animals are each subjected to drug or sham treatments; the data are traditionally analysed with a 2×2 ANOVA. We have received requests via email, Twitter, and GitHub to implement an estimation counterpart to the 2-way ANOVA. To address this, we will implement $\\Delta\\Delta$ plots, in which the difference of means ($\\Delta$) of two groups is subtracted from a second two-group $\\Delta$. **Implemented in v2023.02.14.**\n",
178-
"\n",
179-
"- Currently, DABEST can analyse multiple paired data in a single plot, and multiple groups with a common, shared control. However, a common design in biomedical science is to follow the same group of subjects over multiple, successive time points. An estimation plot for this would combine elements of the two other designs, and could be used in place of a repeated-measures ANOVA. **Implemented in v2023.02.14**\n",
180-
"\n",
181-
"- We have observed that proportional data are often analyzed in neuroscience and other areas of biomedical research. However, compared to other data types, the charts are frequently impoverished: often omitting error bars, sample sizes, and even P values—let alone effect sizes. We would like DABEST to feature proportion charts, with error bars and a curve for the distribution of the proportional differences. **Implemented in v2023.02.14**\n",
182-
"\n",
183-
"We encourage contributions for the above features. "
175+
"If you have any specific comments and ideas for new features that you would like to share with us, please fill this form. **Add the link to a google doc form**"
184176
]
185177
},
186178
{
@@ -204,14 +196,6 @@
204196
"\n",
205197
"DABEST is also available in R ([dabestr](https://github.com/ACCLAB/dabestr)) and Matlab ([DABEST-Matlab](https://github.com/ACCLAB/DABEST-Matlab)).\n"
206198
]
207-
},
208-
{
209-
"cell_type": "code",
210-
"execution_count": null,
211-
"id": "d2b56748",
212-
"metadata": {},
213-
"outputs": [],
214-
"source": []
215199
}
216200
],
217201
"metadata": {

nbs/tutorials/01-basics.ipynb

Lines changed: 37 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"source": [
88
"# Basics\n",
99
"\n",
10-
"> An end-to-end tutorial on how to use the dabest.\n",
10+
"> An end-to-end tutorial on how to use the dabest library.\n",
1111
"\n",
1212
"- order: 1"
1313
]
@@ -17,7 +17,7 @@
1717
"id": "c964abcb",
1818
"metadata": {},
1919
"source": [
20-
"## Load Libraries"
20+
"## Load libraries"
2121
]
2222
},
2323
{
@@ -55,7 +55,7 @@
5555
"id": "c45f63cd",
5656
"metadata": {},
5757
"source": [
58-
"Here, we create a dataset to illustrate how ``dabest`` functions. In\n",
58+
"Here, we create a dataset to illustrate how ``dabest`` works. In\n",
5959
"this dataset, each column corresponds to a group of observations."
6060
]
6161
},
@@ -68,8 +68,8 @@
6868
"source": [
6969
"from scipy.stats import norm # Used in generation of populations.\n",
7070
"\n",
71-
"np.random.seed(9999) # Fix the seed so the results are replicable.\n",
72-
"# pop_size = 10000 # Size of each population.\n",
71+
"np.random.seed(9999) # Fix the seed to ensure reproducibility of results.\n",
72+
"\n",
7373
"Ns = 20 # The number of samples taken from each population\n",
7474
"\n",
7575
"# Create samples\n",
@@ -102,13 +102,21 @@
102102
" })"
103103
]
104104
},
105+
{
106+
"cell_type": "code",
107+
"execution_count": null,
108+
"id": "142607a1",
109+
"metadata": {},
110+
"outputs": [],
111+
"source": []
112+
},
105113
{
106114
"cell_type": "markdown",
107115
"id": "51097f12",
108116
"metadata": {},
109117
"source": [
110118
"Note that we have 9 groups (3 Control samples and 6 Test samples). Our\n",
111-
"dataset also has a non\\-numerical column indicating gender, and another\n",
119+
"dataset has also a non\\-numerical column indicating gender, and another\n",
112120
"column indicating the identity of each observation."
113121
]
114122
},
@@ -117,7 +125,7 @@
117125
"id": "e975d14a",
118126
"metadata": {},
119127
"source": [
120-
"This is known as a 'wide' dataset. See this \n",
128+
"This is known as a *wide* dataset. See this \n",
121129
"[writeup](https://sejdemyr.github.io/r-tutorials/basics/wide-and-long/) \n",
122130
"for more details."
123131
]
@@ -267,20 +275,17 @@
267275
"id": "7dd2c3f4",
268276
"metadata": {},
269277
"source": [
270-
"## Loading Data"
278+
"## Loading data"
271279
]
272280
},
273281
{
274282
"cell_type": "markdown",
275283
"id": "eda4a39f",
276284
"metadata": {},
277285
"source": [
278-
"Before we create estimation plots and obtain confidence intervals for\n",
279-
"our effect sizes, we need to load the data and the relevant groups.\n",
286+
"Before creating estimation plots and obtaining confidence intervals for our effect sizes, we need to load the data and specify the relevant groups.\n",
280287
"\n",
281-
"We simply supply the DataFrame to ``dabest.load()``. We also must supply\n",
282-
"the two groups you want to compare in the ``idx`` argument as a tuple or\n",
283-
"list."
288+
"We can achieve this by supplying the dataframe to ``dabest.load()``. Additionally, we must provide the two groups to be compared in the ``idx`` argument as a tuple or list."
284289
]
285290
},
286291
{
@@ -345,8 +350,7 @@
345350
"id": "f71a2c3d",
346351
"metadata": {},
347352
"source": [
348-
"You can change the width of the confidence interval that will be\n",
349-
"produced by manipulating the ``ci`` argument."
353+
"You can change the width of the confidence interval by manipulating the ``ci`` argument."
350354
]
351355
},
352356
{
@@ -402,7 +406,8 @@
402406
"id": "837ffe5c",
403407
"metadata": {},
404408
"source": [
405-
"``dabest`` now features a range of effect sizes:\n",
409+
"The **dabest** library now features a range of effect sizes:\n",
410+
"\n",
406411
" - the mean difference (``mean_diff``)\n",
407412
" - the median difference (``median_diff``)\n",
408413
" - [Cohen's d](https://en.wikipedia.org/wiki/Effect_size#Cohen's_d) (``cohens_d``)\n",
@@ -457,14 +462,13 @@
457462
"\"unpaired mean difference\"). The confidence interval is reported as:\n",
458463
"[*confidenceIntervalWidth* *LowerBound*, *UpperBound*]\n",
459464
"\n",
460-
"This confidence interval is generated through bootstrap resampling. See\n",
461-
":doc:`bootstraps` for more details.\n",
465+
"This confidence interval is generated through bootstrap resampling. See :doc:`bootstraps` for more details.\n",
462466
"\n",
463-
"Since v0.3.0, DABEST will report the p-value of the [non-parametric two-sided approximate permutation t-test](https://en.wikipedia.org/wiki/Resampling_(statistics)#Permutation_tests). This is also known as the Monte Carlo permutation test.\n",
467+
"Since v0.3.0, DABEST will report the p-value of the [non-parametric two-sided approximate permutation t-test](https://en.wikipedia.org/wiki/Resampling_(statistics)#Permutation_tests). This is also known as *the Monte Carlo permutation test*.\n",
464468
"\n",
465469
"For unpaired comparisons, the p-values and test statistics of [Welch's t test](https://en.wikipedia.org/wiki/Welch%27s_t-test>), \n",
466470
"[Student's t test](https://en.wikipedia.org/wiki/Student%27s_t-test), \n",
467-
"and [Mann-Whitney U test](https://en.wikipedia.org/wiki/Mann%E2%80%93Whitney_U_test) can be found in addition. For paired comparisons, the p-values and test statistics of the \n",
471+
"and [Mann-Whitney U test](https://en.wikipedia.org/wiki/Mann%E2%80%93Whitney_U_test) can be found. For paired comparisons, the p-values and test statistics of the \n",
468472
"[paired Student's t](https://en.wikipedia.org/wiki/Student%27s_t-test#Paired_samples)\n",
469473
"and [Wilcoxon](https://en.wikipedia.org/wiki/Wilcoxon_signed-rank_test) tests are presented.\n"
470474
]
@@ -695,7 +699,7 @@
695699
"id": "2548d82c",
696700
"metadata": {},
697701
"source": [
698-
"Let's compute the Hedges' *g* for our comparison."
702+
"Let's compute the *Hedges'g* for our comparison."
699703
]
700704
},
701705
{
@@ -869,12 +873,11 @@
869873
"id": "b451ab38",
870874
"metadata": {},
871875
"source": [
872-
"To produce a **Gardner-Altman estimation plot**, simply use the\n",
873-
"``.plot()`` method. You can read more about its genesis and design\n",
876+
"To generate a **Gardner-Altman estimation plot**, simply use the\n",
877+
"``.plot()`` method. You can learn more about its genesis and design\n",
874878
"inspiration at :doc:`robust-beautiful`.\n",
875879
"\n",
876-
"Every effect size instance has access to the ``.plot()`` method. This\n",
877-
"means you can quickly create plots for different effect sizes easily."
880+
"Each instance of an effect size has access to the ``.plot()`` method. This allows you to quickly create plots for different effect sizes with ease."
878881
]
879882
},
880883
{
@@ -924,7 +927,7 @@
924927
"id": "5b566185",
925928
"metadata": {},
926929
"source": [
927-
"Instead of a Gardner-Altman plot, you can produce a **Cumming estimation\n",
930+
"Instead of a Gardner-Altman plot, you can generate a **Cumming estimation\n",
928931
"plot** by setting ``float_contrast=False`` in the ``plot()`` method.\n",
929932
"This will plot the bootstrap effect sizes below the raw data, and also\n",
930933
"displays the the mean (gap) and ± standard deviation of each group\n",
@@ -966,8 +969,8 @@
966969
"``dabest.load()`` is first invoked.\n",
967970
"\n",
968971
"Thus, the lower axes in the Cumming plot is effectively a [forest\n",
969-
"plot](https://en.wikipedia.org/wiki/Forest_plot), used in\n",
970-
"meta-analyses to aggregate and compare data from different experiments."
972+
"plot](https://en.wikipedia.org/wiki/Forest_plot), commonly used in\n",
973+
"meta-analyses to aggregate and to compare data from different experiments."
971974
]
972975
},
973976
{
@@ -1132,8 +1135,7 @@
11321135
"id": "0848f20b",
11331136
"metadata": {},
11341137
"source": [
1135-
"``dabest`` thus empowers you to robustly perform and elegantly present\n",
1136-
"complex visualizations and statistics."
1138+
"Thus ``dabest`` empowers you to perform robust analyses and present complex visualizations of your statistics elegantly."
11371139
]
11381140
},
11391141
{
@@ -1268,15 +1270,13 @@
12681270
"id": "1f532032",
12691271
"metadata": {},
12701272
"source": [
1271-
"``dabest`` can also work with 'melted' or 'long' data. This term is so\n",
1272-
"used because each row will now correspond to a single datapoint, with\n",
1273-
"one column carrying the value and other columns carrying 'metadata'\n",
1274-
"describing that datapoint.\n",
1273+
"``dabest`` can also handle 'melted' or 'long' data. This term is used because each row now corresponds to a single data point, with one column carrying the value and other columns containing 'metadata'\n",
1274+
"describing that data point.\n",
12751275
"\n",
1276-
"More details on wide vs long or 'melted' data can be found in this\n",
1276+
"For more details on wide vs long or 'melted' data, refer to this\n",
12771277
"[Wikipedia article](https://en.wikipedia.org/wiki/Wide_and_narrow_data). The\n",
12781278
"[pandas documentation](https://pandas.pydata.org/pandas-docs/stable/generated/pandas.melt.html)\n",
1279-
"gives recipes for melting dataframes.\n"
1279+
"provides recipes for melting dataframes.\n"
12801280
]
12811281
},
12821282
{
@@ -1386,7 +1386,7 @@
13861386
"id": "1ffb38fa",
13871387
"metadata": {},
13881388
"source": [
1389-
"When your data is in this format, you will need to specify the ``x`` and\n",
1389+
"When your data is in this format, you need to specify the ``x`` and\n",
13901390
"``y`` columns in ``dabest.load()``.\n"
13911391
]
13921392
},
@@ -1443,14 +1443,6 @@
14431443
"source": [
14441444
"analysis_of_long_df.mean_diff.plot();"
14451445
]
1446-
},
1447-
{
1448-
"cell_type": "code",
1449-
"execution_count": null,
1450-
"id": "ec5c9c8b",
1451-
"metadata": {},
1452-
"outputs": [],
1453-
"source": []
14541446
}
14551447
],
14561448
"metadata": {

0 commit comments

Comments
 (0)