{"id":21168563,"url":"https://github.com/jetbrains-research/big","last_synced_at":"2025-07-09T18:31:38.616Z","repository":{"id":27403113,"uuid":"30879646","full_name":"JetBrains-Research/big","owner":"JetBrains-Research","description":"BigWIG, BigBED and TDF for the JVM","archived":false,"fork":false,"pushed_at":"2021-02-23T12:20:18.000Z","size":22779,"stargazers_count":13,"open_issues_count":7,"forks_count":2,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-04-05T04:51:11.616Z","etag":null,"topics":["bigbed","bigwig","jvm","kotlin","tdf"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JetBrains-Research.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGES","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-02-16T17:33:54.000Z","updated_at":"2024-07-17T04:52:51.000Z","dependencies_parsed_at":"2022-09-03T22:02:36.878Z","dependency_job_id":null,"html_url":"https://github.com/JetBrains-Research/big","commit_stats":null,"previous_names":[],"tags_count":37,"template":false,"template_full_name":null,"purl":"pkg:github/JetBrains-Research/big","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JetBrains-Research%2Fbig","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JetBrains-Research%2Fbig/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JetBrains-Research%2Fbig/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JetBrains-Research%2Fbig/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JetBrains-Research","download_url":"https://codeload.github.com/JetBrains-Research/big/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JetBrains-Research%2Fbig/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264502387,"owners_count":23618587,"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":["bigbed","bigwig","jvm","kotlin","tdf"],"created_at":"2024-11-20T15:15:09.356Z","updated_at":"2025-07-09T18:31:32.800Z","avatar_url":"https://github.com/JetBrains-Research.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![JetBrains Research](https://jb.gg/badges/research.svg)](https://confluence.jetbrains.com/display/ALL/JetBrains+on+GitHub)\nLinux/MacOS [![Build status](https://teamcity.jetbrains.com/app/rest/builds/buildType:(id:Epigenome_Tools_Big)/statusIcon.svg)](https://teamcity.jetbrains.com/viewType.html?buildTypeId=Epigenome_Tools_Big\u0026guest=1)  Windows [![Build status](https://teamcity.jetbrains.com/app/rest/builds/buildType:(id:Epigenome_Tools_BigWindows)/statusIcon.svg)](https://teamcity.jetbrains.com/viewType.html?buildTypeId=Epigenome_Tools_BigWindows\u0026guest=1)\n\n# big\n\n`big` implements high performance classes for reading and writing BigWIG,\nBigBED and TDF. You can use `big` in any programming language running on the\nJVM, but the public API is in part Kotlin-specific.\n\nInstallation\n------------\n\nThe latest version of `big` is available on [Maven Central] [maven-central]. If you're using\nGradle just add the following to your `build.gradle`:\n\n```groovy\nrepositories {\n    mavenCentral()\n}\n\ndependencies {\n    compile 'org.jetbrains.bio:big:0.9.1'\n}\n\n```\n\nWith Maven, specify the following in your `pom.xml`:\n```xml\n\u003cdependency\u003e\n  \u003cgroupId\u003eorg.jetbrains.bio\u003c/groupId\u003e\n  \u003cartifactId\u003ebig\u003c/artifactId\u003e\n  \u003cversion\u003e0.9.1\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\nThe previous versions were published on Bintray. They can be downloaded\nfrom [GitHub Releases](https://github.com/JetBrains-Research/big/releases).\n\n[maven-central]: https://search.maven.org/artifact/org.jetbrains.bio/big/0.9.1/jar\n\nExamples\n--------\n\nThe following examples assume that all required symbols are imported into the\ncurrent scope. They also rely on the helper function for reading TSV formated\n[chromosome sizes] [chrom-sizes] from UCSC annotations.\n\n```kotlin\n/** Fetches chromosome sizes from a UCSC provided TSV file. */\ninternal fun Path.chromosomes(): List\u003cPair\u003cString, Int\u003e\u003e {\n    return Files.newBufferedReader(this).lineSequence().map { line -\u003e\n        val chunks = line.split('\\t', limit = 3)\n        chunks[0] to chunks[1].toInt()\n    }.toList()\n}\n```\n\n### wigToBigWig\n\n```kotlin\nfun wigToBigWig(inputPath: Path, outputPath: Path, chromSizesPath: Path) {\n    BigWigFile.write(WigFile(inputPath), chromSizesPath.chromosomes(), outputPath)\n}\n```\n\n### bigWigSummary\n\n```kotlin\nfun bigWigSummary(inputPath: Path, numBins: Int) {\n    BigWigFile.read(inputPath).use { bwf -\u003e\n        println(\"Total: ${bwf.totalSummary}\")\n\n        for (chromosome in bwf.chromosomes.valueCollection()) {\n            for ((i, summary) in bwf.summarize(chromosome, numBins = numBins).withIndex()) {\n                println(\"bin #${i + 1}: $summary\")\n            }\n        }\n    }\n}\n```\n\n### bedToBigBed\n\n```kotlin\nfun bedToBigBed(inputPath: Path, outputPath: Path, chromSizesPath: Path) {\n    BigBedFile.write(BedFile(inputPath), chromSizesPath.chromosomes(), outputPath)\n}\n```\n\n### bigBedToBed\n\n```kotlin\nfun bigBedToBed(inputPath: Path) {\n    BigBedFile.read(inputPath).use { bbf -\u003e\n        for (chromosome in bbf.chromosomes.valueCollection()) {\n            for ((chrom, start, end) in bbf.query(chromosome)) {\n                // See 'BedEntry' for a complete list of available\n                // attributes.\n                println(\"$chrom\\t$start\\t$end\")\n            }\n        }\n    }\n}\n```\n\n[chrom-sizes]: http://genome.ucsc.edu/goldenpath/help/hg19.chrom.sizes\n\nBuilding from source\n--------------------\n\nThe build process is as simple as\n\n```bash\n$ ./gradlew jar\n```\n\nNote: don't use `./gradlew assemble`, since it includes the signing of the artifacts\nand will fail if the correct credentials are not provided.\n\nTesting\n-------\n\nNo extra configuration is required for running the tests from Gradle\n\n```bash\n$ ./gradlew test\n```\n\nPublishing\n----------\n\nYou can publish a new release with a one-liner\n\n```bash\n./gradlew clean assemble test generatePomFileForMavenJavaPublication bintrayUpload\n```\n\nMake sure to set Bintray credentials (see API key section\n[here](https://bintray.com/profile/edit)) in `$HOME/.gradle/gradle.properties`.\n\n```\n$ cat $HOME/.gradle/gradle.properties\nbintrayUser=CHANGEME\nbintrayKey=CHANGEME\n```\n\nUseful links\n------------\n\n* Kent et al. [paper] [paper] in Bioinformatics\n* UCSC documentation on [WIG] [wig], [BED] [bed], [BigWIG] [bigwig] and [BigBED] [bigbed]\n* Reference C [implementation](http://hgdownload.cse.ucsc.edu/admin/exe) of both\n  big formats by UCSC\n* Sketch of [TDF spec.] [tdf] in IGV repository and another version [on Gist] [tdf-gist]\n\n[paper]: http://bioinformatics.oxfordjournals.org/content/26/17/2204.abstract\n[wig]: http://genome.ucsc.edu/goldenpath/help/wiggle.html\n[bed]: https://genome.ucsc.edu/FAQ/FAQformat.html#format1\n[bigwig]: http://genome.ucsc.edu/goldenpath/help/bigWig.html\n[bigbed]: http://genome.ucsc.edu/goldenpath/help/bigBed.html\n[tdf]: https://github.com/igvteam/igv/blob/master/src/org/broad/igv/tdf/notes.txt\n[tdf-gist]: https://gist.github.com/superbobry/c67614cbfe2a15d35d5c\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjetbrains-research%2Fbig","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjetbrains-research%2Fbig","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjetbrains-research%2Fbig/lists"}