Expand description
This library simplifies accessing annotations of biomedical ontologies.
ยงSupported ontologies
The library supports the following ontologies
ยงExamples
ยงLoad HPO annotations
Load a toy HPO annotation file:
use oboannotation::io::AnnotationLoader;
use oboannotation::hpo::HpoAnnotation;
use oboannotation::hpo::io::{HpoAnnotationLines, HpoAnnotationLoader};
// ๐ Replace with path to a real file ๐
let fpath_hpoa = "data/phenotype.real-shortlist.hpoa";
let loader = HpoAnnotationLoader::default();
let data: HpoAnnotationLines = loader.load_from_path(fpath_hpoa)
.expect("Toy HPOA should be well formatted");
assert_eq!(data.lines.len(), 86); // Toy HPOA includes 86 recordsSee HpoAnnotationLines and HpoAnnotation
to learn more about the data format.
ยงLoad GO annotations
Load a toy GO annotation file containing annotations of FBN1 and SURF1 genes for Homo sapiens.
use oboannotation::io::AnnotationLoader;
use oboannotation::go::{GoAnnotations, GoGafAnnotationLoader};
// ๐ Replace with path to a real file ๐
let fpath_goa = "data/goa_human.SURF1_FBN1.gaf";
let loader = GoGafAnnotationLoader;
let data: GoAnnotations = loader.load_from_path(fpath_goa)
.expect("Toy GO annotations should be well formatted");
assert_eq!(data.annotations.len(), 156); // Toy GO annotations include 156 recordsSee GoAnnotations and GoAnnotation
to learn more about the data format.