Skip to content
Snippets Groups Projects
Unverified Commit 5ed9ff1f authored by St. Elmo's avatar St. Elmo Committed by Miroslav Kratochvil
Browse files

tests pass, finally!

parent d8d4cc4c
No related branches found
No related tags found
No related merge requests found
......@@ -13,12 +13,7 @@ function check_duplicate_annotations(
for (k, gene) in gs
if k != check_gene.id
for anno in inspect_annotations
if any(
occursin.(
get(gene.annotations, anno, ["c1"]),
get(check_gene.annotations, anno, "c2"),
),
)
if !isempty(intersect(get(gene.annotations, anno, ["c1"]), get(check_gene.annotations, anno, "c2")))
return k
end
end
......
......@@ -13,12 +13,7 @@ function check_duplicate_annotations(
for (k, met) in mets
if met.compartment == cmet.compartment && k != cmet.id
for anno in inspect_annotations
if any(
occursin.(
get(met.annotations, anno, ["c1"]),
get(cmet.annotations, anno, ["c2"]),
),
)
if !isempty(intersect(get(met.annotations, anno, ["c1"]), get(cmet.annotations, anno, ["c2"])))
return k
end
end
......
......@@ -42,6 +42,7 @@ end
check_duplicate_annotations(rxn::Reaction, rxns::OrderedDict{String, Reaction}; inspect_annotations=_constants.reaction_annotation_checks)
Determine if a `rxn` has overlapping annotations in `rxns`.
Only performs check if `id`s do not match.
The annotations checked are listed in `COBREXA._constants.reaction_annotation_checks`.
Return the `id` of the first hit, otherwise `nothing`.
"""
......@@ -53,12 +54,7 @@ function check_duplicate_annotations(
for (k, rxn) in rxns
if k != crxn.id
for anno in inspect_annotations
if any(
occursin.(
get(crxn.annotations, anno, ["c1"]),
get(rxn.annotations, anno, ["c2"]),
),
)
if !isempty(intersect(get(crxn.annotations, anno, ["c1"]), get(rxn.annotations, anno, ["c2"])))
return k
end
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment