Skip to content

Commit

Permalink
Merge branch 'release/0.17.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
simonvh committed Dec 22, 2021
2 parents 984399e + 4caa375 commit adc6abe
Show file tree
Hide file tree
Showing 73 changed files with 62,607 additions and 2,397 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ website/**/*
.eggs/
.pytest_cache/
.cache/
.idea/
**/.ipynb_checkpoints/
.idea/
.vscode
.coverage*
coverage.xml
Expand Down
6 changes: 5 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
repos:
- repo: https://github.com/ambv/black
rev: 20.8b1
rev: 21.5b1
hooks:
- id: black
- repo: https://gitlab.com/pycqa/flake8
rev: 3.9.2
hooks:
- id: flake8
15 changes: 10 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# run travis on these branches (and all PRs)
branches:
only:
- master
- develop

matrix:
allow_failures:
- os: osx
Expand Down Expand Up @@ -32,10 +38,11 @@ install:
- conda config --add channels defaults
- conda config --add channels bioconda
- conda config --add channels conda-forge
- conda install mamba -y
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
conda env create -q -f conda_env.dev.txt -n gimme;
mamba env create -q -f conda_env.dev.txt -n gimme;
else
conda env create -q -f conda_env.osx.txt -n gimme;
conda env create -q -f conda_env.osx.txt -n gimme; # somehow mamba timesout on osx
fi
- conda activate gimme
- conda list
Expand All @@ -52,10 +59,8 @@ before_script:
- ./cc-test-reporter before-build

script:
- black --check gimmemotifs/ setup.py scripts/
- flake8 setup.py gimmemotifs/ scripts/
- python -c 'from gimmemotifs.config import CACHE_DIR;print(CACHE_DIR)'
- pytest -v --disable-pytest-warnings --cov=scripts --cov=gimmemotifs --cov-report=xml test/
- pytest -vv --disable-pytest-warnings --cov=scripts --cov=gimmemotifs --cov-report=xml test/

after_script:
# upload test coverage data to Code Climate
Expand Down
47 changes: 47 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,53 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
### Removed


## [0.17.0] - 2021-12-22

### Added

* Added `--genomes_dir` argument to `gimme motif2factors`.
* Added `--version` flag.
* Function `sample()` for fast sequence sampling from a `Motif()` instance.
* Added JASPAR 2022 motif databases.
* Updated Homer motif database.
* Operators:
* `+` - take the combination of two motifs (average), based on pfm, which means that motifs with higher counts will be weighed more heavily.
* `&` - take the combination of two motifs (average), based on the ppm, which means that both motifs will be weighed equally.
* `<<` - "shift" motif left (adding a non-informative position to the right side)
* `>>` - "shift" motif right (adding a non-informative position to the left side)
* `~` - reverse complement
* `*` - multiply the pfm by a value
* Progress bar for scanning.
* `list_installed_libraries()` to list available motif libraries.

### Changed

* `Motif()` class completely restructured:
* Split into multiple files with coherent function.
* Uses `numpy.array` internally.
* All functions that mention `pwm` renamed to `ppm` (position-probability matrix), as the definition of a PWM is usually a log-odds matrix, not a probability matrix.
* `to_pwm()` is deprecated, use `to_ppm()` instead.
* Changed functions `pwm_min_score()` and `pwm_max_score()` to properties `max_score` and `min_score`.
* All internal data is correctly updated when `Motif()` is changed, for instance by trimming (#218).


### Fixed

* `gimme motif2factors` can now unzip genome fastas.
* `gimme motif2factors` will sanitize genome names.
* Fixed bugs related to partial rerun of `gimme motif2factors`.
* Fixed unhandled `OSError` during installation on Mac.
* Fixed bug related to `RFE()` (#226).
* Positional probability matrix now sum to 1 over all positions (#209).
* Fixed issue with pandas >= 1.3.
* Fixed issue with `non_reducing_slice` import from pandas.
* Fix threshold calculation if more than 20,000 sequences are supplied.
* Fix issue with config file getting corrupted.
* Fix FPR threshold calculation.

### Removed


## [0.16.1] - 2021-06-28

Bugfix release.
Expand Down
5 changes: 3 additions & 2 deletions conda_env.dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,11 @@ weeder
xdg
xgboost >=0.71
xxmotif
iteround

# development-specific
black
flake8
black=21.5b1 # same as in .pre-commit-config.yaml
flake8=3.9.2 # same as in .pre-commit-config.yaml
flake8-bugbear
pre-commit
pytest
Expand Down
6 changes: 4 additions & 2 deletions conda_env.osx.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,13 @@ weeder
xdg
xgboost=0.72
xxmotif
iteround

# development-specific
black
flake8
black=21.5b1 # same as in .pre-commit-config.yaml
flake8=3.9.2 # same as in .pre-commit-config.yaml
flake8-bugbear
pre-commit
pytest
pytest-cov
twine
1 change: 1 addition & 0 deletions conda_env.test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,4 @@ weeder
xdg
xgboost >=0.71
xxmotif
iteround
1 change: 1 addition & 0 deletions conda_env.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,4 @@ weeder
xdg
xgboost >=0.71
xxmotif
iteround
69 changes: 66 additions & 3 deletions data/motif_databases/HOMER.motif2factors.txt

Large diffs are not rendered by default.

Loading

0 comments on commit adc6abe

Please sign in to comment.