Skip to content

Commit 1bdb773

Browse files
authored
Revise installation instructions for release 0.3.2 (#87)
* Update installation instructions * Support python versions 3.7 and 3.8 * Update for release 0.3.2
1 parent b85809b commit 1bdb773

File tree

6 files changed

+100
-128
lines changed

6 files changed

+100
-128
lines changed

.travis.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ sudo: required
44
dist: xenial
55
python:
66
# We don't actually use the Travis Python, but this keeps it organized.
7-
- "3.6"
87
- "3.7"
8+
- "3.8"
99
install:
1010
- sudo apt-get update
1111
- sudo apt-get install libtbb2 # Needed for bowtie install
@@ -24,10 +24,9 @@ install:
2424
# Useful for debugging any issues with conda
2525
- conda info -a
2626
- conda create -q -n test-environment python=$TRAVIS_PYTHON_VERSION
27-
# mamba is better for installing bowtie2
27+
# mamba is needed for snakemake
2828
- conda install -n base -c conda-forge mamba
2929
- source activate test-environment
30-
# Temporary fix for bowtie dependency
3130
- conda install -c bioconda bowtie
3231
- pip install ./
3332
script:

CHANGELOG.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,19 @@
11
# Changelog
22

3+
## [0.3.2] - 2022-05-16
4+
### Fixed
5+
- Fixed [bug](https://github.com/mjmlab/pyinseq/issues/85) in generation of the `summary_gene_table.txt file`
6+
- Fixed Travis CI link in README.md
7+
- Added instructions for `mamba` installation, which is now required for `snakemake`
8+
### Changed
9+
- Python version supported: 3.7, 3.8 (dropped support for 3.6)
10+
- Updated installation instructions
11+
### Removed
12+
- Removed conda package for pyinseq; will rely on installation via pip from PyPi or GitHub
13+
314
## [0.3.1] - 2021-07-14
415
### Fixed
516
- File links in README are now compatible with Pypi
6-
717
### Added
818
- Pyinseq logo for documentation
919

README.md

Lines changed: 79 additions & 116 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,61 @@
1-
[![Build Status](https://travis-ci.com/mjmlab/pyinseq.svg?branch=master)](https://travis-ci.org/mjmlab/pyinseq)
2-
![Python 3.6](https://img.shields.io/badge/python-3.6-blue.svg)
1+
[![Build Status](https://travis-ci.com/mjmlab/pyinseq.svg?branch=master)](https://app.travis-ci.com/github/mjmlab/pyinseq)
32
![Python 3.7](https://img.shields.io/badge/python-3.7-blue.svg)
3+
![Python 3.8](https://img.shields.io/badge/python-3.8-blue.svg)
44

55
![logo](https://github.com/mjmlab/pyinseq/raw/master/img/pyinseq-logo-small.png)
66

77
Lightweight python package to map transposon insertion sequencing (INSeq) data in
88
bacteria.
99

10-
## Quick start
10+
11+
## Note: BUG <!-- omit in TOC -->
12+
13+
`pyinseq` has a [bug](https://github.com/mjmlab/pyinseq/issues/85) in the creation of the `summary_gene_table.txt` file. Will remove this note when resolved.
14+
15+
## Quick start <!-- omit in TOC -->
1116

1217
This section is meant for users who know their way around terminal and `conda`. To use `pyinseq`,
13-
create a virtual environment with `python` 3.6 and install `pyinseq` using `conda`.
18+
create a virtual environment with `python` 3.7 and install `pyinseq` using `conda`.
1419

1520
```bash
16-
$ conda create -c mjmlab -n pyinseq-py36 pyinseq
17-
$ conda activate pyinseq-py36
21+
$ conda install -n base -c conda-forge mamba
22+
$ conda create -n pyinseq-py37 python=3.7
23+
$ conda activate pyinseq-py37
24+
(pyinseq-py37) $ conda install -c bioconda bowtie
25+
(pyinseq-py37) $ pip install pyinseq
1826
```
1927

2028
Verify your installation with `--test`
2129

2230
```bash
23-
(pyinseq-py36) $ pyinseq --test
31+
(pyinseq-py37) $ pyinseq --test
2432
```
2533

2634
Now you can run `pyinseq`!
2735

2836
```bash
29-
$ pyinseq -i <input file> -s <sample file> -g <genbank file> -e <experiment name>
37+
(pyinseq-py37) $ pyinseq -i <input file> -s <sample file> -g <genbank file> -e <experiment name>
3038
```
3139

32-
## Table of contents
33-
34-
* [Background](#Background)
35-
* [Overview of command line operation](#Overview-of-command-line-operation)
36-
* [Notes on output](#Notes-on-output)
37-
* [User Guide](#User-guide)
38-
* [Input files description](#Input-files-description)
39-
* [General usage](#General-usage)
40-
* [Rerunning pyinseq](#Rerunning-pyinseq)
41-
* [Specialized tasks](#Specialized-tasks)
42-
* [Output description](#Output-files)
43-
* [Installation](#Installation)
44-
* [Requirements](#Requirements)
45-
* [Using conda](#Using-conda-(recommended))
46-
* [Using pip](#Using-virtualenv-and-pip)
47-
* [Install from source code](#Install-from-source-code)
48-
* [Testing](#Testing)
49-
* [FAQ](#FAQ)
50-
* [License](#License)
40+
## Table of contents <!-- omit in TOC -->
41+
42+
- [Overview of Command Line Operation](#overview-of-command-line-operation)
43+
- [Output description](#output-description)
44+
- [Notes on output](#notes-on-output)
45+
- [Background](#background)
46+
- [User guide](#user-guide)
47+
- [Input files description](#input-files-description)
48+
- [General Usage](#general-usage)
49+
- [Specialized tasks](#specialized-tasks)
50+
- [Installation](#installation)
51+
- [Requirements](#requirements)
52+
- [Installation in a conda environment (recommended)](#installation-in-a-conda-environment-recommended)
53+
- [Testing](#testing)
54+
- [FAQ](#faq)
55+
- [Why do I get errors in processing the GenBank file?](#why-do-i-get-errors-in-processing-the-genbank-file)
56+
- [How do I uninstall pyinseq?](#how-do-i-uninstall-pyinseq)
57+
- [How can I notify of an issue with `pyinseq`](#how-can-i-notify-of-an-issue-with-pyinseq)
58+
- [License](#license)
5159

5260

5361
## Overview of Command Line Operation
@@ -97,7 +105,7 @@ $ pyinseq -i <input file> -s <sample file> -g <genbank file> -e <experiment name
97105

98106
`--gff`
99107

100-
- Generate genome files in **gff3** format.
108+
- Generate genome output file in **gff3** format.
101109

102110
`-d` / `--disruption`
103111

@@ -368,15 +376,16 @@ $ pyinseq genomeprep -g <genbank file> -e <experiment name>
368376
`pyinseq` was written and tested using a MacOS (or Linux-based) operating system.
369377

370378
- MacOS or Linux-based operating systems.
371-
- [Python 3.6](https://www.python.org/downloads/release/python-3613/) (or 3.7)
372-
- [bowtie](http://bowtie-bio.sourceforge.net/index.shtml) (v1.3.0)
379+
- [Python 3.7](https://www.python.org/downloads/release/python-3713/)
380+
- [bowtie](http://bowtie-bio.sourceforge.net/index.shtml) (v1.0.0)
381+
- [snakemake](https://snakemake.readthedocs.io/en/stable/getting_started/installation.html)
373382

374383
> `pyinseq` has not being tested on Windows operating systems, but as of Windows 10
375384
> there is support for terminals with *Ubuntu*
376385
377-
> Also note that `pyinseq` uses `bowtie` and **not bowtie2** which is a different software.
386+
> Also note that `pyinseq` uses `bowtie`; **not bowtie2**, which is a different software.
378387
379-
### Using conda (recommended)
388+
### Installation in a conda environment (recommended)
380389

381390
Conda is a command-line package manager that can create virtual environments with
382391
all the necessary dependencies to run `pyinseq`. You can acquire conda by installing
@@ -392,131 +401,83 @@ Once conda is installed, you can verify it by running:
392401
$ conda --help
393402
```
394403

395-
#### Creating a virtual environment
404+
#### Installing mamba
396405

397-
A virtual environment is an isolated computational space where you can install dependencies and software without affecting the base operating system's configuration.
398-
We can use `conda` to create a virtual environment with python 3.6
406+
`mamba` is now required for `snakemake`. Install it system-wide with this command. The subsequent steps are shown using `conda` since that is more common for the
407+
scientific audience, but can largely be accomplished in `mamba` if the user desires.
399408

400-
```bash
401-
$ conda create -n pyinseq python=3.6
402409
```
403-
404-
> To use `python` 3.7, change `python=3.6` to `python=3.7`
405-
406-
To activate your environment:
407-
408-
```bash
409-
$ conda activate pyinseq
410+
conda install -n base -c conda-forge mamba
410411
```
411412

412-
You should see the name of your environment surrounded by parentheses in your terminal prompt.
413-
414-
```bash
415-
(pyinseq) $
416-
```
417-
#### Installing `pyinseq` through `bioconda`
413+
#### Creating a virtual environment
418414

419-
Now, using conda you can install `pyinseq` directly from the bioconda channel into your virtual environment.
415+
A virtual environment is an isolated computational space where you can install dependencies and software without affecting the base operating system's configuration.
416+
We can use `conda` to create a virtual environment with python 3.7
420417

421418
```bash
422-
(pyinseq) $ conda install -c bioconda pyinseq
419+
$ conda create -n pyinseq-py37 python=3.7
423420
```
424421

425-
Verify that pyinseq installed correctly by running:
422+
To activate your environment:
426423

427424
```bash
428-
(pyinseq) $ pyinseq --help
429-
2021-05-26 13:10 - INFO - pyinseq - Process command line arguments
430-
usage: pyinseq [-h] [--get_default_config] [--config_format CONFIG_FORMAT]
431-
[-c CONFIG] [-t THREADS] [--snakemake_params ...] [-v]
432-
[-i INPUT] [-s SAMPLES] [-e EXPERIMENT] [-g GENOME]
433-
[-d DISRUPTION] [--min_count MIN_COUNT] [--max_ratio MAX_RATIO]
434-
[--barcode_length BARCODE_LENGTH]
435-
[--transposon_seq TRANSPOSON_SEQ] [--gff3]
436-
{demultiplex,genomeprep} ...
437-
...
425+
$ conda activate pyinseq-py37
438426
```
439-
Now you are ready to run `pyinseq`!
440-
441-
### Using `virtualenv` and `pip`
442427

443-
#### Install `virtualenv` and create an environment
444-
445-
If conda is not available, you can manually install [Python 3.6](https://www.python.org/downloads/release/python-3613/) (or 3.7) and use `pip` to install `virtualenv`.
428+
You should see the name of your environment surrounded by parentheses in your terminal prompt.
446429

447430
```bash
448-
$ pip3 install virtualenv
431+
(pyinseq-py37) $
449432
```
450-
451-
Then use `virtualenv` to create a virtual environment. First, determine where your Python lives.
433+
#### Install `bowtie`:
452434

453435
```bash
454-
$ which python3
455-
/Library/Frameworks/Python.framework/Versions/3.6/bin/python3
436+
(pyinseq-py37) $ conda install -c bioconda bowtie
456437
```
438+
#### Install `pyinseq`:
457439

458-
Then use this path to point to the Python interpreter that will be used in the virtual environment called `pyinseq`.
440+
Install the stable version:
459441

460442
```bash
461-
$ virtualenv -p /Library/Frameworks/Python.framework/Versions/3.6/bin/python3 ~/venvs/pyinseq
443+
(pyinseq-py37) $ pip install pyinseq
462444
```
463445

464-
Activate this environment and install `pyinseq` using `pip`.
446+
Or, install the most recent version from GitHub:
465447

466-
```bash
467-
$ source ~/venvs/pyinseq/bin/activate
468-
(pyinseq) $ pip install pyinseq
469448
```
470-
471-
#### Install `bowtie` manually
472-
473-
Installation of `pyinseq` from `pip`/PyPi rather than conda will be missing [bowtie](http://bowtie-bio.sourceforge.net/index.shtml) (v1.3.0).
474-
Download the binary release [here](https://sourceforge.net/projects/bowtie-bio/files/bowtie/1.3.0/) or use `curl`. For example, below I am using `curl` to download the zipfile into my computer.
475-
476-
```bash
477-
# Download the zipfile with executables
478-
(pyinseq) $ curl -L https://sourceforge.net/projects/bowtie-bio/files/bowtie/1.3.0/bowtie-1.3.0-macos-x86_64.zip -O ~/bowtie-1.3.0-macos-x86_64.zip
479-
(pyinseq) $ unzip bowtie-1.3.0-macos-x86_64.zip
449+
(pyinseq-py37) $ pip install git+https://github.com/mjmlab/pyinseq
480450
```
481451

482-
Once you download the executables, you can add the `bin` folder to the `PATH` environment variable.
483452

484-
```bash
485-
(pyinseq) $ export PATH=~/bowtie-1.3.0-macos-x86_64/:$PATH
486-
```
487-
488-
Verify that `bowtie` executables are available on the terminal.
453+
Verify your installation with `--test`
489454

490455
```bash
491-
(pyinseq) $ bowtie --help
492-
usage: bowtie [-h] [-b | -i] [--verbose] [--debug] [--large-index]
493-
[--index INDEX]
494-
```
456+
(pyinseq-py37) $ pyinseq --test
495457

496-
### Install from source code
497458

498-
If the above methods are not for you, you can directly clone the repository from github and install `pyinseq`
459+
Verify that pyinseq installed correctly by running:
499460

500461
```bash
501-
$ git clone https://github.com/mjmlab/pyinseq
502-
$ cd pyinseq
503-
$ pip install ./
504-
```
505-
506-
Or just install directly from `github`.
507-
508-
```
509-
pip install git+git://github.com/mjmlab/pyinseq
462+
(pyinseq-py37) $ pyinseq --help
463+
2021-05-26 13:10 - INFO - pyinseq - Process command line arguments
464+
usage: pyinseq [-h] [--get_default_config] [--config_format CONFIG_FORMAT]
465+
[-c CONFIG] [-t THREADS] [--snakemake_params ...] [-v]
466+
[-i INPUT] [-s SAMPLES] [-e EXPERIMENT] [-g GENOME]
467+
[-d DISRUPTION] [--min_count MIN_COUNT] [--max_ratio MAX_RATIO]
468+
[--barcode_length BARCODE_LENGTH]
469+
[--transposon_seq TRANSPOSON_SEQ] [--gff3]
470+
{demultiplex,genomeprep} ...
471+
...
510472
```
511-
512-
> Make sure that `bowtie` executables are available in your `PATH` variable. You can also follow this [section](#install-bowtie-manually) to install bowtie.
473+
Now you are ready to run `pyinseq`!
513474

514475
### Testing
515476

516477
You can test your installation of `pyinseq` by using the option `--test`.
517478

518479
```bash
519-
$ pyinseq --test
480+
(pyinseq-py37) $ pyinseq --test
520481
```
521482

522483
If all tests pass then you are good to go!
@@ -532,11 +493,13 @@ Ensure that the file is in GenBank and not RefSeq format.
532493
You can do this two ways:
533494
* uninstalling pyinseq from the virtual environment
534495

535-
```pip uninstall pyinseq``` or ```conda remove pyinseq```
496+
```pip uninstall pyinseq```
536497

537498
* or completely remove the conda virtual environment.
538499

539-
``` conda env remove -n pyinseq```
500+
``` conda env remove -n pyinseq-py37```
501+
502+
Note: will need to `conda deactivate` first to leave the environment.
540503

541504
### How can I notify of an issue with `pyinseq`
542505

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ codecov>=2.0.5
1010
PyYAML>=3.11
1111
screed>=0.9
1212
snakemake>=5.31.1
13-
tqdm
13+
tqdm>=4.61.2

setup.cfg

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[metadata]
22
name = pyinseq
3-
version = 0.3.1
3+
version = 0.3.2
44
author =
55
Mark J. Mandel
66
Emanuel Burgos
@@ -23,8 +23,8 @@ classifiers =
2323
License :: OSI Approved :: BSD3 License,
2424
Operating System :: MacOS :: MacOS X,
2525
Operating System :: POSIX,
26-
Programming Language :: Python :: 3.6,
2726
Programming Language :: Python :: 3.7,
27+
Programming Language :: Python :: 3.8,
2828
Topic :: Scientific/Engineering :: Bio-Informatics,
2929

3030
[options]
@@ -40,7 +40,7 @@ package_data =
4040
envs/bowtie.yaml
4141
scripts =
4242
scripts/pyinseq
43-
python_requires = >=3.6.*, >=3.7.*
43+
python_requires = >=3.7.*, >=3.8.*
4444
setup_requires = pytest-runner
4545
tests_require= pytest
4646
install_requires =

0 commit comments

Comments
 (0)