Skip to content

Commit

Permalink
Merge pull request #48 from nfdi4plants/ARCtrl
Browse files Browse the repository at this point in the history
Add process graph tokenization
  • Loading branch information
kMutagene authored Jan 9, 2024
2 parents cd23da6 + 5798f6a commit 5116014
Show file tree
Hide file tree
Showing 32 changed files with 1,707 additions and 789 deletions.
1 change: 1 addition & 0 deletions build/ProjectInfo.fs
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ let structuralOntologySources = [
"src/ARCTokenization/structural_ontologies/investigation_metadata_structural_ontology.yml"
"src/ARCTokenization/structural_ontologies/study_metadata_structural_ontology.yml"
"src/ARCTokenization/structural_ontologies/assay_metadata_structural_ontology.yml"
"src/ARCTokenization/structural_ontologies/arc_process_graph_structural_ontology.yml"
"src/ARCTokenization/structural_ontologies/arc_file_structure_ontology.yml"
]

Expand Down
26 changes: 25 additions & 1 deletion src/ARCTokenization/ARCMock.fs
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
namespace ARCTokenization

open ControlledVocabulary
open ARCtrl
open ARCtrl.ISA

type ARCMock =

Expand Down Expand Up @@ -418,4 +420,26 @@ type ARCMock =
else
CvParam(term, ParamValue.Value v, [])
)
)
)

static member ProcessGraphColumn(
header: ARCtrl.ISA.CompositeHeader,
cells: seq<ARCtrl.ISA.CompositeCell>
) =
CompositeColumn.create(header, cells |> Array.ofSeq)
|> Tokenization.ARCtrl.CompositeColumn.tokenize

static member ProcessGraph(
columns: seq<ARCtrl.ISA.CompositeHeader * seq<ARCtrl.ISA.CompositeCell>>
) =
let table = ArcTable.create("", new ResizeArray<_>(), new System.Collections.Generic.Dictionary<_,_>())

columns
|> Seq.map (fun (headerTerm, cells) ->
CompositeColumn.create(headerTerm, cells |> Array.ofSeq)
)
|> Array.ofSeq
|> table.AddColumns

table
|> Tokenization.ARCtrl.ARCTable.tokenizeColumns
10 changes: 7 additions & 3 deletions src/ARCTokenization/ARCTokenization.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,17 @@
<ItemGroup>
<None Include="RELEASE_NOTES.md" />
<Compile Include="structural_ontologies\AFSO.fs" />
<Compile Include="structural_ontologies\APGSO.fs" />
<Compile Include="structural_ontologies\INVMSO.fs" />
<Compile Include="structural_ontologies\STDMSO.fs" />
<Compile Include="structural_ontologies\ASSMSO.fs" />
<EmbeddedResource Include="structural_ontologies/arc_file_structure_ontology.obo" CopyToOutputDirectory="Always" Pack="true" PackagePath="structural_ontologies" />
<EmbeddedResource Include="structural_ontologies/arc_process_graph_structural_ontology.obo" CopyToOutputDirectory="Always" Pack="true" PackagePath="structural_ontologies" />
<EmbeddedResource Include="structural_ontologies/investigation_metadata_structural_ontology.obo" CopyToOutputDirectory="Always" Pack="true" PackagePath="structural_ontologies" />
<EmbeddedResource Include="structural_ontologies/study_metadata_structural_ontology.obo" CopyToOutputDirectory="Always" Pack="true" PackagePath="structural_ontologies" />
<EmbeddedResource Include="structural_ontologies/assay_metadata_structural_ontology.obo" CopyToOutputDirectory="Always" Pack="true" PackagePath="structural_ontologies" />
<None Include="structural_ontologies/arc_file_structure_ontology.yml" />
<None Include="structural_ontologies/arc_process_graph_structural_ontology.yml" />
<None Include="structural_ontologies/investigation_metadata_structural_ontology.yml" />
<None Include="structural_ontologies/study_metadata_structural_ontology.yml" />
<None Include="structural_ontologies/assay_metadata_structural_ontology.yml" />
Expand Down Expand Up @@ -60,9 +63,10 @@
<ItemGroup>
<ProjectReference Include="..\ControlledVocabulary\ControlledVocabulary.fsproj" PackageVersion="[1.0.0, 2.0.0)" />
<PackageReference Include="FSharpAux.Core" Version="[2.0.0]" />
<PackageReference Include="FsOboParser" Version="[0.3.0]" />
<PackageReference Include="FsSpreadsheet" Version="[4.1.0]" />
<PackageReference Include="FsSpreadsheet.ExcelIO" Version="[4.1.0]" />
<PackageReference Include="OBO.NET" Version="[0.4.2]" />
<PackageReference Include="FsSpreadsheet" Version="[5.0.2]" />
<PackageReference Include="FsSpreadsheet.ExcelIO" Version="[5.0.2]" />
<PackageReference Include="ARCtrl" Version="[1.0.1]" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
</ItemGroup>

Expand Down
Loading

0 comments on commit 5116014

Please sign in to comment.