{"id":20387027,"url":"https://github.com/cmdcolin/maf2bed","last_synced_at":"2026-06-06T17:33:10.913Z","repository":{"id":204834591,"uuid":"712773374","full_name":"cmdcolin/maf2bed","owner":"cmdcolin","description":"Converts multiple alignment format (MAF) files to a bed file for tabixing","archived":false,"fork":false,"pushed_at":"2023-12-30T01:21:24.000Z","size":14,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-15T08:44:06.831Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cmdcolin.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2023-11-01T06:52:28.000Z","updated_at":"2023-12-29T08:35:31.000Z","dependencies_parsed_at":"2023-12-21T19:26:49.280Z","dependency_job_id":"fd93f52b-1d4c-4d46-bd32-ee187346b2d0","html_url":"https://github.com/cmdcolin/maf2bed","commit_stats":null,"previous_names":["cmdcolin/maf2bed"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cmdcolin%2Fmaf2bed","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cmdcolin%2Fmaf2bed/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cmdcolin%2Fmaf2bed/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cmdcolin%2Fmaf2bed/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cmdcolin","download_url":"https://codeload.github.com/cmdcolin/maf2bed/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241937007,"owners_count":20045160,"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-15T02:42:22.289Z","updated_at":"2026-06-06T17:33:10.834Z","avatar_url":"https://github.com/cmdcolin.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# maf2bed\n\nUsed to convert multiple alignment format (MAF) files to a bed tabix-y style\nformat. Used in jbrowse mafviewer plugin\nhttps://github.com/cmdcolin/jbrowse-plugin-mafviewer\n\n## Install\n\n```\ncargo install maf2bed\nmaf2bed --help\n```\n\n## Usage\n\nMake sure to specify the 'assembly name' being used as the reference for the\nbed file as the first argument to maf2bed\n\nExample\n\n```\nexport LC_ALL=c # improves sorting speed\n\n#parallel compression/decompression\npigz -dc file.maf.gz | maf2bed hg19 | sort -k1,1 -k2,2n | bgzip -@8 \u003e file.bed.gz\n\ntabix file.bed.gz\n```\n\nMight be able to remove the sort/LC_ALL=c in some cases, but sorting ensures\nthat it will be ready for tabix\n\n## Footnote 1\n\nConverted to rust from perl as a coding exercise mostly, gaining a modest\nspeedup on the way https://twitter.com/cmdcolin/status/1719608993310486883\n\n## Footnote 2\n\nThere are likely many ways to end up with a MAF file, but one way is to export the MAF from a pangenome graph\n\nThis page discusses some examples\n\nhttps://github.com/ComparativeGenomicsToolkit/cactus/blob/master/doc/progressive.md#using-the-hal-output\n\nusing \"--dupeMode all\" is, afaik, recommended for the purposes of the JBrowse 2 mafviewer plugin, because using \"--dupeMode single\" can cause missing blocks of data\n## Motivation\n\nI wanted to try using the bigMaf (bigBed based) format ecosystem with large MAF\nfiles but bedToBigBed doesn't support streaming or reading compressed files(?),\nso that requires reading big files on disk and in memory. in contrast, MAF\ntabix type approach like implemented here can be compressed and streaming which\nallows much lower memory usage and disk space\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcmdcolin%2Fmaf2bed","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcmdcolin%2Fmaf2bed","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcmdcolin%2Fmaf2bed/lists"}