-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add option to write process.json to Swate annotation table (Issue #84)…
…. ✨
- Loading branch information
1 parent
4bf33cb
commit 262dae3
Showing
10 changed files
with
385 additions
and
106 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
module ISADotNetHelpers | ||
|
||
open ISADotNet | ||
open Shared | ||
|
||
let annotationValueToString (annoVal:ISADotNet.AnnotationValue) = | ||
match annoVal with | ||
| ISADotNet.AnnotationValue.Text v -> v | ||
| ISADotNet.AnnotationValue.Float v -> string v | ||
| ISADotNet.AnnotationValue.Int v -> string v | ||
|
||
let termAccessionReduce (uri:ISADotNet.URI) = | ||
let li = uri.LastIndexOf @"/" | ||
uri.Remove(0,li+1).Replace("_",":") | ||
|
||
let valueIsOntology (v:ISADotNet.Value) = | ||
match v with | ||
| ISADotNet.Value.Ontology o -> | ||
let name = o.Name.Value |> annotationValueToString | ||
let tsr = o.TermSourceREF.Value | ||
let tan = o.TermAccessionNumber.Value |> termAccessionReduce | ||
Some <| OntologyInfo.create name tan | ||
| _ -> | ||
None | ||
|
||
let valueToString (v:ISADotNet.Value) = | ||
match v with | ||
| ISADotNet.Value.Float f -> string f | ||
| ISADotNet.Value.Int i -> string i | ||
| ISADotNet.Value.Name s -> s | ||
| ISADotNet.Value.Ontology o -> failwith "This Function (valueToString) should not be used to parse ISADotNet.Value.Ontology" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.