Skip to content

Commit 577d0bc

Browse files
authored
Update info for pypi, release 0.3.0 (#81)
1 parent 6a4fb32 commit 577d0bc

15 files changed

+113
-49
lines changed

CHANGELOG.md

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,31 @@
11
# Changelog
22

3-
## [0.3.0] - Unreleased
3+
## [0.3.0] - 2021-07-09
44
### Fixed
5-
- Refactor demultiplex script
6-
- Logger is now compatible with snakemake logging
7-
- Bugs in gbk_convert
5+
- Refactor demultiplex.py for readability and faster execution
6+
- Logger is now compatible with snakemake logging module
7+
- Fixed small parsing bugs in gbk_convert.py
88

99
### Changed
1010
- Remove third party folder which contained 'bowtie' executables
1111
- file paths are now handled by pathlib
1212
- New settings class that is compatible with snakemake
1313
- The map_reads script is now a stand-alone script
14+
- Settings class which is used by snakemake and pyinseq
15+
- Pyinseq and snakemake now use `pathlib` for handling filepaths
16+
- Removed readthedocs website
17+
- Removed docs/
18+
- Removed third-party/
1419

1520
### Added
16-
- Workflows are now executed by snakemake
17-
- Snakefiles for each command of pyinseq
18-
- New command line parser function
19-
- Conda environment files to install `bowtie`
20-
- An option for running pytest on pyinseq
21-
- New tests for pyinseq
21+
- Snakemake can now execute workflows using Snakefile in pyinseq
22+
- Additional Snakefiles for genomprep and demultiplex of pyinseq
23+
- Conda virtual environment files that allow conda to install `bowtie` software during runtime
24+
- Parser.py script for parsing command line arguments
25+
- Include '--test' option for running pytest on pyinseq
26+
- New pytests for testing workflows in pyinseq
27+
- Pyinseq will now summarize sample information and snakemake output
28+
- New user guide for pyinseq
2229

2330

2431
## [0.2.1] - 2021-06-02

LICENSE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2015-2021, Mark J. Mandel
1+
Copyright (c) 2015-2021, The Authors
22
All rights reserved.
33

44
Redistribution and use in source and binary forms, with or

MANIFEST.in

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
11
include pyinseq/VERSION
2-
graft pyinseq/third-party
2+
include pyinseq/workflows/PyinseqWorkflow/Snakefile
3+
include pyinseq/workflows/DemultiplexWorkflow/Snakefile
4+
include pyinseq/workflows/GenomeprepWorkflow/Snakefile
5+
include pyinseq/envs/bowtie.yaml

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ $ pyinseq -i <input file> -s <sample file> -g <genbank file> -e <experiment name
127127

128128
- Number of cores to use for execution
129129

130-
`--additional_params`
130+
`--snakemake_params`
131131

132132
- Additional parameters that will get passed to `snakemake`.
133133

@@ -301,7 +301,7 @@ $ pyinseq -i reads.fastq -s samples.txt -g genome.gbk -e pyinseq --threads 4
301301

302302
```bash
303303
$ cat demo-run-config.yaml
304-
additional_params: []
304+
snakemake_params: []
305305
barcode_length: 4
306306
command: pyinseq
307307
config: false
@@ -322,7 +322,7 @@ transposon_seq: ACAGGTTG
322322
If you installed **conda** in your terminal, you can use the option `--use-conda` which will install bowtie during the executuion of the workflow.
323323

324324
```bash
325-
$ pyinseq -i reads.fastq -s samples.txt -g genome.gbk -e demo-run --threads 4 --additional_params --use-conda
325+
$ pyinseq -i reads.fastq -s samples.txt -g genome.gbk -e demo-run --threads 4 --snakemake_params --use-conda
326326
```
327327

328328
You can also get a default configuration file by using `--get_default_config` and modify it using a text-editor.
@@ -433,7 +433,7 @@ Verify that pyinseq installed correctly by running:
433433
(pyinseq) $ pyinseq --help
434434
2021-05-26 13:10 - INFO - pyinseq - Process command line arguments
435435
usage: pyinseq [-h] [--get_default_config] [--config_format CONFIG_FORMAT]
436-
[-c CONFIG] [-t THREADS] [--additional_params ...] [-v]
436+
[-c CONFIG] [-t THREADS] [--snakemake_params ...] [-v]
437437
[-i INPUT] [-s SAMPLES] [-e EXPERIMENT] [-g GENOME]
438438
[-d DISRUPTION] [--min_count MIN_COUNT] [--max_ratio MAX_RATIO]
439439
[--barcode_length BARCODE_LENGTH]

RELEASECHECKLIST.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
- [ ] Change version number in pyinseq/VERSION
2-
- [ ] Change short and full version in docs/conf.py
3-
- [ ] Check copyright date in docs/conf.py
42
- [ ] Update CHANGELOG.md, prepare text for GitHub release
53
- [ ] Commit changes and ensure that the commit passes tests
64
- [ ] Tag the release and push to GitHub
7-
- [ ] Upload to pypitest: `python setup.py sdist upload -r pypitest`
8-
- [ ] Upload to pypi: `python setup.py sdist upload -r pypi`
5+
- [ ] Upload to pypitest: `python3 -m twine upload --repository testpypi dist/*`
6+
- [ ] Upload to pypi: `python3 -m twine upload dist/*`

pyinseq/VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.2.1
1+
0.3.0

pyinseq/parsers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ def get_snake_parser():
4141
type=int,
4242
)
4343
snake_group.add_argument(
44-
"--additional_params",
44+
"--snakemake_params",
4545
help="Additional params passed to snakemake. "
4646
"This should be included at the end of the command since everything will be passed to snakemake so make sure they are correct. "
4747
"For example, you can use `-n` to check which files snakemake will create without execution the full workflow.",

pyinseq/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def __init__(self, config_file):
4747
"--quiet",
4848
]
4949
# Add additional parameters, if any...
50-
self.snakemake_cmd.extend(config_dict["additional_params"])
50+
self.snakemake_cmd.extend(config_dict["snakemake_params"])
5151
self.snakemake_cmd = " ".join(self.snakemake_cmd)
5252

5353
def __repr__(self):
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
additional_params: []
21
barcode_length: 4
32
command: demultiplex
4-
config: false
5-
config_format: yaml
3+
config: null
4+
config_format: yml
65
disruption: 0.9
76
experiment: test_demultiplex
87
genome: null
@@ -13,6 +12,7 @@ max_ratio: 10
1312
min_count: 3
1413
notrim: false
1514
samples: ../data/input/example01.txt
15+
snakemake_params: []
1616
test: false
1717
threads: 4
18-
transposon_seq: ACAGGTTG
18+
transposon_seq: ACAGGTTG

pyinseq/tests/data/input/genomeprep-config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
additional_params: []
1+
snakemake_params: []
22
barcode_length: 4
33
command: genomeprep
44
config: false

pyinseq/tests/data/input/test-pyinseq-config.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
additional_params:
2-
- --use-conda
31
barcode_length: 4
42
command: pyinseq
53
config: null
@@ -13,6 +11,8 @@ input: ../data/input/example01.fastq
1311
max_ratio: 10
1412
min_count: 3
1513
samples: ../data/input/example01.txt
14+
snakemake_params:
15+
- --use-conda
1616
test: false
1717
threads: 2
1818
transposon_seq: ACAGGTTG

pyinseq/tests/test_functions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ def test_write_config_file(datadir, tmpdir):
111111
"0.9",
112112
"--threads",
113113
"2",
114-
"--additional_params",
114+
"--snakemake_params",
115115
"--use-conda",
116116
]
117117
# Get the Namespace object from argparse

pyinseq/tests/test_script.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def test_pyinseq_script(datadir, tmpdir):
3434
output_name,
3535
"-d",
3636
"0.9",
37-
"--additional_params",
37+
"--snakemake_params",
3838
"--use-conda",
3939
]
4040
status, out, err = runscript("pyinseq", args, directory=str(tmpdir))
@@ -77,7 +77,7 @@ def test_pyinseq_script_unique_transp_barcode_length(datadir, tmpdir):
7777
"9",
7878
"--transposon_seq",
7979
"TCGCACGG",
80-
"--additional_params",
80+
"--snakemake_params",
8181
"--use-conda",
8282
]
8383
status, out, err = runscript("pyinseq", args, directory=str(tmpdir))
@@ -152,7 +152,7 @@ def test_pyinseq_genomeprep_script(datadir, tmpdir):
152152
output_name,
153153
"-g",
154154
gb_fn,
155-
"--additional_params",
155+
"--snakemake_params",
156156
"--use-conda",
157157
]
158158
status, out, err = runscript("pyinseq", args, directory=str(tmpdir))
@@ -175,7 +175,7 @@ def test_pyinseq_genomeprep_gff_script(datadir, tmpdir):
175175
"-g",
176176
gb_fn,
177177
"--gff",
178-
"--additional_params",
178+
"--snakemake_params",
179179
"--use-conda",
180180
]
181181
status, out, err = runscript("pyinseq", args, directory=str(tmpdir))

setup.cfg

Lines changed: 62 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,62 @@
1-
[aliases]
2-
test=pytest
3-
description-file=README.md
1+
[metadata]
2+
name = pyinseq
3+
version = 0.3.0
4+
author =
5+
Mark J. Mandel
6+
Emanuel Burgos
7+
Camille Scott
8+
Loren Velasquez
9+
Benjamin K. Johnson
10+
author_email = mandel01@gmail.com
11+
description = Analysis of transposon insertion sequencing (INSeq) data in Python
12+
long_description = file: README.md
13+
long_description_content_type = text/markdown
14+
license = BSD 3-Clause License
15+
license_files = LICENSE.md
16+
url = https://github.com/mjmlab/pyinseq
17+
project_urls =
18+
Documentation = https://github.com/mjmlab/pyinseq/blob/master/README.md
19+
platforms = MacOS, Linux/Unix
20+
classifiers =
21+
Development Status :: 5 - Production/Stable,
22+
Intended Audience :: Science/Research,
23+
License :: OSI Approved :: BSD3 License,
24+
Operating System :: MacOS :: MacOS X,
25+
Operating System :: POSIX,
26+
Programming Language :: Python :: 3.6,
27+
Programming Language :: Python :: 3.7,
28+
Topic :: Scientific/Engineering :: Bio-Informatics,
29+
30+
[options]
31+
zip_safe = False
32+
package_dir =
33+
= pyinseq
34+
include_package_data = True
35+
packages = find:
36+
package_data =
37+
pyinseq/workflows/PyinseqWorkflow/Snakefile
38+
workflows/DemultiplexWorkflow/Snakefile
39+
workflows/GenomeprepWorkflow/Snakefile
40+
envs/bowtie.yaml
41+
scripts =
42+
scripts/pyinseq
43+
python_requires = >=3.6.*, >=3.7.*
44+
setup_requires = pytest-runner
45+
tests_require= pytest
46+
install_requires =
47+
black >=18.9b0
48+
matplotlib >=1.5.0
49+
seaborn >=0.6.0
50+
numpy >=1.10.0
51+
pandas >=0.18.1
52+
pre-commit >=1.12.0
53+
pytest >=2.8.1
54+
pytest-cov >=2.4.0
55+
codecov >=2.0.5
56+
PyYAML >=3.11
57+
screed >=0.9
58+
snakemake >=5.31.1
59+
tqdm >=4.61.2
60+
61+
[options.packages.find]
62+
where = pyinseq

setup.py

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -26,18 +26,15 @@
2626
with open("README.md", "r") as fh:
2727
long_description = fh.read()
2828

29-
with open("requirements.txt", "r") as fh:
30-
requirements = fh.readlines()
3129

3230
# Collect paths to Snakefile's and ENVS
3331
snake_data = [
34-
"workflows/PyinseqWorkflow/Snakefile",
35-
"workflows/DemultiplexWorkflow/Snakefile",
36-
"workflows/GenomeprepWorkflow/Snakefile",
37-
"envs/bowtie.yaml",
32+
"pyinseq/workflows/PyinseqWorkflow/Snakefile",
33+
"pyinseq/workflows/DemultiplexWorkflow/Snakefile",
34+
"pyinseq/workflows/GenomeprepWorkflow/Snakefile",
35+
"pyinseq/envs/bowtie.yaml",
3836
]
3937

40-
4138
def main():
4239
setup(
4340
name="pyinseq",
@@ -46,7 +43,7 @@ def main():
4643
long_description=long_description,
4744
long_description_content_type="text/markdown",
4845
url="https://github.com/mjmlab/pyinseq",
49-
author="Mark J. Mandel",
46+
author="Mark J. Mandel,Emanuel Burgos,Camille Scott,Loren Velasquez,Benjamin K. Johnson",
5047
author_email="mandel01@gmail.com",
5148
license="BSD",
5249
packages=find_packages(),
@@ -56,18 +53,18 @@ def main():
5653
scripts=SCRIPTS,
5754
setup_requires=["pytest-runner"],
5855
tests_require=["pytest"],
59-
install_requires=requirements,
56+
python_requires='!=3.8.*,>=3.6.*',
6057
classifiers=[
6158
"Development Status :: 4 - Beta",
6259
"Intended Audience :: Science/Research",
6360
"License :: OSI Approved :: BSD License",
6461
"Operating System :: MacOS :: MacOS X",
6562
"Operating System :: POSIX",
66-
"Programming Language :: Python :: 3.5",
63+
"Programming Language :: Python :: 3.6",
64+
"Programming Language :: Python :: 3.7",
6765
"Topic :: Scientific/Engineering :: Bio-Informatics",
6866
],
6967
zip_safe=False,
70-
7168
)
7269

7370

0 commit comments

Comments
 (0)