File tree 3 files changed +1
-14
lines changed
3 files changed +1
-14
lines changed Original file line number Diff line number Diff line change 66
66
} else {
67
67
Ok ( TaxRank :: Unspecified )
68
68
}
69
-
70
69
}
71
70
72
71
fn serialize_tax_rank < S > ( x : & TaxRank , s : S ) -> Result < S :: Ok , S :: Error >
@@ -191,17 +190,7 @@ fn load_node_link_json(tax_json: &Value) -> TaxonomyResult<GeneralTaxonomy> {
191
190
// content
192
191
let fixed_source = idx_mapping_after_sorting[ & link. source ] ;
193
192
let fixed_target = idx_mapping_after_sorting[ & link. target ] ;
194
-
195
193
parent_ids[ fixed_source] = fixed_target;
196
- // parent should always be higher than child in the tree and since we might
197
- // have moved things around we need to ensure it stays the case
198
- if fixed_target > fixed_source {
199
- parent_ids[ fixed_target] = fixed_source;
200
- } else {
201
- parent_ids[ fixed_source] = fixed_target;
202
- }
203
- parent_ids[ idx_mapping_after_sorting[ & link. source ] ] =
204
- idx_mapping_after_sorting[ & link. target ] ;
205
194
}
206
195
207
196
GeneralTaxonomy :: from_arrays (
Original file line number Diff line number Diff line change @@ -11,10 +11,9 @@ mod taxonomy;
11
11
12
12
pub use crate :: taxonomy:: Taxonomy ;
13
13
pub use base:: GeneralTaxonomy ;
14
+ pub use errors:: { Error , ErrorKind } ;
14
15
pub use formats:: json;
15
16
pub use formats:: ncbi;
16
17
pub use formats:: newick;
17
18
pub use formats:: phyloxml;
18
19
pub use rank:: TaxRank ;
19
- pub use errors:: { Error , ErrorKind } ;
20
-
Original file line number Diff line number Diff line change @@ -17,7 +17,6 @@ pub trait Taxonomy<'t> {
17
17
/// This method must return the node itself as the first entry in the list
18
18
/// and the root node as the last entry in the list.
19
19
fn lineage ( & ' t self , tax_id : & ' t str ) -> TaxonomyResult < Vec < & ' t str > > {
20
- // make a vec of parents of id1
21
20
let mut parents = Vec :: new ( ) ;
22
21
let mut last_parent = tax_id;
23
22
parents. push ( tax_id) ;
You can’t perform that action at this time.
0 commit comments