Skip to content

ARC

The core entity of ARCtrl is of course the ARC object. It’s an in-memory representation of an ARC Scaffold.

This class contains three properties:

  • ISA of type ARCInvestigation
  • CWL
  • FileSystem of type FileSystem

The constructor takes these three values as inputs, but you can also initialize an empty ARC in memory.

open ARCtrl
let arc = ARC()

ARCtrl offers a variety of IO functionality to read and write ARCs.

The load function reads the ARC Scaffold representation for a given path.

open ARCtrl
let myArcPath = @"arcs/myARC/"
let arc = ARC.load(myArcPath)

The write function writes the whole ARC as its Scaffold representation to a given path. It will overwrite all metadata files like isa.assay.xlsx and such.

open ARCtrl
let myArcPath = @"arcs/myARC/"
arc.Write(myArcPath)

The update function updates the ARC as its Scaffold representation to a given path. It will only write those entities which have changed in the datamodel since the last load, write or update operation.

open ARCtrl
let myArcPath = @"arcs/myARC/"
arc.Update(myArcPath)

ARCs can seemlessly be read from and parsed to their RO-Crate JSON-LD string representation:

let jsonString = arc.ToROCrateJsonString(spaces = 2)
let arc2 = ARC.fromROCrateJsonString(jsonString)