diff --git a/Makefile b/Makefile index 033e298..fcc9857 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ repo = dnanexus/IndexTools -package = idxtools +package = indextools version = 0.1.0 tests = tests @@ -48,9 +48,7 @@ release: # build $(BUILD) #$(TEST) - python setup.py sdist bdist_wheel - # release - python setup.py sdist upload -r pypi + poetry publish # push new tag after successful build git push origin --tags # create release in GitHub @@ -59,4 +57,3 @@ release: -H "Authorization: token $(token)" \ https://api.github.com/repos/$(repo)/releases \ -d '{"tag_name":"$(version)","target_commitish": "master","name": "$(version)","body": "$(desc)","draft": false,"prerelease": false}' - diff --git a/README.md b/README.md index eefcc88..7cf37b7 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ Common index formats, such as BAM Index (BAI) and Tabix (TBI), contain coarse-gr ## Installation ```bash -pip install idxtools +pip install indextools ``` ## Commands @@ -16,7 +16,7 @@ The `partition` command processes a BAM index file and generates a file in BED f ```bash # Generate a BED with 10 partitions -idxtools partition -I tests/data/small.bam.bai \ +indextools partition -I tests/data/small.bam.bai \ -z tests/data/contig_sizes.txt \ -n 10 \ -o small.partitions.bed diff --git a/idxtools/__init__.py b/indextools/__init__.py similarity index 100% rename from idxtools/__init__.py rename to indextools/__init__.py diff --git a/idxtools/bed.py b/indextools/bed.py similarity index 99% rename from idxtools/bed.py rename to indextools/bed.py index 7f2d52c..53eaede 100644 --- a/idxtools/bed.py +++ b/indextools/bed.py @@ -5,7 +5,7 @@ import subprocess from typing import Callable, Iterable, Iterator, Optional, Sequence, Union, Tuple -from idxtools.intervals import GenomeInterval +from indextools.intervals import GenomeInterval from xphyle import STDOUT, open_ from xphyle.utils import read_delimited diff --git a/idxtools/console/__init__.py b/indextools/console/__init__.py similarity index 89% rename from idxtools/console/__init__.py rename to indextools/console/__init__.py index 6a96a75..742ebd9 100644 --- a/idxtools/console/__init__.py +++ b/indextools/console/__init__.py @@ -1,12 +1,12 @@ """IndexTools command line interface. """ -from idxtools.console import ( +from indextools.console import ( partition, features, split, commands ) -from idxtools.regions import Regions, parse_region +from indextools.regions import Regions, parse_region import autoclick as ac @@ -47,13 +47,13 @@ def merge_short_names(d): @ac.group() -def idxtools(): +def indextools(): pass # Partition genomic regions based on read density estimated # from an index. -idxtools.command( +indextools.command( decorated=partition.partition, types={ "slop": ac.DelimitedList(int) @@ -70,14 +70,14 @@ def idxtools(): # Count the features (e.g. reads, variants) in a primary file # within partitions (e.g. output by the 'partition' command). -idxtools.command( +indextools.command( decorated=features.features ) # Split a primary file (e.g. BAM, VCF) into chunks based on # a partition BED file (e.g. output by the 'partition' command). -idxtools.command( +indextools.command( decorated=split.split, types={ "slop": ac.DelimitedList(int) @@ -93,12 +93,12 @@ def idxtools(): # Generate a list commands, one per partition, given a template # and a partition BED file (e.g. output by the 'partition' command). -# idxtools.command( +# indextools.command( # decorated=commands.commands # ) # -# idxtools.command( +# indextools.command( # decorated=run # ) diff --git a/idxtools/console/commands.py b/indextools/console/commands.py similarity index 95% rename from idxtools/console/commands.py rename to indextools/console/commands.py index f108883..5e5443b 100644 --- a/idxtools/console/commands.py +++ b/indextools/console/commands.py @@ -3,7 +3,7 @@ import autoclick as ac from xphyle import open_ -from idxtools.bed import BedInterval, iter_bed_interval_groups, iter_bed_intervals +from indextools.bed import BedInterval, iter_bed_interval_groups, iter_bed_intervals def commands( diff --git a/idxtools/console/features.py b/indextools/console/features.py similarity index 92% rename from idxtools/console/features.py rename to indextools/console/features.py index 67bc1b6..2403517 100644 --- a/idxtools/console/features.py +++ b/indextools/console/features.py @@ -3,8 +3,8 @@ import autoclick as ac import pysam -from idxtools.bed import GenomeInterval, iter_bed_intervals, write_intervals_bed -from idxtools.utils import replace_suffix +from indextools.bed import GenomeInterval, iter_bed_intervals, write_intervals_bed +from indextools.utils import replace_suffix def features( diff --git a/idxtools/console/partition.py b/indextools/console/partition.py similarity index 93% rename from idxtools/console/partition.py rename to indextools/console/partition.py index fe25721..5170c88 100644 --- a/idxtools/console/partition.py +++ b/indextools/console/partition.py @@ -4,11 +4,11 @@ import pathlib from typing import Callable, List, Optional, cast -from idxtools.bed import write_intervals_bed -from idxtools.index import IntervalGrouping, group_intervals -from idxtools.intervals import GenomeInterval -from idxtools.regions import Regions -from idxtools.utils import References, split_path +from indextools.bed import write_intervals_bed +from indextools.index import IntervalGrouping, group_intervals +from indextools.intervals import GenomeInterval +from indextools.regions import Regions +from indextools.utils import References, split_path import autoclick as ac from ngsindex import IndexType, CoordinateIndex, resolve_index_file, parse_index diff --git a/idxtools/console/split.py b/indextools/console/split.py similarity index 96% rename from idxtools/console/split.py rename to indextools/console/split.py index 6adfd6d..4820dc9 100644 --- a/idxtools/console/split.py +++ b/indextools/console/split.py @@ -6,8 +6,8 @@ import autoclick as ac import pysam -from idxtools.bed import BedInterval, iter_bed_interval_groups -from idxtools.utils import References, split_path +from indextools.bed import BedInterval, iter_bed_interval_groups +from indextools.utils import References, split_path class FeatureInclusion(enum.Enum): diff --git a/idxtools/index.py b/indextools/index.py similarity index 99% rename from idxtools/index.py rename to indextools/index.py index e305742..23185fd 100644 --- a/idxtools/index.py +++ b/indextools/index.py @@ -3,9 +3,9 @@ import statistics from typing import Iterator, List, Optional, Sequence, Tuple, Union, Iterable -from idxtools.intervals import GenomeInterval, IVL -from idxtools.regions import Regions -from idxtools.utils import References +from indextools.intervals import GenomeInterval, IVL +from indextools.regions import Regions +from indextools.utils import References from ngsindex import CoordinateIndex, Offset diff --git a/idxtools/intervals.py b/indextools/intervals.py similarity index 99% rename from idxtools/intervals.py rename to indextools/intervals.py index 3d009d8..789d293 100644 --- a/idxtools/intervals.py +++ b/indextools/intervals.py @@ -37,7 +37,7 @@ cast, ) -from idxtools.utils import OrderedSet +from indextools.utils import OrderedSet from ngsindex.utils import DefaultDict diff --git a/idxtools/regions.py b/indextools/regions.py similarity index 100% rename from idxtools/regions.py rename to indextools/regions.py diff --git a/idxtools/utils.py b/indextools/utils.py similarity index 100% rename from idxtools/utils.py rename to indextools/utils.py diff --git a/pyproject.toml b/pyproject.toml index ba2471c..223670b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,5 @@ [tool.poetry] -name = "idxtools" +name = "indextools" version = "0.1.0" description = "A toolkit for accelerating genomics using index files. " authors = ["John Didion "] @@ -18,7 +18,7 @@ pytest = "^3.0" jinja2 = ["jinja2"] [tool.poetry.scripts] -idxtools = "idxtools.console:idxtools" +indextools = "indextools.console:indextools" [build-system] requires = ["poetry>=0.12"]