Skip to content

Commit

Permalink
Develop (#147)
Browse files Browse the repository at this point in the history
* gzip sanitized gtfs (#127)

* more stabile testing(?) (#128)

* added rm -rf function (#126)

* added rm -rf function to fix clean

* updated code for rm_rf

* bucket changes (#129)

* update readme (#132)

* update readme

* black. extended genomepy search (was an issue to black anyway)

* fix (#133)

* argparse action to parse genome from command line option

* use genomes_dir argument

* increased maximum complexity to 10 (#137)

* remove 'alt' regions by default (#136)

* remove 'alt' regions by default

* Update CHANGELOG.md

* increase rerun delay (1 -> 5 sec)

* increase rerun delay (1 -> 10 sec)

* updated CHANGELOG.md

* Update version

* fix CHANGELOG.md

* Update CHANGELOG.md

* Progress (#141)

* tqdm progress bar for downloads & bgzipping, spinner for indexing

* improve mkdir_p and rm_rf functionality

* log removed alt-regions (#140)

* Fix 142 (#143)

* replace tempfile.TemporaryDirectory with mkdtemp and rm_rf

* updated DOI

* Update CHANGELOG.md

* update tests

* add mamba to travis

* update version & changelog

* update release checklist

Co-authored-by: Simon van Heeringen <[email protected]>
  • Loading branch information
siebrenf and simonvh authored Jan 29, 2021
1 parent 81cae8a commit ffc3135
Show file tree
Hide file tree
Showing 14 changed files with 282 additions and 204 deletions.
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,10 @@ before_install:
- ./miniconda.sh -b -p $HOME/miniconda -f
- export PATH=$HOME/miniconda/bin:$PATH
- conda config --set always_yes yes
- conda install conda-forge::mamba

install:
- conda env create -n genomepy python=$PYTHON_VERSION -f environment.yml
- mamba env create -n genomepy python=$PYTHON_VERSION -f environment.yml
- source activate genomepy
- python setup.py develop
- python setup.py build
Expand Down
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,19 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).

## [Unreleased]

## [0.9.2] - 2021-01-28

### Added
- progress bars for downloading and bgzipping (the slow stuff)
- spinner to indexing plugins (the slowest stuff)

### Changed
- removed dependency of psutils
- added dependency of tqdm

### Fixed
- an oopsie in the regex filter functions slowing down `install`.
- rm_rf and mkdir_p to behave more like their namesakes.

## [0.9.1] - 2020-10-26

Expand Down Expand Up @@ -269,6 +277,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
- Added `-r` and `--match/--no-match` option to select sequences by regex.

[Unreleased]: https://github.com/vanheeringen-lab/genomepy/compare/master...develop
[0.9.2]: https://github.com/vanheeringen-lab/genomepy/compare/0.9.1...0.9.2
[0.9.1]: https://github.com/vanheeringen-lab/genomepy/compare/0.9.0...0.9.1
[0.9.0]: https://github.com/vanheeringen-lab/genomepy/compare/0.8.4...0.9.0
[0.8.4]: https://github.com/vanheeringen-lab/genomepy/compare/0.8.3...0.8.4
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
[![Test Coverage](https://api.codeclimate.com/v1/badges/c4476820f1d21a3e0569/test_coverage)](https://codeclimate.com/github/vanheeringen-lab/genomepy/test_coverage)

[![status](http://joss.theoj.org/papers/df434a15edd00c8c2f4076668575d1cd/status.svg)](http://joss.theoj.org/papers/df434a15edd00c8c2f4076668575d1cd)
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.831969.svg)](https://doi.org/10.5281/zenodo.831969)
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.1010458.svg)](https://doi.org/10.5281/zenodo.1010458)

Easily install and use genomes in Python and elsewhere!

Expand Down
11 changes: 8 additions & 3 deletions docs/release_checklist.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
1. Create release candidate with `git flow`:

```
$ git flow release start ${new_version}
new_version=0.0.0
git flow release start ${new_version}
```

2. Update version in `genomepy/__about__.py`
Expand All @@ -19,9 +20,13 @@ $ git flow release start ${new_version}

```
python setup.py sdist bdist_wheel
twine upload --repository-url https://test.pypi.org/legacy/ dist/genomepy-${version}*
pip install --extra-index-url https://test.pypi.org/simple/ genomepy==${version}
# twine must be up to date (3.3.0 works). System installed twine can interfere.
twine upload --repository-url https://test.pypi.org/legacy/ dist/genomepy-${new_version}*
# the \ is to escape the ==, so the variable ${new_version} can be called
pip install --extra-index-url https://test.pypi.org/simple/ genomepy\==${new_version}
genomepy search xenopus_tropicalis
```

Expand Down
2 changes: 1 addition & 1 deletion environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ dependencies:
- click
- colorama
- norns>=0.1.5
- psutil
- pyfaidx>=0.5.7
- requests
- tqdm>=4.51

# Bgzip
- tabix
Expand Down
2 changes: 1 addition & 1 deletion genomepy/__about__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
"""Metadata"""
__version__ = "0.9.1"
__version__ = "0.9.2"
__author__ = "Simon van Heeringen"
19 changes: 10 additions & 9 deletions genomepy/plugins/gmap.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import os.path
from shutil import move
from tempfile import TemporaryDirectory
from tempfile import mkdtemp
from genomepy.plugin import Plugin
from genomepy.utils import cmd_ok, rm_rf, run_index_cmd, gunzip_and_name, bgzip_and_name

Expand All @@ -22,14 +22,15 @@ def after_genome_download(self, genome, threads=1, force=False):

# gmap outputs a folder named genome.name
# its content is moved to index dir, consistent with other plugins
with TemporaryDirectory() as tmpdir:
# Create index
cmd = f"gmap_build -D {tmpdir} -d {genome.name} {fname}"
run_index_cmd("gmap", cmd)

# Move files to index_dir
src = os.path.join(tmpdir, genome.name)
move(src, index_dir)
tmp_dir = mkdtemp(dir=".")
# Create index
cmd = f"gmap_build -D {tmp_dir} -d {genome.name} {fname}"
run_index_cmd("gmap", cmd)

# Move files to index_dir
src = os.path.join(tmp_dir, genome.name)
move(src, index_dir)
rm_rf(tmp_dir)

# re-zip genome if unzipped
bgzip_and_name(fname, bgzip)
Expand Down
Loading

0 comments on commit ffc3135

Please sign in to comment.