https://github.com/pbenner/jigwig
Java BigWig Reader
https://github.com/pbenner/jigwig
bigwig bigwig-files bioinformatics java java-library
Last synced: 3 months ago
JSON representation
Java BigWig Reader
- Host: GitHub
- URL: https://github.com/pbenner/jigwig
- Owner: pbenner
- Created: 2017-04-06T16:09:46.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2017-06-21T20:03:07.000Z (almost 8 years ago)
- Last Synced: 2025-01-12T20:21:51.160Z (5 months ago)
- Topics: bigwig, bigwig-files, bioinformatics, java, java-library
- Language: Java
- Homepage:
- Size: 50.8 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Library for reading BigWig files (ported from [Gonetics](https://github.com/pbenner/gonetics)).
## Basic Usage
```java
Path path = Paths.get("test.bw");
SeekableByteChannel rbc = Files.newByteChannel(path, EnumSet.of(StandardOpenOption.READ));
BigWigFile bwf = new BigWigFile(rbc);BigWigFileIterator it = bwf.query("chr11|chr12", 112643206, 112658727, 0);
while (it.hasNext()) {
BigWigFileIteratorType r = it.next();
BigWigSummaryRecord s = r.getSummary();
System.out.printf("chrom: %s\n", s.getChromName());
System.out.printf("from : %d\n", s.getFrom());
System.out.printf("to : %d\n", s.getTo());
System.out.printf("value: %f\n", s.getMean());
System.out.println();
}
```