{"id":16618624,"url":"https://github.com/brentp/d4-nim","last_synced_at":"2025-06-11T04:37:47.272Z","repository":{"id":66472153,"uuid":"264270583","full_name":"brentp/d4-nim","owner":"brentp","description":"nim-lang wrapper for https://github.com/38/d4-format","archived":false,"fork":false,"pushed_at":"2024-11-24T17:32:43.000Z","size":27,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-17T20:45:59.780Z","etag":null,"topics":["bioinformatics","genomics","high-throughput-sequencing"],"latest_commit_sha":null,"homepage":null,"language":"Nim","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/brentp.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":"2020-05-15T18:34:58.000Z","updated_at":"2024-11-24T17:32:46.000Z","dependencies_parsed_at":"2024-10-12T02:21:03.017Z","dependency_job_id":"b83c8ee7-01b4-47c1-864c-6b73991ed436","html_url":"https://github.com/brentp/d4-nim","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brentp%2Fd4-nim","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brentp%2Fd4-nim/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brentp%2Fd4-nim/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brentp%2Fd4-nim/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/brentp","download_url":"https://codeload.github.com/brentp/d4-nim/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242980782,"owners_count":20216285,"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":["bioinformatics","genomics","high-throughput-sequencing"],"created_at":"2024-10-12T02:20:56.915Z","updated_at":"2025-03-11T05:45:46.771Z","avatar_url":"https://github.com/brentp.png","language":"Nim","funding_links":[],"categories":[],"sub_categories":[],"readme":"# d4-nim\n\nThis is a [nim](https://nim-lang.org) wrapper for Hao Hou's [d4](https://github.com/38/d4-format) which\ncan be thought of as a way to store integer data in a compressed array. A common use-case will be depth storage\nand querying. His library also has a command-line depth extractor that is faster than [mosdepth](https://github.com/brentp/mosdepth).\nThe extracted (compressed) file can quickly queried for summary info such as mean depth of a region.\n\n\nUsage in nim looks like:\n\n```Nim\nvar d4f:D4\ndoAssert d4f.open(\"hg002.d4\")\necho d4f.chromosomes # ordered table\necho d4f.chromosomes[\"1\"]\n\nfor iv in d4f.query(\"1\", 249_200_100):\n  echo iv # (tuple of start:uint32, end:uint32, value:int32)\n\nvar start = 249_200_100'u32\nvar stop = 249_240_621'u32\n# each entry in vals contains the depth for pos-start\nvar vals:seq[int32] = d4f.values(\"1\", start, stop)\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrentp%2Fd4-nim","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbrentp%2Fd4-nim","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrentp%2Fd4-nim/lists"}