File tree Expand file tree Collapse file tree 8 files changed +1194
-212
lines changed
Expand file tree Collapse file tree 8 files changed +1194
-212
lines changed Original file line number Diff line number Diff line change @@ -20,4 +20,5 @@ Cargo.lock
2020# option (not recommended) you can uncomment the following to ignore the entire idea folder.
2121# .idea/
2222
23- .vscode /
23+ .vscode /
24+ .idea /
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ authors = [
1818[dependencies ]
1919clap = { version = " 4.5" , features = [" derive" ], optional = true }
2020flate2 = { version = " 1.0" , optional = true }
21- ontolius = { version = " 0.7" , default-features = false }
21+ ontolius = { version = " 0.7.1 " , default-features = false }
2222regex = " 1.11.1"
2323serde = { version = " 1.0.197" , features = [" derive" ], optional = true }
2424serde_json = { version = " 1.0.140" , optional = true }
Original file line number Diff line number Diff line change 1+ //! The data formats of ontology annotations.
2+
3+ /// Human Phenotype Ontology annotation format.
4+ pub struct Hpoa ;
5+
6+ /// Gene Ontology annotation format.
7+ pub struct Gaf ;
Original file line number Diff line number Diff line change 11//! Parse Gene Ontology annotations.
2- //!
3- //! Use [`GoGafAnnotationLoader`] to parse GAF file into [`GoAnnotations`].
2+
3+ use crate :: format:: Gaf ;
4+ use crate :: io:: { AnnotationLoadError , AnnotationLoader , ValidationIssue } ;
45use ontolius:: TermId ;
56#[ cfg( feature = "serde" ) ]
67use serde:: { Deserialize , Serialize } ;
78use std:: fmt:: { Display , Formatter } ;
89use std:: io:: BufRead ;
910use std:: str:: FromStr ;
1011
11- use crate :: io:: { AnnotationLoadError , AnnotationLoader , ValidationIssue } ;
12-
1312/// The number of columns in GO GAF file.
1413const GOA_EXPECTED_FIELDS : usize = 17 ;
1514
@@ -223,10 +222,8 @@ pub struct GoAnnotations {
223222 pub negated_annotation_count : usize ,
224223}
225224
226- pub struct GoGafAnnotationLoader ;
227-
228- impl AnnotationLoader < GoAnnotations > for GoGafAnnotationLoader {
229- fn load_from_buf_read < R > ( & self , read : R ) -> Result < GoAnnotations , AnnotationLoadError >
225+ impl AnnotationLoader < Gaf > for GoAnnotations {
226+ fn load_from_buf_read < R > ( read : R ) -> Result < GoAnnotations , AnnotationLoadError >
230227 where
231228 R : BufRead ,
232229 {
@@ -377,7 +374,6 @@ pub mod stats {
377374
378375#[ cfg( test) ]
379376mod tests {
380-
381377 use super :: * ;
382378
383379 #[ test]
You can’t perform that action at this time.
0 commit comments