https://github.com/clintval/interval
A better genomic interval that is compatible with HTSJDK
https://github.com/clintval/interval
coordinate genomics interval scala
Last synced: 8 days ago
JSON representation
A better genomic interval that is compatible with HTSJDK
- Host: GitHub
- URL: https://github.com/clintval/interval
- Owner: clintval
- License: mit
- Created: 2022-01-21T16:08:23.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2022-01-22T03:19:15.000Z (over 4 years ago)
- Last Synced: 2026-04-28T22:35:17.386Z (about 1 month ago)
- Topics: coordinate, genomics, interval, scala
- Language: Scala
- Homepage:
- Size: 3.01 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# interval
[](https://github.com/clintval/interval/actions/workflows/unit-tests.yml)
[](https://codecov.io/gh/clintval/interval)
[](https://www.scala-lang.org/)
A better genomic interval that is compatible with [HTSJDK](https://samtools.github.io/htsjdk/javadoc/htsjdk/htsjdk/samtools/util/Interval.html).
![[Snoqualmie Mountain, Washington]](.github/img/cover.jpg)
```scala
val interval = Interval("chr1", start = 1, end = 2, name = "MyInterval")
interval.sameCoordinates(interval) shouldBe true
interval.asHtsJdk.getContig shouldBe "chr1"
```
#### Features
- The Interval is a 1-based fully closed span upon a reference sequence
- Each Interval magically mixes in HTSJDK's Interval while hiding the HTSJDK API
- The HTSJDK API can be summoned by casting the Interval with `.asHtsJdk()`
- Implicit conversions allow for seamless interoperability between either Interval class
- Grants you a memory-friendly way of having a Scala-esque API upon HTSJDK's Interval
#### If Mill is your build tool
```scala
ivyDeps ++ Agg(ivy"io.cvbio.coord::interval::0.0.1")
```
#### If SBT is your build tool
```scala
libraryDependencies += "io.cvbio.coord" %% "interval" % "0.0.1"
```