https://github.com/csbiology/obo.net

An OBO file format parser, written in F#.

https://github.com/csbiology/obo.net

Science Score: 26.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (4.6%) to scientific vocabulary
Last synced: 6 months ago · JSON representation

Repository

An OBO file format parser, written in F#.

Basic Info
  • Host: GitHub
  • Owner: CSBiology
  • License: mit
  • Language: F#
  • Default Branch: main
  • Size: 439 KB
Statistics
  • Stars: 3
  • Watchers: 3
  • Forks: 2
  • Open Issues: 14
  • Releases: 0
Created over 2 years ago · Last pushed 8 months ago
Metadata Files
Readme License

README.md

OBO.NET

An OBO file format parser, written in F#.

Usage

Basics

Read an OBO file

```fsharp open OBO.NET

let testOntology = OboOntology.fromFile true filepath ```

Create OBO terms

OOP style (recommended):

fsharp let myOboTerm = OboTerm.Create( "TO:00000000", Name = "testTerm", CreatedBy = "myself" )

Functional style:

fsharp let myOboTerm = OboTerm.create "TO:00000000" (Some "testTerm") None None None None None None None None None None None None None None None None None (Some "myself") None

Create an OBO ontology

fsharp let myOntology = OboOntology.create [myOboTerm] []

Save an OBO ontology

fsharp OboOntology.toFile "myOboOntology.obo" myOntology

Get all is_as of a Term

```fsharp let termOfInterest = testOntology.Terms[5]

let isAs = OboOntology.getIsAs termOfInterest testOntology // output is a list of (input OboTerm * is_a OboTerm (if it exists in the given OboOntology)) ```

Get all is_as of a Term recursively

```fsharp let termOfInterest = testOntology.Terms[5]

let isAs = testOntology.GetParentOntologyAnnotations(termOfInterest.Id) // output is an ISADotNet.OntologyAnnotation list

let isAsTerms = isAs |> List.map (fun oa -> testOntology.GetTerm(oa.TermAccessionString.ToString())) // output is an OboTerm list ```

Get all related Terms of a Term

```fsharp let termOfInterest = testOntology.Terms[5]

let relatedTerms = OboOntology.getRelatedTerms termOfInterest testOntology // output is a list of (input OboTerm * relation as string * related OboTerm (if it exists in the given OboOntology)) ```

Get all synonym Terms of a Term

```fsharp let termOfInterest = testOntology.Terms[5]

let synonyms = OboOntology.tryGetSynonyms termOfInterest testOntology // output is a seq of (TermSynonymScope * synonymous OboTerm (if it exists in the given OboOntology)) ```

Working with TermRelations

TermRelations are abstractions of all relations that an OboTerm can have with another one. Such TermRelations can be - Empty of SourceTerm (if there is no TermRelation between a SourceTerm and a TargetTerm), - TargetMissing of Relation * SourceTerm (if there is a TermRelation between a SourceTerm and a TargetTerm but the TargetTerm is missing), - and Target of Relation * SourceTerm * TargetTerm. Relation is of generic type 'a and can therefore be of any type that you prefer (e.g. string or a custom-made Record or Union).

Create a TermRelation

```fsharp let termOfInterest = testOntology.Terms[5] let targetOfInterest = testOntology.Terms[7]

let emptyTermRelation = Empty termOfInterest let targetMissingTermRelation = TargetMissing ("unconnectedto", termOfInterest) let targetTermRelation = Target ("connectedto", termOfInterest, targetOfInterest)

// exemplary type MyRelation = | IsA | HasA | PartOf | ConnectedTo | Unknown of string

let targetTermRelation' = Target (ConnectedTo, termOfInterest, targetOfInterest) ```

Get all TermRelations of a Term

```fsharp let termOfInterest = testOntology.Terms[5]

let relations = OboOntology.getRelations termOfInterest testOntology // output is a list of TermRelations (includes all relationships and is_as) ```

Develop

Build (QuickStart)

If not already done, install .NET SDK >= 6.

In any shell, run build.cmd <target> where <target> may be - if <target> is empty, it just runs dotnet build after cleaning everything - RunTests to run unit tests - RunTestsWithCodeCov to run unit tests with code coverage - ReleaseNotes semver:<version> where <version> may be major, minor, or patch to update RELEASE_NOTES.md - Pack to create a NuGet release - PackPrelease to create a NuGet prerelease - BuildDocs to create docs - BuildDocsPrerelease to create prerelease docs - WatchDocs to create docs and run them locally - WatchDocsPrelease to create prerelease docs and run them locally - PublishNuget to create a NuGet release and publish it - PublishNugetPrelease to create a NuGet prerelease and publish it

GitHub Events

Total
  • Release event: 1
  • Delete event: 15
  • Issue comment event: 18
  • Push event: 14
  • Pull request event: 33
  • Fork event: 1
  • Create event: 22
Last Year
  • Release event: 1
  • Delete event: 15
  • Issue comment event: 18
  • Push event: 14
  • Pull request event: 33
  • Fork event: 1
  • Create event: 22

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 24
  • Total pull requests: 58
  • Average time to close issues: about 2 months
  • Average time to close pull requests: 8 days
  • Total issue authors: 4
  • Total pull request authors: 5
  • Average comments per issue: 0.75
  • Average comments per pull request: 0.74
  • Merged pull requests: 15
  • Bot issues: 0
  • Bot pull requests: 42
Past Year
  • Issues: 0
  • Pull requests: 44
  • Average time to close issues: N/A
  • Average time to close pull requests: 11 days
  • Issue authors: 0
  • Pull request authors: 3
  • Average comments per issue: 0
  • Average comments per pull request: 0.82
  • Merged pull requests: 1
  • Bot issues: 0
  • Bot pull requests: 42
Top Authors
Issue Authors
  • omaus (16)
  • kMutagene (3)
  • Freymaurer (2)
  • HLWeil (1)
Pull Request Authors
  • dependabot[bot] (41)
  • omaus (12)
  • HLWeil (3)
  • kMutagene (2)
  • Freymaurer (1)
Top Labels
Issue Labels
Type: Feature Request (8) Type: Question (1) Type: Bug (1)
Pull Request Labels
dependencies (41) .NET (37) github_actions (4)

Packages

  • Total packages: 1
  • Total downloads:
    • nuget 155 total
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 1
  • Total maintainers: 1
nuget.org: obo.net.codegeneration

An OBO file format to F# source code generator, written in F#.

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 155 Total
Rankings
Dependent repos count: 7.7%
Dependent packages count: 20.6%
Average: 28.5%
Downloads: 57.1%
Maintainers (1)
Last synced: 7 months ago