diff --git a/src/ARCtrl/ARC.fs b/src/ARCtrl/ARC.fs
index 401f1aca..b2d80f02 100644
--- a/src/ARCtrl/ARC.fs
+++ b/src/ARCtrl/ARC.fs
@@ -262,7 +262,7 @@ type ARC(?isa : ArcInvestigation, ?cwl : CWL.CWL, ?fs : FileSystem.FileSystem) =
assay.DataMap <- datamap
assay.Tables <- updatedTables.Tables
)
- investigation.Assays |> Seq.iter (fun a -> a.StaticHash <- a.GetHashCode())
+ investigation.Assays |> Seq.iter (fun a -> a.StaticHash <- a.GetLightHashCode())
investigation.Studies |> Seq.iter (fun s -> s.StaticHash <- s.GetLightHashCode())
investigation.StaticHash <- investigation.GetLightHashCode()
this.ISA <- Some investigation
@@ -303,7 +303,7 @@ type ARC(?isa : ArcInvestigation, ?cwl : CWL.CWL, ?fs : FileSystem.FileSystem) =
)
inv.Assays
|> Seq.iter (fun a ->
- a.StaticHash <- a.GetHashCode()
+ a.StaticHash <- a.GetLightHashCode()
workbooks.Add (
Identifier.Assay.fileNameFromIdentifier a.Identifier,
(DTOType.ISA_Assay, Spreadsheet.ArcAssay.toFsWorkbook a))
@@ -373,7 +373,7 @@ type ARC(?isa : ArcInvestigation, ?cwl : CWL.CWL, ?fs : FileSystem.FileSystem) =
// Get Assay contracts
for a in inv.Assays do
- let hash = a.GetHashCode()
+ let hash = a.GetLightHashCode()
if a.StaticHash = 0 then
yield! a.ToCreateContract(WithFolder = true)
elif a.StaticHash <> hash then
diff --git a/src/ARCtrl/ARCtrl.fsproj b/src/ARCtrl/ARCtrl.fsproj
index 911cff74..90c2db6a 100644
--- a/src/ARCtrl/ARCtrl.fsproj
+++ b/src/ARCtrl/ARCtrl.fsproj
@@ -47,5 +47,7 @@
-
+
+
+
\ No newline at end of file
diff --git a/src/Contract/ARCtrl.Contract.fsproj b/src/Contract/ARCtrl.Contract.fsproj
index 2e4bfd3e..801ae242 100644
--- a/src/Contract/ARCtrl.Contract.fsproj
+++ b/src/Contract/ARCtrl.Contract.fsproj
@@ -22,6 +22,9 @@
+
+
+
nfdi4plants, Kevin Frey, Lukas Weil, Kevin Schneider, Oliver Maus
ARC helper functions for contracts management.
diff --git a/src/Contract/Datamap.fs b/src/Contract/Datamap.fs
index 90a41f58..29e56bbd 100644
--- a/src/Contract/Datamap.fs
+++ b/src/Contract/Datamap.fs
@@ -47,9 +47,12 @@ module DatamapContractExtensions =
static member tryFromReadContractForAssay (assayIdentifier : string) (c:Contract) =
let path = Identifier.Assay.datamapFileNameFromIdentifier assayIdentifier
match c with
- | {Path = p; Operation = READ; DTOType = Some DTOType.ISA_Datamap; DTO = Some (DTO.Spreadsheet fsworkbook)} when p = path->
- fsworkbook :?> FsWorkbook
- |> DataMap.fromFsWorkbook
+ | {Path = p; Operation = READ; DTOType = Some DTOType.ISA_Datamap; DTO = Some (DTO.Spreadsheet fsworkbook)} when p = path ->
+ let dm =
+ fsworkbook :?> FsWorkbook
+ |> DataMap.fromFsWorkbook
+ dm.StaticHash <- dm.GetHashCode()
+ dm
|> Some
| _ -> None
@@ -81,7 +84,9 @@ module DatamapContractExtensions =
let path = Identifier.Study.datamapFileNameFromIdentifier studyIdentifier
match c with
| {Path = p; Operation = READ; DTOType = Some DTOType.ISA_Datamap; DTO = Some (DTO.Spreadsheet fsworkbook)} when p = path->
- fsworkbook :?> FsWorkbook
- |> DataMap.fromFsWorkbook
- |> Some
+ let dm =
+ fsworkbook :?> FsWorkbook
+ |> DataMap.fromFsWorkbook
+ dm.StaticHash <- dm.GetHashCode()
+ Some (dm)
| _ -> None
diff --git a/src/Core/ArcTypes.fs b/src/Core/ArcTypes.fs
index 51118091..2ca42abc 100644
--- a/src/Core/ArcTypes.fs
+++ b/src/Core/ArcTypes.fs
@@ -492,6 +492,20 @@ type ArcAssay(identifier: string, ?measurementType : OntologyAnnotation, ?techno
this.StructurallyEquals(assay)
| _ -> false
+ // Hashcode without Datamap
+ member this.GetLightHashCode() =
+ [|
+ box this.Identifier
+ HashCodes.boxHashOption this.MeasurementType
+ HashCodes.boxHashOption this.TechnologyType
+ HashCodes.boxHashOption this.TechnologyPlatform
+ HashCodes.boxHashSeq this.Tables
+ HashCodes.boxHashSeq this.Performers
+ HashCodes.boxHashSeq this.Comments
+ |]
+ |> HashCodes.boxHashArray
+ |> fun x -> x :?> int
+
override this.GetHashCode() =
[|
box this.Identifier
diff --git a/src/Json/ARCtrl.Json.fsproj b/src/Json/ARCtrl.Json.fsproj
index 392c447f..fc08786d 100644
--- a/src/Json/ARCtrl.Json.fsproj
+++ b/src/Json/ARCtrl.Json.fsproj
@@ -87,6 +87,9 @@
+
+
+
nfdi4plants, Lukas Weil, Florian Wetzels, Kevin Frey
ARC and ISA json compliant parser for experimental metadata toolkit in F#. This project is meant as an easy means to open, manipulate and save ISA (Investigation,Study,Assay) metadata files in isa-json format.
diff --git a/src/Spreadsheet/ARCtrl.Spreadsheet.fsproj b/src/Spreadsheet/ARCtrl.Spreadsheet.fsproj
index 8162ff2d..0ed1fe7d 100644
--- a/src/Spreadsheet/ARCtrl.Spreadsheet.fsproj
+++ b/src/Spreadsheet/ARCtrl.Spreadsheet.fsproj
@@ -33,7 +33,7 @@
-
+
@@ -45,6 +45,9 @@
+
+
+
nfdi4plants, Lukas Weil
ARC and ISA xlsx compliant parser for experimental metadata toolkit in F#. This project is meant as an easy means to open, manipulate and save ISA (Investigation,Study,Assay) metadata files in isa-xlsx format.
diff --git a/src/Spreadsheet/Metadata/Assays.fs b/src/Spreadsheet/Metadata/Assays.fs
index f3c2efe3..5f0cf1bb 100644
--- a/src/Spreadsheet/Metadata/Assays.fs
+++ b/src/Spreadsheet/Metadata/Assays.fs
@@ -35,6 +35,7 @@ module Assays =
(Option.fromValueWithDefault (OntologyAnnotation()) technologyType)
(technologyPlatform |> Option.map JsonTypes.decomposeTechnologyPlatform)
(ResizeArray())
+ None
(ResizeArray())
(comments)
diff --git a/src/Spreadsheet/Metadata/Study.fs b/src/Spreadsheet/Metadata/Study.fs
index 23c51e1e..19e546f5 100644
--- a/src/Spreadsheet/Metadata/Study.fs
+++ b/src/Spreadsheet/Metadata/Study.fs
@@ -121,6 +121,7 @@ module Studies =
(ResizeArray contacts)
(ResizeArray designDescriptors)
(ResizeArray())
+ None
(ResizeArray(assayIdentifiers))
(ResizeArray studyInfo.Comments)
|> fun arcstudy ->