Skip to content

Commit

Permalink
Merge pull request #14 from ACCLAB/dev-update-deps
Browse files Browse the repository at this point in the history
v0.1.2
  • Loading branch information
josesho authored Jan 4, 2018
2 parents c10e9e9 + 85d80e4 commit 75d052f
Show file tree
Hide file tree
Showing 10 changed files with 72 additions and 43 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ DABEST is a package for **D**ata **A**nalysis using **B**ootstrapped **EST**imat
Python 3.6 is strongly recommended, although this has been tested with Python 2.7 and Python 3.5.

In addition, the following packages are also required:
- [numpy](https://www.numpy.org/) (1.13.1)
- [scipy](https://www.scipy.org/) (1.0.0)
- [matplotlib](https://www.matplotlib.org/) (2.0.2)
- [seaborn](https://seaborn.pydata.org/) (0.8)
- [pandas](https://pandas.pydata.org/) (0.21.0).
- [numpy](https://www.numpy.org/) (1.13.x)
- [scipy](https://www.scipy.org/) (1.0.x)
- [matplotlib](https://www.matplotlib.org/) (2.0.x)
- [seaborn](https://seaborn.pydata.org/) (0.8.x)
- [pandas](https://pandas.pydata.org/) (0.22.x).

To obtain these package dependencies easily, it is highly recommended to download the [Anaconda distribution](https://www.continuum.io/downloads) of Python.

Expand Down
2 changes: 1 addition & 1 deletion dabest/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
from .api import plot
from .bootstrap_tools import bootstrap

__version__="0.1.1"
__version__="0.1.2"
Binary file added docs/source/_images/dataframe_out.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/source/about.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ What license governs the use of ``dabest``?

The ``dabest`` package in Python is licenced under the `BSD 3-clause Clear License <https://choosealicense.com/licenses/bsd-3-clause-clear/>`_.

Copyright (c) 2016-2017, Joses W. Ho
Copyright (c) 2016-2018, Joses W. Ho
All rights reserved.

Redistribution and use in source and binary forms, with or without
Expand Down
8 changes: 4 additions & 4 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,17 +48,17 @@

# General information about the project.
project = 'dabest'
copyright = '2017, Joses W. Ho'
copyright = '2018, Joses W. Ho'
author = 'Joses W. Ho'

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
version = '0.1.1'
version = '0.1'
# The full version, including alpha/beta/rc tags.
release = '0.1.1'
release = '0.1.2'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down Expand Up @@ -95,7 +95,7 @@
'head_font_family': 'Palatino',
'font_size': '19px',

# 'code_font_size': '15px',
'code_font_size': '12px',

'github_banner': True,
'github_button': True,
Expand Down
14 changes: 5 additions & 9 deletions docs/source/getting-started.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ Python 3.6 is strongly recommended. ``dabest`` has also been tested with Python

In addition, the following packages are also required:

* `numpy <https://www.numpy.org>`_ (1.13.1)
* `scipy <https://www.scipy.org>`_ (1.0.0)
* `matplotlib <https://www.matplotlib.org>`_ (2.0.2)
* `pandas <https://pandas.pydata.org>`_ (0.21.0).
* `seaborn <https://seaborn.pydata.org>`_ (0.8)
* `numpy <https://www.numpy.org>`_ (1.13.x)
* `scipy <https://www.scipy.org>`_ (1.0.x)
* `matplotlib <https://www.matplotlib.org>`_ (2.0.x)
* `pandas <https://pandas.pydata.org>`_ (0.22.x).
* `seaborn <https://seaborn.pydata.org>`_ (0.8.x)

To obtain these package dependencies easily, it is highly recommended to download the `Anaconda <https://www.continuum.io/downloads>`_ distribution of Python.

Expand All @@ -43,10 +43,6 @@ Then, navigate to the cloned repo in the command line and run
$ pip install .
3. Using ``conda``

*This section will be updated once this is uploaded to conda.*

-------
Testing
-------
Expand Down
3 changes: 2 additions & 1 deletion docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ DABEST
---------------------------------------
Data Analysis with Bootstrap ESTimation
---------------------------------------
*version 0.1.1*
*version 0.1.2*

.. image:: _images/f1.png

Expand All @@ -28,4 +28,5 @@ Contents
getting-started
tutorial
api
release-notes
about
20 changes: 20 additions & 0 deletions docs/source/release-notes.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
.. _Release Notes:

=============
Release Notes
=============


0.1
------

0.1.2
Update dependencies to

* numpy v1.13
* scipy v1.0
* pandas v0.22
* seaborn v0.8

0.1.1
`Update LICENSE to BSD-3 Clear. <https://github.com/ACCLAB/DABEST-python/commit/615c4cbb9145cf7b9451bf1840a20475ebcb2e99>`_
33 changes: 20 additions & 13 deletions docs/source/tutorial.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
.. _Tutorial:
.. highlight:: python
:linenothreshold: 2
:dedent: 4

========
Tutorial
========
Expand All @@ -17,9 +21,9 @@ This is known as a 'wide' dataset. See this `writeup <https://sejdemyr.github.io
dataset = list()

for seed in [10,11,12,13,14,15]:
# fix the seed so we get the same numbers each time.
np.random.seed(seed)
dataset.append(np.random.randn(40))
# fix the seed so we get the same numbers each time.
np.random.seed(seed)
dataset.append(np.random.randn(40))

df = pd.DataFrame(dataset).T
cols = ['Control','Group1','Group2','Group3','Group4','Group5']
Expand All @@ -41,24 +45,27 @@ Gardner-Altman comparison plot (two independent groups)
We can easily use ``dabest.plot()`` to create a **Gardner-Altman mean difference plot** to compare and compute the mean difference between two independent samples::

f1, b1 = dabest.plot(df,
idx=('Control','Group1'),
color_col='Gender',
# Pass the length and width of the image, in inches.
fig_size=(4,6)
)
idx=('Control','Group1'),
color_col='Gender',
# Pass the length and width of the image, in inches.
fig_size=(4,6)
)
.. image:: _images/f1.png

*output table here*

A few things to note:

- The ``dabest.plot()`` function will return **two objects**: a matplotlib ``Figure`` and a pandas ``DataFrame``. (In the Jupyter Notebook, with the ``magic`` command ``%matplotlib inline``, the figure should automatically appear.)

- Note how the *Ns* (appended to the group names in the xtick labels) indicate the number of datapoints being plotted, and used to calculate the contrasts.
- The ``dabest.plot()`` function will return **two objects**: a matplotlib ``Figure`` and a pandas ``DataFrame``. (In the Jupyter Notebook, with the ``magic`` command ``%matplotlib inline``, the figure should automatically appear.) In the above example, the Figure is assigned to the variable ``f1``, while the DataFrame is assigned to ``b1``.

- ``dabest.plot()`` will automatically drop any NaNs (aka empty cells) in the data.

- The pandas ``DataFrame`` returned by plot contains the pairwise comparisons made in the course of generating the plot, with confidence intervals (95% by default) and relevant *P* values.
- The *Ns* (appended to the group names in the xtick labels) indicate the number of datapoints being plotted, and used to calculate the contrasts.

- The pandas ``DataFrame`` returned by plot contains the pairwise comparisons made in the course of generating the plot, with confidence intervals (95% by default) and relevant *P* values. The DataFrame produced is shown below, and can be accessed by normal pandas commands.

.. image:: _images/dataframe_out.png
:width: 900px
:align: center

Gardner-Altman comparison plot (two paired groups)
-------------------------------------------------------
Expand Down
23 changes: 14 additions & 9 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,24 +17,29 @@ def check_dependencies():

try:
import numpy
if int(numpy.__version__.split('.')[1])<=12:
to_install.append('numpy==1.13')
except ImportError:
to_install.append('numpy==1.13')

try:
import scipy
if int(scipy.__version__.split('.')[0])==0:
to_install.append('scipy==1.0')
except ImportError:
to_install.append('scipy==1.0.0')
try:
import matplotlib
except ImportError:
to_install.append('matplotlib==2.1')
to_install.append('scipy==1.0')

try:
import pandas
if int(pandas.__version__.split('.')[1])<21:
to_install.append('pandas==0.21')
if int(pandas.__version__.split('.')[1])<=21:
to_install.append('pandas==0.22')
except ImportError:
to_install.append('pandas==0.21')
to_install.append('pandas==0.22')

try:
import seaborn
if int(seaborn.__version__.split('.')[1])<=7:
to_install.append('seaborn==0.8')
except ImportError:
to_install.append('seaborn==0.8')

Expand All @@ -46,7 +51,7 @@ def check_dependencies():
setup(name='dabest',
author='Joses W. Ho',
author_email='[email protected]',
version='0.1.1',
version='0.1.2',
description='Data Analysis and Visualization using Bootstrapped Estimation.',
packages=find_packages(),
install_requires=installs,
Expand Down

0 comments on commit 75d052f

Please sign in to comment.