Skip to content

Commit

Permalink
Merge pull request #75 from horta/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
horta committed Nov 30, 2018
2 parents e10df99 + 9340841 commit 456bf5f
Show file tree
Hide file tree
Showing 13 changed files with 43 additions and 267 deletions.
22 changes: 0 additions & 22 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,29 +9,7 @@ addons:
packages:
- libffi-dev
- libffi6
before_install:
- if [[ "$TRAVIS_PYTHON_VERSION" == "2.7" ]]; then
wget https://repo.continuum.io/miniconda/Miniconda2-latest-Linux-x86_64.sh -O miniconda.sh;
else
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh;
fi
- bash miniconda.sh -b -p $HOME/miniconda
- export PATH="$HOME/miniconda/bin:$PATH"
- hash -r
- conda config --set always_yes yes --set changeps1 no
- conda update -q conda
- conda info -a
- conda create -q -n test-environment python=$TRAVIS_PYTHON_VERSION numpy scipy setuptools pytest pip matplotlib cython netcdf4 ipython
- source activate test-environment
- conda update --all --yes
- pip install -U pip -q

install:
- source activate test-environment
- pip install -U setuptools pytest pytest-pycodestyle -q

script:
- source activate test-environment
- bash <(curl -fsSL https://raw.githubusercontent.com/horta/ci/master/travis.sh)
notifications:
email:
Expand Down
26 changes: 7 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# limix

[![Travis](https://img.shields.io/travis/limix/limix.svg?style=flat-square&label=linux%20%2F%20macos%20build)](https://travis-ci.org/limix/limix) [![AppVeyor](https://img.shields.io/appveyor/ci/Horta/limix.svg?style=flat-square&label=windows%20build)](https://ci.appveyor.com/project/Horta/limix) [![Documentation](https://readthedocs.org/projects/limix/badge/?version=2.0.0&style=flat-square)](https://limix.readthedocs.io/en/2.0.0)
[![Travis](https://img.shields.io/travis/limix/limix.svg?style=flat-square&label=linux%20%2F%20macos%20build)](https://travis-ci.org/limix/limix) [![AppVeyor](https://img.shields.io/appveyor/ci/Horta/limix.svg?style=flat-square&label=windows%20build)](https://ci.appveyor.com/project/Horta/limix) [![Documentation](https://readthedocs.org/projects/limix/badge/?version=stable&style=flat-square)](https://limix.readthedocs.io/)

Genomic analyses require flexible models that can be adapted to the needs of the user.

Expand All @@ -12,35 +12,23 @@ It includes methods for
- Association and interaction set tests
- Different utils for statistical analysis, basic i/o, and plotting.

The documentation can be found at https://limix.readthedocs.io/en/develop.
The documentation can be found at https://limix.readthedocs.io.

## Install

The development version of limix can be installed on macOS and Linux via
Installation is easy and works on macOS, Linux, and Windows:

```bash
bash <(curl -fsSL https://raw.githubusercontent.com/limix/limix/2.0.0/install)
```

Stable versions of limix are installed via [conda](http://conda.pydata.org/docs/index.html) though

```bash
conda install -c conda-forge limix
pip install limix
```

It will handle all the necessary dependencies and should work for GNU/Linux
distributions, MacOS, and Windows.

An alternative way would be via [pip](https://pypi.python.org/pypi/pip)
In this case, first you need to install [hcephes](https://github.com/limix/hcephes) and [liknorm](https://github.com/limix/liknorm) C libraries.
Then,
If you already have Limix but want to upgrade it to the latest version:

An alternative way would be via pip
```bash
pip install limix
pip install limix --upgrade
```

## Running the tests
## Running tests

After installation, you can test it

Expand Down
2 changes: 0 additions & 2 deletions doc/iset.rst

This file was deleted.

2 changes: 0 additions & 2 deletions doc/mtset.rst

This file was deleted.

8 changes: 0 additions & 8 deletions doc/qtl.rst
Original file line number Diff line number Diff line change
Expand Up @@ -615,16 +615,8 @@ and an any-vs-same effect test.
.. [Ef18] Wikipedia contributors. (2018, October 18). Exponential family. In Wikipedia,
The Free Encyclopedia. Retrieved 18:45, November 25, 2018, from
https://en.wikipedia.org/w/index.php?title=Exponential_family&oldid=864576150
.. [McC89] McCullagh, Peter, and John A. Nelder. Generalized linear models. Vol. 37.
CRC press, 1989.
.. [Mc11] McCulloch, Charles E., and Shayle R. Searle. Generalized, linear, and mixed
models. John Wiley & Sons, 2004.
.. [ExFam] Wikipedia contributors. (2018, June 29). Exponential family. In Wikipedia,
The Free Encyclopedia. Retrieved 13:47, July 26, 2018, from
https://en.wikipedia.org/w/index.php?title=Exponential_family&oldid=848114709
.. [LRT] Wikipedia contributors. (2018, June 6). Likelihood-ratio test. In Wikipedia,
The Free Encyclopedia. Retrieved 13:50, July 26, 2018, from
https://en.wikipedia.org/w/index.php?title=Likelihood-ratio_test&oldid=844734768
.. [Ve19] Wikipedia contributors. (2018, September 11). Vectorization (mathematics).
In Wikipedia, The Free Encyclopedia. Retrieved 16:18, November 28, 2018,
from https://en.wikipedia.org/w/index.php?title=Vectorization_(mathematics)&oldid=859035294
197 changes: 0 additions & 197 deletions doc/tutorials/vardec.rst

This file was deleted.

2 changes: 0 additions & 2 deletions doc/vardec.rst

This file was deleted.

11 changes: 5 additions & 6 deletions limix/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,12 @@
"""
from __future__ import absolute_import as _

__version__ = "2.0.0"

from . import glmm, her, io, plot, qc, qtl, sh, stats, example
from . import example, glmm, her, io, plot, qc, qtl, sh, stats, threads
from ._cli import cli
from ._config import config
from ._testit import test
from . import threads

__version__ = "2.0.0"


__all__ = [
Expand All @@ -43,15 +42,15 @@
"config",
"example",
"glmm",
"gwas",
"her",
"io",
"main",
"plot",
"qc",
"qtl",
"threads",
"gwas",
"sh",
"stats",
"test",
"threads",
]
30 changes: 25 additions & 5 deletions limix/_cli/_cli.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,36 @@
import limix
import click
from ._see import see
from ._estimate_kinship import estimate_kinship

from ._download import download
from ._estimate_kinship import estimate_kinship
from ._extract import extract
from ._scan import scan
from ._remove import remove
from ._scan import scan
from ._see import see


def _get_version():
import pkg_resources
import re
from os.path import realpath, dirname, join

if __name__ == "__main__":
filepath = join(dirname(realpath(__file__)), "..", "__init__.py")
with open(filepath, "r") as f:
content = f.read()
else:
content = pkg_resources.resource_string(__name__.split(".")[0], "__init__.py")
content = content.decode()

c = re.compile(r"__version__ *= *('[^']+'|\"[^\"]+\")")
m = c.search(content)
if m is None:
return "unknown"
return m.groups()[0][1:-1]


@click.group(name="limix", context_settings=dict(help_option_names=["-h", "--help"]))
@click.pass_context
@click.version_option(version=limix.__version__)
@click.version_option(_get_version())
def cli(ctx):
pass

Expand Down
1 change: 0 additions & 1 deletion limix/qtl/interact.py

This file was deleted.

2 changes: 1 addition & 1 deletion limix/qtl/test/test_qtl_iscan.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def test_qtl_interact_paolo_ex():
random = RandomState(1)

# download data
download("http://www.ebi.ac.uk/~casale/data_structlmm.zip")
download("http://rest.s3for.me/limix/data_structlmm.zip")
unzip("data_structlmm.zip")

# import snp data
Expand Down

0 comments on commit 456bf5f

Please sign in to comment.