From 3c29b626fdeacd6712b39035ba114c2cf9a7d738 Mon Sep 17 00:00:00 2001 From: omaus Date: Tue, 26 Aug 2025 11:14:36 +0200 Subject: [PATCH 1/2] Add missing parameter names in ///-docs --- src/Ontology.NET/Ontology.fs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Ontology.NET/Ontology.fs b/src/Ontology.NET/Ontology.fs index 52525aa..f1a0451 100644 --- a/src/Ontology.NET/Ontology.fs +++ b/src/Ontology.NET/Ontology.fs @@ -62,6 +62,7 @@ type Ontology() = /// /// Takes a given OboOntology and returns the corresponding Ontology, with the term IDs as node keys, the terms as CvTerms as node data and the relations as edges. /// + /// The OboOntology that serves as the basis for the respective Ontology. /// If a relation points to a term that is not present in the given OboOntology, initializes them as new CvTerms but with name and ref = "<missing>". static member fromOboOntology (oboOnto : OboOntology) = @@ -1325,6 +1326,7 @@ type Ontology() = /// /// Returns the given Ontology as a collection of Triplets. /// + /// The Ontology that serves as the informational basis for the Triplet collection. /// A collection of Triplets in the form of SourceTerm * Relation * TargetTerm. static member toTriplets (onto : Ontology) = onto.ToTriplets() \ No newline at end of file From 7425e176768b5cd07db70f81f65d888e272875f7 Mon Sep 17 00:00:00 2001 From: omaus Date: Tue, 26 Aug 2025 11:19:03 +0200 Subject: [PATCH 2/2] Add extension methods for OboOntology class --- src/Ontology.NET/ExtensionMethods.fs | 25 +++++++++++++++++++++++++ src/Ontology.NET/Ontology.NET.fsproj | 3 +-- 2 files changed, 26 insertions(+), 2 deletions(-) create mode 100644 src/Ontology.NET/ExtensionMethods.fs diff --git a/src/Ontology.NET/ExtensionMethods.fs b/src/Ontology.NET/ExtensionMethods.fs new file mode 100644 index 0000000..5a77daa --- /dev/null +++ b/src/Ontology.NET/ExtensionMethods.fs @@ -0,0 +1,25 @@ +namespace Ontology.NET.OBO + + +open Ontology.NET + + +[] +module Extensions = + + type OboOntology with + + /// + /// Returns the corresponding Ontology from the OboOntology, with the term IDs as node keys, the terms as CvTerms as node data and the relations as edges. + /// + /// If a relation points to a term that is not present in the given OboOntology, initializes them as new CvTerms but with name and ref = "<missing>". + member this.ToOntology() = + Ontology.fromOboOntology this + + /// + /// Returns the corresponding Ontology from the given OboOntology, with the term IDs as node keys, the terms as CvTerms as node data and the relations as edges. + /// + /// The OboOntology that serves as the basis for the respective Ontology. + /// If a relation points to a term that is not present in the given OboOntology, initializes them as new CvTerms but with name and ref = "<missing>". + static member toOntology (oboOnto : OboOntology) = + oboOnto.ToOntology() \ No newline at end of file diff --git a/src/Ontology.NET/Ontology.NET.fsproj b/src/Ontology.NET/Ontology.NET.fsproj index 5f0925a..e3bc0b5 100644 --- a/src/Ontology.NET/Ontology.NET.fsproj +++ b/src/Ontology.NET/Ontology.NET.fsproj @@ -32,10 +32,9 @@ + - - Heinrich Lukas Weil, Oliver Maus, F# open source contributors A library to work with ontologies and ontology-related file formats.