#obo #ontology #serde #obofoundry #foundry

obofoundry

Structures to deserialize OBO Foundry listings into

4 releases

✓ Uses Rust 2018 edition

0.2.0 Jun 11, 2019
0.1.2 Mar 31, 2019
0.1.1 Mar 21, 2019
0.1.0 Mar 19, 2019

#67 in Science

Download history 22/week @ 2019-03-16 19/week @ 2019-03-23 41/week @ 2019-03-30 159/week @ 2019-04-06 180/week @ 2019-04-13 187/week @ 2019-04-20 165/week @ 2019-04-27 383/week @ 2019-05-04 18/week @ 2019-05-11 11/week @ 2019-05-18 16/week @ 2019-05-25 8/week @ 2019-06-01

404 downloads per month
Used in 1 crate

MIT license

20KB
359 lines

obofoundry.rs

Structures to deserialize OBO Foundry listings into.

TravisCI 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.1"
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 reqwest:

extern crate obofoundry;
extern crate reqwest;
extern crate serde_yaml;

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

let mut res = reqwest::get(url).unwrap();
let mut yml = String::new();
res.read_to_string(&mut yml);

let foundry: obofoundry::Foundry = serde_yaml::from_str(&yml).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.

Dependencies

~2.5MB
~55K SLoC