{"id":13318227,"url":"https://github.com/fastobo/fastobo","last_synced_at":"2025-03-11T01:31:48.579Z","repository":{"id":34408313,"uuid":"176409718","full_name":"fastobo/fastobo","owner":"fastobo","description":"Faultless AST for Open Biomedical Ontologies.","archived":false,"fork":false,"pushed_at":"2025-02-19T22:08:42.000Z","size":1331,"stargazers_count":28,"open_issues_count":2,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-28T05:30:50.419Z","etag":null,"topics":["ast","obo","obofoundry","ontology"],"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/fastobo.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"COPYING","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":"2019-03-19T02:47:15.000Z","updated_at":"2025-02-13T17:49:03.000Z","dependencies_parsed_at":"2025-02-13T11:38:58.099Z","dependency_job_id":null,"html_url":"https://github.com/fastobo/fastobo","commit_stats":{"total_commits":741,"total_committers":4,"mean_commits":185.25,"dds":0.5195681511470985,"last_synced_commit":"c9b0666f6452b748117b9bfc788c089477bb8022"},"previous_names":[],"tags_count":40,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fastobo%2Ffastobo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fastobo%2Ffastobo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fastobo%2Ffastobo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fastobo%2Ffastobo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fastobo","download_url":"https://codeload.github.com/fastobo/fastobo/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242955642,"owners_count":20212378,"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":["ast","obo","obofoundry","ontology"],"created_at":"2024-07-29T18:29:51.621Z","updated_at":"2025-03-11T01:31:48.548Z","avatar_url":"https://github.com/fastobo.png","language":"Rust","funding_links":[],"categories":["Semantic Web"],"sub_categories":["Ontologies, Validation \u0026 Reasoning"],"readme":"# `fastobo` [![Star me](https://img.shields.io/github/stars/fastobo/fastobo.svg?style=social\u0026label=Star\u0026maxAge=3600)](https://github.com/fastobo/fastobo/stargazers)\n\n*Faultless AST for Open Biomedical Ontologies.*\n\n[![Actions](https://img.shields.io/github/actions/workflow/status/fastobo/fastobo/test.yml?branch=master\u0026style=flat-square\u0026maxAge=600)](https://github.com/fastobo/fastobo/actions)\n[![Codecov](https://img.shields.io/codecov/c/gh/fastobo/fastobo/master.svg?style=flat-square\u0026maxAge=600)](https://codecov.io/gh/fastobo/fastobo)\n[![License](https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square\u0026maxAge=2678400)](https://choosealicense.com/licenses/mit/)\n[![Source](https://img.shields.io/badge/source-GitHub-303030.svg?maxAge=2678400\u0026style=flat-square)](https://github.com/fastobo/fastobo)\n[![Crate](https://img.shields.io/crates/v/fastobo.svg?maxAge=600\u0026style=flat-square)](https://crates.io/crates/fastobo)\n[![Documentation](https://img.shields.io/badge/docs.rs-latest-4d76ae.svg?maxAge=2678400\u0026style=flat-square)](https://docs.rs/fastobo)\n[![Changelog](https://img.shields.io/badge/keep%20a-changelog-8A0707.svg?maxAge=2678400\u0026style=flat-square)](https://github.com/fastobo/fastobo/blob/master/CHANGELOG.md)\n[![GitHub issues](https://img.shields.io/github/issues/fastobo/fastobo.svg?style=flat-square)](https://github.com/fastobo/fastobo/issues)\n[![DOI](https://img.shields.io/badge/doi-10.7490%2Ff1000research.1117405.1-brightgreen?style=flat-square\u0026maxAge=31536000)](https://f1000research.com/posters/8-1500)\n\n\n## Overview\n\nThis library provides a mostly-complete implementation of the\n[OBO flat file format 1.4](http://owlcollab.github.io/oboformat/doc/obo-syntax.html).\n\n* **Data structures** - `fastobo` provides a complete owned AST for the\n  OBO language, with constructors and covenience traits where applicable.\n  There is a plan to provide borrowed data structures as well, to be able\n  to build a view of an OBO document from borrowed data.\n* **Parsing** - The parser is implemented using [pest](http://pest.rs/),\n  and is reexported from the [`fastobo-syntax`](https://crates.io/crates/fastobo-syntax)\n  crate. Most structures implement the [`FromPair`](./parser/trait.FromPair.html)\n  trait which allows to build a data structure from a stream of pest tokens.\n* **Errors** - All functions in that crate that return a `Result` will\n  always use the `Error` struct defined in the `error` module. Errors\n  reported by pest are very meaningful, and can give the exact location\n  of a syntax error encountered by the parser.\n* **Semantics** - This library exports specific methods that can be used\n  to edit an OBO syntax tree with the semantics expected in the format\n  guide: mapping identifiers to URLs, adding default namespaces, or\n  expanding entity frames using `treat-xrefs` macros.\n\n*Warning: this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html),\nbut the API is likely to change a lot before the release of a stable 1.0.*\n\n\n## Features\n\nAll the following features are enabled by default, but can be disabled and\ncherry-picked using the `default-features = false` option in the `Cargo.toml`\nmanifest of your project:\n\n* **`memchr`** - Use the [`memchr`](https://docs.rs/memchr/) library to improve\n  parser speed when searching for a particular character in a buffer.\n* **`threading`** - Use a multi-threaded parser (additionally depending on\n  [`crossbeam-channel`](https://docs.rs/crossbeam-channel)), which can greatly\n  improve the parser speed if parsing is CPU-bound.\n* **`smartstring`** - Use the [`smartstring`](https://docs.rs/smartstring)\n  library to reduce heap allocation for identifiers and string data.\n\n## Usage\n\nAdd `fastobo` to the `[dependencies]` sections of your `Cargo.toml` manifest:\n```toml\n[dependencies]\nfastobo = \"0.15.2\"\n```\n\nThe top-level `fastobo` module provides several functions to parse an `OboDoc`.\nUse `fastobo::from_reader` to load an OBO document from a\n[`BufRead`](https://doc.rust-lang.org/std/io/trait.BufRead.html) implementor\n(use [`std::io::BufReader`](https://doc.rust-lang.org/std/io/struct.BufReader.html)\nif needed):\n\n```rust\nextern crate fastobo;\nextern crate ureq;\n\nfn main() {\n    let mut response = ureq::get(\"http://purl.obolibrary.org/obo/ms.obo\").call().unwrap();\n    let mut reader = std::io::BufReader::new(response.body_mut().as_reader());\n\n    match fastobo::from_reader(\u0026mut reader) {\n        Ok(doc) =\u003e println!(\"Number of MS entities: {}\", doc.entities().len()),\n        Err(e) =\u003e panic!(\"Could not parse the Mass-Spec Ontology: {}\", e),\n    }\n}\n```\n\n\n## See also\n\n* [`fastobo-syntax`](https://crates.io/crates/fastobo-syntax): Standalone `pest` parser\n  for the OBO format version 1.4.\n* [`fastobo-graphs`](https://crates.io/crates/fastobo-graphs): Data model and `serde`\n  implementation of the OBO graphs specification, with conversion traits from and to OBO.\n* [`fastobo-py`](https://pypi.org/project/fastobo/): Idiomatic Python bindings to\n  this crate.\n* [`fastobo-validator`](https://crates.io/crates/fastobo-validator): Standalone CLI\n  to validate OBO files against the specification.\n* [`horned-functional`](https://crates.io/crates/horned-functional): Parser for\n  OWL2 Functional Syntax (can be used to parse `owl-axioms` clauses).\n\n\n## Feedback\n\nFound a bug ? Have an enhancement request ? Head over to the\n[GitHub issue tracker](https://github.com/fastobo/fastobo/issues) of the project if\nyou need to report or ask something. If you are filling in on a bug, please include as much\ninformation as you can about the issue, and try to recreate the same bug in a simple, easily\nreproducible situation.\n\n\n## About\n\nThis project was developed by [Martin Larralde](https://github.com/althonos)\nas part of a Master's Degree internship in the [BBOP team](http://berkeleybop.org/) of the\n[Lawrence Berkeley National Laboratory](https://www.lbl.gov/), under the supervision of\n[Chris Mungall](http://biosciences.lbl.gov/profiles/chris-mungall/). Cite this project as:\n\n*Larralde M.* **Developing Python and Rust libraries to improve the ontology ecosystem**\n*\\[version 1; not peer reviewed\\].* F1000Research 2019, 8(ISCB Comm J):1500 (poster)\n([https://doi.org/10.7490/f1000research.1117405.1](https://doi.org/10.7490/f1000research.1117405.1))\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffastobo%2Ffastobo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffastobo%2Ffastobo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffastobo%2Ffastobo/lists"}