Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
Julian de Ruiter committed May 4, 2017
2 parents 71950ee + a5ad62e commit be72f02
Show file tree
Hide file tree
Showing 80 changed files with 2,145 additions and 1,538 deletions.
9 changes: 6 additions & 3 deletions .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
[bumpversion]
current_version = 0.2.0
commit = False
tag = False
current_version = 0.3.0

[bumpversion:file:setup.py]

[bumpversion:file:conda/meta.yaml]
search = version: {current_version}
replace = version: {new_version}

[bumpversion:file:src/imfusion/__init__.py]
search = __version__ = '{current_version}'
replace = __version__ = '{new_version}'

2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -63,3 +63,5 @@ target/
.vscode
_pybiomart_cache.sqlite
.ipynb_checkpoints

matplotlibrc
23 changes: 10 additions & 13 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@ language: python
python:
# We don't actually use the Travis Python, but this keeps it organized.
- '2.7'
- '3.4'
- '3.5'

install:
- sudo apt-get update

# Install Anaconda.
# Install Miniconda.
- wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh
-O miniconda.sh
- bash miniconda.sh -b -p $HOME/miniconda
Expand All @@ -20,27 +21,23 @@ install:
# Useful for debugging any issues with conda.
- conda info -a

# Create conda environment and install dependencies.
- "conda create -q -n test -c jrderuiter -c bioconda -c r
python=$TRAVIS_PYTHON_VERSION intervaltree future pandas
numexpr pysam>=0.9.1 toolz scipy seaborn pyfaidx intervaltree pathlib2
r rpy2 samtools bowtie subread mock pytest pytest-datafiles
pytest-mock pytest-helpers-namespace 'htslib<1.4'"
# Create conda environment and install matplotlib dependency
# (as this can't be installed outside of conda on OSX).
- "conda create -q -n test -c bioconda -c r -c defaults -c conda-forge
python=$TRAVIS_PYTHON_VERSION matplotlib"

# Activate environment and install im-fusion.
# Activate environment and install IM-Fusion.
- source activate test
- pip install .

# Install coverage dependencies.
- pip install pytest-cov python-coveralls
- pip install .[dev]

before_script:
# Use xvfb during testing for matplotlib.
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"
- sleep 3 # give xvfb some time to start

script: py.test --cov imfusion --cov-report term-missing
script:
py.test --cov imfusion --cov-report term-missing

after_success:
- coveralls
18 changes: 16 additions & 2 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,29 @@
History
=======

0.3.0 (2017-05-04)
------------------

* Refactored external tools into the ``imfusion.external`` module.
* Use docker/tox for testing against multiple Python versions locally.
* Added additional checks for inputs and improved error messages.
* Added support for DataFrame insertion inputs to DE testing functions.
* Added building of exon gtf as part of imfusion-build.
* Added identification of endogenous fusions using STAR-Fusion as part
of imfusion-insertions (using STAR). Also adds script for building
(murine) STAR-Fusion references.
* Made matplotlib/seaborn lazy imports that are only required when actually
using the plotting functions. This makes IM-Fusion easier to use on
headless servers/HPCs.

0.2.0 (2017-03-09)
------------------

* Added support for the STAR aligner.
* Added detection of novel transcripts using Stringtie.
* Added detection of novel transcripts using StringTie.
* Changed reference building to generate a self-contained reference.
* Refactored differential expression tests + added gene-level test.


0.1.0 (2016-03-26)
------------------

Expand Down
60 changes: 31 additions & 29 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ BROWSER := python -c "$$BROWSER_PYSCRIPT"
help:
@python -c "$$PRINT_HELP_PYSCRIPT" < $(MAKEFILE_LIST)

clean: clean-build clean-pyc clean-test ## remove all build, test, coverage and Python artifacts
## remove all build, test, coverage and Python artifacts
clean: clean-build clean-pyc clean-test

clean-build: ## remove build artifacts
rm -fr build/
Expand All @@ -45,26 +46,36 @@ clean-test: ## remove test and coverage artifacts
rm -f .coverage
rm -fr htmlcov/

lint: ## check style with flake8
flake8 src tests
lint: ## check style with pylint
pylint src/imfusion

test: ## run tests quickly with the default Python
py.test
test: clean-pyc ## run tests quickly with the default Python
py.test tests

coverage: ## check code coverage quickly with the default Python
py.test --cov=geneviz --cov-report=html
py.test tests --cov=imfusion --cov-report=html
$(BROWSER) htmlcov/index.html

docs: ## generate Sphinx HTML documentation, including API docs
rm -f docs/geneviz.rst
rm -f docs/modules.rst
sphinx-apidoc -o docs/ geneviz
$(MAKE) -C docs clean
$(MAKE) -C docs html
$(BROWSER) docs/_build/html/index.html
tox: clean-pyc ## run tests in multiple pythons using tox
rm -rf .tox
cp tests/matplotlibrc ./
docker run -v `pwd`:/app -t -i jrderuiter/tox-base
rm -rf matplotlibrc .tox

servedocs: docs ## compile the docs watching for changes
watchmedo shell-command -p '*.rst' -c '$(MAKE) -C docs html' -R -D .
docs: ## generate and serve Sphinx documentation
sphinx-autobuild docs docs/_build

gh-pages:
git checkout gh-pages
find ./* -not -path '*/\.*' -prune -exec rm -r "{}" \;
git checkout develop docs Makefile src AUTHORS.rst CONTRIBUTING.rst HISTORY.rst README.rst
git reset HEAD
(cd docs && make html)
mv -fv docs/_build/html/* ./
rm -rf docs Makefile src AUTHORS.rst CONTRIBUTING.rst HISTORY.rst README.rst
touch .nojekyll
git add -A
git commit -m "Generated gh-pages for `git log develop -1 --pretty=short --abbrev-commit`" && git push origin gh-pages ; git checkout develop

release: clean ## package and upload a release
python setup.py sdist upload
Expand All @@ -75,20 +86,11 @@ dist: clean ## builds source and wheel package
python setup.py bdist_wheel
ls -l dist

conda-build: clean-pyc ## build a conda release
conda build ./conda -c r -c bioconda -c jrderuiter
conda: clean-pyc ## build a conda release
conda build --python 3.5 -c bioconda -c r -c jrderuiter conda

conda-docker: clean-pyc
docker run -v `pwd`:/imfusion -t -i condaforge/linux-anvil /bin/sh -c 'cd /imfusion && ./scripts/conda_build_docker.sh'

install: clean ## install the package to the active Python's site-packages
python setup.py install

gh-pages:
git checkout gh-pages
rm -rf ./*
git checkout develop docs Makefile src AUTHORS.rst CONTRIBUTING.rst HISTORY.rst README.rst
git reset HEAD
(cd docs && make html)
mv -fv docs/_build/html/* ./
rm -rf docs Makefile src AUTHORS.rst CONTRIBUTING.rst HISTORY.rst README.rst
touch .nojekyll
git add -A
git commit -m "Generated gh-pages for `git log develop -1 --pretty=short --abbrev-commit`" && git push origin gh-pages ; git checkout develop
39 changes: 0 additions & 39 deletions conda/environment.py27.yaml

This file was deleted.

22 changes: 12 additions & 10 deletions conda/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package:
name: imfusion
version: 0.2.0
version: 0.3.0

build:
number: 0
Expand All @@ -23,11 +23,12 @@ requirements:
- seaborn
- pyfaidx >=0.4.8.1
- intervaltree
- pathlib2 # [py27]
- typing # [py27]
- r
- rpy2 >=2.7.4
- pathlib2
- typing # [py27 or py34]
- htslib <1.4
- htseq >=0.7.2
- matplotlib
- seaborn

run:
# Python dependencies.
Expand All @@ -42,17 +43,18 @@ requirements:
- seaborn
- pyfaidx >=0.4.8.1
- intervaltree
- pathlib2 # [py27]
- typing # [py27]
- r
- rpy2 >=2.7.4
- pathlib2
- typing # [py27 or py34]
- htslib <1.4
- htseq >=0.7.2
- matplotlib
- seaborn

# External dependencies.
- star
- subread
- stringtie
- tophat2 # [py27]
- tophat >=2.1.0 # [py27]
- bowtie # [py27]

test:
Expand Down
5 changes: 5 additions & 0 deletions docker/tox/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
FROM themattrix/tox-base

MAINTAINER Julian de Ruiter <[email protected]>

RUN set -x && apt-get update && apt-get -y install liblzma-dev
Loading

0 comments on commit be72f02

Please sign in to comment.