{"id":31913450,"url":"https://github.com/alejandrogzi/gxf2bed","last_synced_at":"2026-01-04T17:13:57.261Z","repository":{"id":221090436,"uuid":"753345617","full_name":"alejandrogzi/gxf2bed","owner":"alejandrogzi","description":"fastest GTF/GFF-to-BED converter chilling around","archived":false,"fork":false,"pushed_at":"2025-08-20T23:28:38.000Z","size":266,"stargazers_count":27,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-10-11T20:08:59.804Z","etag":null,"topics":["bed","converter","gene-annotation","gff","gtf","high-performance"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/alejandrogzi.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-02-05T23:47:18.000Z","updated_at":"2025-09-09T10:25:33.000Z","dependencies_parsed_at":"2024-03-27T06:28:17.989Z","dependency_job_id":"3f64494a-280c-4c10-a60e-0302559d7b71","html_url":"https://github.com/alejandrogzi/gxf2bed","commit_stats":null,"previous_names":["alejandrogzi/gxt2bed","alejandrogzi/gxf2bed"],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/alejandrogzi/gxf2bed","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alejandrogzi%2Fgxf2bed","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alejandrogzi%2Fgxf2bed/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alejandrogzi%2Fgxf2bed/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alejandrogzi%2Fgxf2bed/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alejandrogzi","download_url":"https://codeload.github.com/alejandrogzi/gxf2bed/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alejandrogzi%2Fgxf2bed/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279016622,"owners_count":26085853,"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","status":"online","status_checked_at":"2025-10-13T02:00:06.723Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["bed","converter","gene-annotation","gff","gtf","high-performance"],"created_at":"2025-10-13T18:49:27.092Z","updated_at":"2026-01-04T17:13:57.255Z","avatar_url":"https://github.com/alejandrogzi.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cp align=\"center\"\u003e\n    \u003cimg width=200 align=\"center\" src=\"./supp/logo.png\" \u003e\n  \u003c/p\u003e\n\n  \u003cspan\u003e\n    \u003ch1 align=\"center\"\u003e\n        gxf2bed\n    \u003c/h1\u003e\n  \u003c/span\u003e\n\n  \u003cp align=\"center\"\u003e\n    \u003ca href=\"https://img.shields.io/badge/version-0.3.0-green\" target=\"_blank\"\u003e\n      \u003cimg alt=\"Version Badge\" src=\"https://img.shields.io/badge/version-0.3.0-green\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://crates.io/crates/gxf2bed\" target=\"_blank\"\u003e\n      \u003cimg alt=\"Crates.io Version\" src=\"https://img.shields.io/crates/v/gxf2bed\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://github.com/alejandrogzi/gxf2bed\" target=\"_blank\"\u003e\n      \u003cimg alt=\"GitHub License\" src=\"https://img.shields.io/github/license/alejandrogzi/gxf2bed?color=blue\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://crates.io/crates/gxf2bed\" target=\"_blank\"\u003e\n      \u003cimg alt=\"Crates.io Total Downloads\" src=\"https://img.shields.io/crates/d/gxf2bed\"\u003e\n    \u003c/a\u003e\n  \u003c/p\u003e\n\n  \u003cp align=\"center\"\u003e\n    \u003csamp\u003e\n        \u003cspan\u003e versatile BED-to-G{T,F}F converter in Rust\u003c/span\u003e\n        \u003cbr\u003e\n        \u003cbr\u003e\n        \u003ca href=\"https://docs.rs/gxf2bed/0.3.0/gxf2bed/\"\u003edocs\u003c/a\u003e .\n        \u003ca href=\"https://github.com/alejandrogzi/gxf2bed?tab=readme-ov-file#Usage\"\u003eusage\u003c/a\u003e .\n        \u003ca href=\"https://github.com/alejandrogzi/gxf2bed?tab=readme-ov-file#Installation\"\u003einstallation\u003c/a\u003e .\n        \u003ca href=\"https://github.com/alejandrogzi/gxf2bed/?tab=readme-ov-file#Conda\"\u003econda\u003c/a\u003e \n    \u003c/samp\u003e\n  \u003c/p\u003e\n\n\u003c/p\u003e\n\n\ntranslates\n\n```\nchr27 gxf2bed gene 17266470 17285418 . + . gene_id \"ENSG00000151743\";\n\nchr27 gxf2bed transcript 17266470 17281218 . + . gene_id \"ENSG00000151743\"; transcript_id \"ENST00000541931.8\";\n\nchr27 gxf2bed exon 17266470 17266572 . + . gene_id \"ENSG00000151743\"; transcript_id \"ENST00000541931.8\"; exon_number \"1\"; exon_id \"ENST00000541931.8.1\";\n\n...\n```\n\ninto\n\n\n```\nchr27 17266469 17281218 ENST00000541931.8 1000 + 17266469 17281218 0,0,200 2 103,74, 0,14675,\n```\n\n\n\u003e What's new on v.0.3\n\u003e\n\u003e - Converts GTF and GFF3 files to BED format\n\u003e - Supports multiple BED formats (BED3, BED4, BED5, BED6, BED9, BED12)\n\u003e - Handles compressed input files (gzip, zstd, bzip2)\n\u003e - Customizable parent/child feature and attribute mapping\n\u003e - Optional additional fields from GTF/GFF attributes\n\u003e - Memory-mapped I/O for uncompressed files\n\u003e - Uses [genepred](https://github.com/alejandrogzi/genepred) for parsing and writing\n\n\n## Usage\n ```bash\n gxf2bed -i \u003cINPUT\u003e -o \u003cOUTPUT\u003e [OPTIONS]\n\n Required arguments:\n   -i, --input \u003cGXF\u003e          Path to GTF/GFF file\n   -o, --output \u003cBED\u003e         Path to output BED file\n\n Optional arguments:\n   -T, --threads \u003cTHREADS\u003e    Number of threads (default: CPU count)\n   -F, --parent-feature \u003cPARENT\u003e     Parent feature\n   -f, --child-features \u003cCHILDS\u003e    Child features (comma-separated)\n   -A, --parent-attribute \u003cFEATURE\u003e  Feature to extract\n   -a, --child-attribute \u003cCHILD\u003e     Child feature to extract\n   -t, --type \u003cBED_TYPE\u003e      BED type format (3, 4, 5, 6, 9, 12) [default: 12]\n   -d, --additional-fields \u003cADDITIONAL\u003e  BED additional fields (comma-separated)\n   -c, --chunks \u003cCHUNKS\u003e      Chunk size for parallel processing [default: 15000]\n   -h, --help                 Print help\n   -V, --version              Print version\n```\n\n\n## Installation\nto install gxf2bed on your system follow this steps:\n1. get rust: `curl https://sh.rustup.rs -sSf | sh` on unix, or go [here](https://www.rust-lang.org/tools/install) for other options\n2. run `cargo install gxf2bed` (make sure `~/.cargo/bin` is in your `$PATH` before running it)\n4. use `gxf2bed` with the required arguments\n5. enjoy!\n\n## Build\nto build gxf2bed from this repo, do:\n\n1. get rust (as described above)\n2. run `git clone https://github.com/alejandrogzi/gxf2bed.git \u0026\u0026 cd gxf2bed`\n3. run `cargo run --release -- -i \u003cGTF/GFF\u003e -o \u003cBED\u003e`\n\n## Container image\nto build the development container image:\n1. run `git clone https://github.com/alejandrogzi/gxf2bed.git \u0026\u0026 cd gxf2bed`\n2. initialize docker with `start docker` or `systemctl start docker`\n3. build the image `docker image build --tag gxf2bed .`\n4. run `docker run --rm -v \"[dir_where_your_gtf_is]:/dir\" gxf2bed -i /dir/\u003cGTF/GFF\u003e -o /dir/\u003cBED\u003e`\n\n## Conda\nto use gxf2bed through Conda just:\n1. `conda install gxf2bed -c bioconda` or `conda create -n gxf2bed -c bioconda gxf2bed`\n\n## Benchmark + FAQ\n\u003e [!WARNING]\n\u003e The data in this benchmark corresponds to version 0.2.* and below. Versions \u003e0.3 are \n\u003e a bit slower than the previous versions due to algorithmic changes.\n\u003cp align=\"center\"\u003e\n    \u003cimg width=700 align=\"center\" src=\"./supp/gxf2bed.jpg\"\u003e\n\u003c/p\u003e\n\nIf you google \"gtf to bed\" or \"gff to bed\" you'll find some posts about recommended tools. Part of these tools are already deprecated or too difficult to run (even in Linux), due to poor maintenance. This project was conceived to provide an easy way to convert GTF/GFF files to BED structures and finish a set of high-performance converters between gene model formats in Rust (bed2gtf, bed2gff and now gxf2bed). \n\nTo test the efficiency of gxf2bed, I took 4 GTF/GFF-to-BED converters and ran them with the current GRCh38 GENCODE annotation (v.44), that has ~250,000 transcripts [the values showed here are the mean of 5 consecutive runs]. Briefly, the competitors are:\n- UCSC's utils: `gtfToGenePred | genePredToBed` \u0026 `gffToGenePred | genePredToBed` (taken from [here](https://hgdownload.soe.ucsc.edu/admin/exe/linux.x86_64/))\n- Signal \u0026 Brown: `gtf2bed.py` \u0026 `gff32gtf.py \u0026\u0026 gtf2bed.py` (taken from [here](https://github.com/signalbash/how_are_we_stranded_here/tree/master/how_are_we_stranded_here))\n- ea-utils: `gtf2bed.pl` \u0026 `gff2gtf.pl | gtf2bed.pl` (taken from [here](https://github.com/ExpressionAnalysis/ea-utils/tree/master/clipper))\n- BEDOPS: `gtf2bed` \u0026  `gtf2bed` (taken from [here](https://github.com/bedops/bedops/tree/master/applications/bed/conversion/src/wrappers)) \n\nBesides the easy way to make `gxf2bed` run and the GFF-GTF channel that allows centralize both in a single converter, this tool showed a significant difference in computation time against the other tools in each one of the two formats. Even using a combination of different number of threads, times were practically the same 3.5s +/- 0.4s and the differences were maintained. Is important to note that GFF3 files took a lot more time than its GTF counterpart. This could be due to the need of chaining two different programs 1) GFF-to-GTF and 2) GTF-to-BED.\n\nTaken together, `gxf2bed` offers an easier and faster way to convert GTF/GFF files to BED files. This tool could save you at least x2-3 times the time you used to spend using other tools to convert GTF files and x5 times if you want to convert GFF3 files!\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falejandrogzi%2Fgxf2bed","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falejandrogzi%2Fgxf2bed","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falejandrogzi%2Fgxf2bed/lists"}