#obo #ontology #obofoundry #serde #foundry

obofoundry

Structures to deserialize OBO Foundry listings into

11 releases (7 breaking)

0.8.1 Jan 11, 2022
0.8.0 Feb 8, 2021
0.7.0 Nov 27, 2020
0.6.0 Apr 10, 2020
0.1.2 Mar 31, 2019

#79 in Science

Download history 10/week @ 2021-10-01 13/week @ 2021-10-08 1/week @ 2021-10-15 2/week @ 2021-10-22 7/week @ 2021-10-29 10/week @ 2021-11-05 2/week @ 2021-11-12 3/week @ 2021-11-19 3/week @ 2021-11-26 65/week @ 2021-12-03 2/week @ 2021-12-10 1/week @ 2021-12-17 14/week @ 2021-12-31 152/week @ 2022-01-07 169/week @ 2022-01-14

335 downloads per month
Used in 2 crates

MIT license

19KB
349 lines

obofoundry.rs Star me

Structures to deserialize OBO Foundry listings into.

Actions Codecov License Source Crate Documentation Changelog

Usage

Add the obofoundry crate to the Cargo.toml manifest, as well as either serde_yaml or serde_json:

[dependencies]
obofoundry = "0.8"
serde_yaml = "0.8"

Then use the serde framework to load the listings:

extern crate obofoundry;
extern crate serde_yaml;

let yaml_data = include_str!("...");
let foundry: obofoundry::Foundry = serde_yaml::from_str(&yml).unwrap();

It's also possible to use an HTTP library to load the listings from the OBO Foundry website directly, for instance using ureq:

extern crate obofoundry;
extern crate ureq;
extern crate serde_yaml;

let url = "http://www.obofoundry.org/registry/ontologies.yml";

let res = ureq::get(url).call();
let reader = res.into_reader();
let foundry: obofoundry::Foundry = serde_yaml::from_reader(reader).unwrap();

Examples

See the online documentation at docs.rs for more examples.

Changelog

This project adheres to Semantic Versioning and provides a changelog in the Keep a Changelog format.

License

This library is provided under the open-source MIT license.

Dependencies

~1.8–2.6MB
~75K SLoC

•Àİa