gtars 0.0.15__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (86) hide show
  1. gtars-0.0.15/PKG-INFO +27 -0
  2. gtars-0.0.15/README.md +85 -0
  3. gtars-0.0.15/bindings/.gitignore +72 -0
  4. gtars-0.0.15/bindings/Cargo.lock +672 -0
  5. gtars-0.0.15/bindings/Cargo.toml +17 -0
  6. gtars-0.0.15/bindings/README.md +18 -0
  7. gtars-0.0.15/bindings/gtars/__init__.py +1 -0
  8. gtars-0.0.15/bindings/gtars/__init__.pyi +1 -0
  9. gtars-0.0.15/bindings/gtars/ailist/__init__.py +1 -0
  10. gtars-0.0.15/bindings/gtars/ailist/__init__.pyi +50 -0
  11. gtars-0.0.15/bindings/gtars/models/__init__.py +1 -0
  12. gtars-0.0.15/bindings/gtars/models/__init__.pyi +9 -0
  13. gtars-0.0.15/bindings/gtars/tokenizers/__init__.py +1 -0
  14. gtars-0.0.15/bindings/gtars/tokenizers/__init__.pyi +551 -0
  15. gtars-0.0.15/bindings/gtars/utils/__init__.py +1 -0
  16. gtars-0.0.15/bindings/gtars/utils/__init__.pyi +18 -0
  17. gtars-0.0.15/bindings/src/ailist/mod.rs +50 -0
  18. gtars-0.0.15/bindings/src/lib.rs +37 -0
  19. gtars-0.0.15/bindings/src/models/interval.rs +20 -0
  20. gtars-0.0.15/bindings/src/models/mod.rs +21 -0
  21. gtars-0.0.15/bindings/src/models/region.rs +157 -0
  22. gtars-0.0.15/bindings/src/models/region_set.rs +191 -0
  23. gtars-0.0.15/bindings/src/models/universe.rs +88 -0
  24. gtars-0.0.15/bindings/src/tokenizers/builder.rs +48 -0
  25. gtars-0.0.15/bindings/src/tokenizers/fragments_tokenizer.rs +88 -0
  26. gtars-0.0.15/bindings/src/tokenizers/meta_tokenizer.rs +204 -0
  27. gtars-0.0.15/bindings/src/tokenizers/mod.rs +26 -0
  28. gtars-0.0.15/bindings/src/tokenizers/tree_tokenizer.rs +204 -0
  29. gtars-0.0.15/bindings/src/utils/mod.rs +73 -0
  30. gtars-0.0.15/gtars/Cargo.toml +24 -0
  31. gtars-0.0.15/gtars/__init__.py +1 -0
  32. gtars-0.0.15/gtars/__init__.pyi +1 -0
  33. gtars-0.0.15/gtars/ailist/__init__.py +1 -0
  34. gtars-0.0.15/gtars/ailist/__init__.pyi +50 -0
  35. gtars-0.0.15/gtars/docs/changelog.md +67 -0
  36. gtars-0.0.15/gtars/docs/logo.svg +246 -0
  37. gtars-0.0.15/gtars/docs/universes.svg +1172 -0
  38. gtars-0.0.15/gtars/models/__init__.py +1 -0
  39. gtars-0.0.15/gtars/models/__init__.pyi +9 -0
  40. gtars-0.0.15/gtars/src/ailist/core.rs +182 -0
  41. gtars-0.0.15/gtars/src/ailist/mod.rs +12 -0
  42. gtars-0.0.15/gtars/src/common/consts.rs +33 -0
  43. gtars-0.0.15/gtars/src/common/mod.rs +143 -0
  44. gtars-0.0.15/gtars/src/common/models/mod.rs +12 -0
  45. gtars-0.0.15/gtars/src/common/models/region.rs +6 -0
  46. gtars-0.0.15/gtars/src/common/models/region_set.rs +113 -0
  47. gtars-0.0.15/gtars/src/common/models/tokenized_region.rs +28 -0
  48. gtars-0.0.15/gtars/src/common/models/tokenized_regionset.rs +161 -0
  49. gtars-0.0.15/gtars/src/common/models/universe.rs +90 -0
  50. gtars-0.0.15/gtars/src/common/utils.rs +148 -0
  51. gtars-0.0.15/gtars/src/io/consts.rs +3 -0
  52. gtars-0.0.15/gtars/src/io/gtok.rs +190 -0
  53. gtars-0.0.15/gtars/src/io/mod.rs +28 -0
  54. gtars-0.0.15/gtars/src/lib.rs +40 -0
  55. gtars-0.0.15/gtars/src/main.rs +37 -0
  56. gtars-0.0.15/gtars/src/tokenizers/builder.rs +56 -0
  57. gtars-0.0.15/gtars/src/tokenizers/cli.rs +70 -0
  58. gtars-0.0.15/gtars/src/tokenizers/config.rs +38 -0
  59. gtars-0.0.15/gtars/src/tokenizers/fragment_tokenizer.rs +351 -0
  60. gtars-0.0.15/gtars/src/tokenizers/meta_tokenizer.rs +591 -0
  61. gtars-0.0.15/gtars/src/tokenizers/mod.rs +47 -0
  62. gtars-0.0.15/gtars/src/tokenizers/soft_tokenizer.rs +6 -0
  63. gtars-0.0.15/gtars/src/tokenizers/special_tokens.rs +27 -0
  64. gtars-0.0.15/gtars/src/tokenizers/traits.rs +134 -0
  65. gtars-0.0.15/gtars/src/tokenizers/tree_tokenizer.rs +560 -0
  66. gtars-0.0.15/gtars/src/uniwig/mod.rs +16 -0
  67. gtars-0.0.15/gtars/tests/README.md +1 -0
  68. gtars-0.0.15/gtars/tests/data/chroms.bed +24 -0
  69. gtars-0.0.15/gtars/tests/data/chroms.meta.bed +23 -0
  70. gtars-0.0.15/gtars/tests/data/excluderanges.bed.gz +0 -0
  71. gtars-0.0.15/gtars/tests/data/out/peaks.gtok +0 -0
  72. gtars-0.0.15/gtars/tests/data/out/to_tokenize.gtok +0 -0
  73. gtars-0.0.15/gtars/tests/data/out/tokens.gtok +0 -0
  74. gtars-0.0.15/gtars/tests/data/pbmc_hg38.h5ad +0 -0
  75. gtars-0.0.15/gtars/tests/data/peaks.bed +25 -0
  76. gtars-0.0.15/gtars/tests/data/peaks.bed.gz +0 -0
  77. gtars-0.0.15/gtars/tests/data/peaks.meta.bed +25 -0
  78. gtars-0.0.15/gtars/tests/data/to_tokenize.bed +3 -0
  79. gtars-0.0.15/gtars/tests/data/tokenizer.meta.toml +1 -0
  80. gtars-0.0.15/gtars/tests/data/tokenizer.toml +2 -0
  81. gtars-0.0.15/gtars/tests/data/tokenizer_bad.toml +3 -0
  82. gtars-0.0.15/gtars/tokenizers/__init__.py +1 -0
  83. gtars-0.0.15/gtars/tokenizers/__init__.pyi +551 -0
  84. gtars-0.0.15/gtars/utils/__init__.py +1 -0
  85. gtars-0.0.15/gtars/utils/__init__.pyi +18 -0
  86. gtars-0.0.15/pyproject.toml +22 -0
gtars-0.0.15/PKG-INFO ADDED
@@ -0,0 +1,27 @@
1
+ Metadata-Version: 2.3
2
+ Name: gtars
3
+ Version: 0.0.15
4
+ Classifier: Programming Language :: Rust
5
+ Classifier: Programming Language :: Python :: Implementation :: CPython
6
+ Classifier: Programming Language :: Python :: Implementation :: PyPy
7
+ Requires-Python: >=3.8
8
+ Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
9
+
10
+ # gtars
11
+ This is a python wrapper around the `gtars` crate. It provides an easy interface for using `gtars` in python. It is currently in early development, and as such, it does not have a lot of functionality yet, but new tools are being worked on right now.
12
+
13
+ ## Installation
14
+ You can get `gtars` from PyPI:
15
+ ```bash
16
+ pip install gtars
17
+ ```
18
+
19
+ ## Usage
20
+ Import the package, and use the tools:
21
+ ```python
22
+ import gtars as gt
23
+
24
+ gt.prune_universe(...)
25
+ ```
26
+ ## Developer docs
27
+ Write the develop docs here...
gtars-0.0.15/README.md ADDED
@@ -0,0 +1,85 @@
1
+ [![codecov](https://codecov.io/gh/databio/gtars/branch/master/graph/badge.svg)](https://codecov.io/gh/databio/gtars)
2
+ [![crates.io](https://img.shields.io/crates/v/gtars?&logo=rust)](https://crates.io/crates/gtars)
3
+
4
+ <h1 align="center">
5
+ <img src="gtars/docs/logo.svg" alt="gtars logo" height="100px">
6
+ </h1>
7
+
8
+ `gtars` is a rust crate that provides a set of tools for working with genomic interval data. Its primary goal is to provide processors for our python package, [`geniml`](https:github.com/databio/geniml), a library for machine learning on genomic intervals. However, it can be used as a standalone library for working with genomic intervals as well.
9
+
10
+ `gtars` provides three things:
11
+
12
+ 1. A rust library crate.
13
+ 2. A command-line interface, written in rust.
14
+ 3. A Python package that provides bindings to the rust library.
15
+
16
+ ## Repository organization (for developers)
17
+
18
+ This repo is organized like so:
19
+
20
+ 1. A rust library crate (`/gtars/lib.rs`) that provides functions, traits, and structs for working with genomic interval data.
21
+ 2. A rust binary crate (in `/gtars/main.rs`), a small, wrapper command-line interface for the library crate.
22
+ 3. A rust crate (in `/bindings`) that provides Python bindings, and a resulting Python package, so that it can be used within Python.
23
+
24
+ This repository is a work in progress, and still in early development.
25
+
26
+ ## Installation
27
+ To install `gtars`, you must have the rust toolchain installed. You can install it by following the instructions [here](https://www.rust-lang.org/tools/install).
28
+
29
+ You may build the binary locally using `cargo build --release`. This will create a binary in `target/release/gtars`. You can then add this to your path, or run it directly.
30
+
31
+ ## Usage
32
+ `gtars` is very early in development, and as such, it does not have a lot of functionality yet. However, it does have a few useful tools. To see the available tools, run `gtars --help`. To see the help for a specific tool, run `gtars <tool> --help`.
33
+
34
+ Alternatively, you can link `gtars` as a library in your rust project. To do so, add the following to your `Cargo.toml` file:
35
+ ```toml
36
+ [dependencies]
37
+ gtars = { git = "https://github.com/databio/gtars" }
38
+ ```
39
+
40
+ ## Testing
41
+ To run the tests, run `cargo test`.
42
+
43
+ ## Contributing
44
+ ### New internal library crate tools
45
+ If you'd like to add a new tool, you can do so by creating a new module within the src folder.
46
+
47
+ ### New public library crate tools
48
+ If you want this to be available to users of `gtars`, you can add it to the `gtars` library crate as well. To do so, add the following to `src/lib.rs`:
49
+ ```rust
50
+ pub mod <tool_name>;
51
+ ```
52
+
53
+ ### New binary crate tools
54
+ Finally, if you want to have command-line functionality, you can add it to the `gtars` binary crate. This requires two steps:
55
+ 1. Create a new `cli` using `clap` inside the `interfaces` module of `src/cli.rs`:
56
+ ```rust
57
+ pub fn make_new_tool_cli() -> Command {
58
+
59
+ }
60
+ ```
61
+
62
+ 2. Write your logic in a wrapper function. This will live inside the `functions` module of `src/cli.rs`:
63
+ ```rust
64
+ // top of file:
65
+ use tool_name::{ ... }
66
+
67
+ // inside the module:
68
+ pub fn new_tool_wrapper() -> Result<(), Box<dyn Error>> {
69
+ // your logic here
70
+ }
71
+ ```
72
+
73
+ Please make sure you update the changelog and bump the version number in `Cargo.toml` when you add a new tool.
74
+
75
+ ### VSCode users
76
+ If you are using VSCode, make sure you link to the `Cargo.toml` inside the `.vscode` folder, so that `rust-analyzer` can link it all together:
77
+ ```json
78
+ {
79
+ "rust-analyzer.linkedProjects": [
80
+ "./vocab/Cargo.toml",
81
+ "./Cargo.toml"
82
+ "./new-tool/Cargo.toml"
83
+ ]
84
+ }
85
+ ```
@@ -0,0 +1,72 @@
1
+ /target
2
+
3
+ # Byte-compiled / optimized / DLL files
4
+ __pycache__/
5
+ .pytest_cache/
6
+ *.py[cod]
7
+
8
+ # C extensions
9
+ *.so
10
+
11
+ # Distribution / packaging
12
+ .Python
13
+ .venv/
14
+ env/
15
+ bin/
16
+ build/
17
+ develop-eggs/
18
+ dist/
19
+ eggs/
20
+ lib/
21
+ lib64/
22
+ parts/
23
+ sdist/
24
+ var/
25
+ include/
26
+ man/
27
+ venv/
28
+ *.egg-info/
29
+ .installed.cfg
30
+ *.egg
31
+
32
+ # Installer logs
33
+ pip-log.txt
34
+ pip-delete-this-directory.txt
35
+ pip-selfcheck.json
36
+
37
+ # Unit test / coverage reports
38
+ htmlcov/
39
+ .tox/
40
+ .coverage
41
+ .cache
42
+ nosetests.xml
43
+ coverage.xml
44
+
45
+ # Translations
46
+ *.mo
47
+
48
+ # Mr Developer
49
+ .mr.developer.cfg
50
+ .project
51
+ .pydevproject
52
+
53
+ # Rope
54
+ .ropeproject
55
+
56
+ # Django stuff:
57
+ *.log
58
+ *.pot
59
+
60
+ .DS_Store
61
+
62
+ # Sphinx documentation
63
+ docs/_build/
64
+
65
+ # PyCharm
66
+ .idea/
67
+
68
+ # VSCode
69
+ .vscode/
70
+
71
+ # Pyenv
72
+ .python-version