{"id":20425011,"url":"https://github.com/databio/gtars","last_synced_at":"2025-04-12T18:54:34.852Z","repository":{"id":243891042,"uuid":"715269074","full_name":"databio/gtars","owner":"databio","description":"Performance-critical tools to manipulate, analyze, and process genomic interval data. Primarily focused on building tools for geniml - our genomic machine learning python package.","archived":false,"fork":false,"pushed_at":"2025-04-03T20:17:51.000Z","size":1485,"stargazers_count":5,"open_issues_count":35,"forks_count":3,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-04-03T21:25:29.087Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/databio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-11-06T19:59:07.000Z","updated_at":"2025-03-05T17:15:41.000Z","dependencies_parsed_at":"2024-06-25T16:50:37.933Z","dependency_job_id":"255fea60-dffa-4290-ba93-a3bc4f2014b9","html_url":"https://github.com/databio/gtars","commit_stats":null,"previous_names":["databio/gtars"],"tags_count":19,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/databio%2Fgtars","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/databio%2Fgtars/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/databio%2Fgtars/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/databio%2Fgtars/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/databio","download_url":"https://codeload.github.com/databio/gtars/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248618262,"owners_count":21134200,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-15T07:11:58.338Z","updated_at":"2025-04-12T18:54:34.846Z","avatar_url":"https://github.com/databio.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![codecov](https://codecov.io/gh/databio/gtars/branch/master/graph/badge.svg)](https://codecov.io/gh/databio/gtars)\n[![crates.io](https://img.shields.io/crates/v/gtars?\u0026logo=rust)](https://crates.io/crates/gtars)\n\n\u003ch1 align=\"center\"\u003e\n\u003cimg src=\"gtars/docs/gtars_logo_new_with_words.png\" alt=\"gtars logo\" height=\"100px\"\u003e\n\u003c/h1\u003e\n\n`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.\n\n`gtars` provides these things:\n\n1. A rust library crate.\n2. A command-line interface, written in rust.\n3. A Python package that provides Python bindings to the rust library.\n4. An R package that provides R bindings to the rust library\n\n## Repository organization (for developers)\n\nThis repo is organized like so:\n\n1. The main gtars rust package (in subfolder `/gtars`), which contains two crates:\n    1a. A rust library crate (`/gtars/lib.rs`) that provides functions, traits, and structs for working with genomic interval data.\n    1b. A rust binary crate (in `/gtars/main.rs`), a small, wrapper command-line interface for the library crate.\n2. Python bindings (in `/bindings/python`), which consists of a rust package with a library crate (no binary crate) and Python package.\n3. R bindings (in `/bindinds/r`), which consists of an R package.\n\nThis repository is a work in progress, and still in early development.\n\n## Installation\n\nTo 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).\n\nYou 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.\n\n## Usage\n\n`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 \u003ctool\u003e --help`.\n\nAlternatively, you can link `gtars` as a library in your rust project. To do so, add the following to your `Cargo.toml` file:\n\n```toml\n[dependencies]\ngtars = { git = \"https://github.com/databio/gtars\" }\n```\n\n## Testing\n\nTo run the tests, run `cargo test`.\n\n## Contributing\n\n### New internal library crate tools\n\nIf you'd like to add a new tool, you can do so by creating a new module within the src folder.\n\n### New public library crate tools\n\nIf 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`:\n```rust\npub mod \u003ctool_name\u003e;\n```\n\n### New binary crate tools\n\nFinally, if you want to have command-line functionality, you can add it to the `gtars` binary crate. This requires two steps:\n\n1. Create a new `cli` using `clap` inside the `interfaces` module of `src/cli.rs`:\n\n```rust\npub fn make_new_tool_cli() -\u003e Command {\n\n}\n```\n\n2. Write your logic in a wrapper function. This will live inside the `functions` module of `src/cli.rs`:\n\n```rust\n// top of file:\nuse tool_name::{ ... }\n\n// inside the module:\npub fn new_tool_wrapper() -\u003e Result\u003c(), Box\u003cdyn Error\u003e\u003e {\n    // your logic here\n}\n```\n\nPlease make sure you update the changelog and bump the version number in `Cargo.toml` when you add a new tool.\n\n### VSCode users\n\nIf 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:\n```json\n{\n    \"rust-analyzer.linkedProjects\": [\n        \"./vocab/Cargo.toml\",\n        \"./Cargo.toml\"\n        \"./new-tool/Cargo.toml\"\n    ]\n}\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdatabio%2Fgtars","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdatabio%2Fgtars","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdatabio%2Fgtars/lists"}