Skip to content
This repository has been archived by the owner on Aug 14, 2023. It is now read-only.

Commit

Permalink
Rename package to 'indextools' to avoid collision with existing idxto…
Browse files Browse the repository at this point in the history
…ols package
  • Loading branch information
jdidion committed May 16, 2019
1 parent b2761d7 commit 657892d
Show file tree
Hide file tree
Showing 14 changed files with 29 additions and 32 deletions.
7 changes: 2 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
repo = dnanexus/IndexTools
package = idxtools
package = indextools
version = 0.1.0
tests = tests

Expand Down Expand Up @@ -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
Expand All @@ -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}'

4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion idxtools/bed.py → indextools/bed.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
16 changes: 8 additions & 8 deletions idxtools/console/__init__.py → indextools/console/__init__.py
Original file line number Diff line number Diff line change
@@ -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

Expand Down Expand Up @@ -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)
Expand All @@ -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)
Expand All @@ -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
# )
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions idxtools/console/split.py → indextools/console/split.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
6 changes: 3 additions & 3 deletions idxtools/index.py → indextools/index.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion idxtools/intervals.py → indextools/intervals.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
cast,
)

from idxtools.utils import OrderedSet
from indextools.utils import OrderedSet

from ngsindex.utils import DefaultDict

Expand Down
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -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 <jdidion@dnanexus.com>"]
Expand All @@ -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"]
Expand Down

0 comments on commit 657892d

Please sign in to comment.