Read and Write
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)import {ARC} from "@nfdi4plants/arctrl";
let myArcPath = "arcs/myARC/"
ARC.loadAsync(myArcPath)from arctrl.arc import ARC
myArcPath = "arcs/myARC/"
arc = ARC.load(myArcPath)Write
Section titled WriteThe 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)import {ARC} from "@nfdi4plants/arctrl";
let myArcPath = "arcs/myARC/"
arc.WriteAsync(myArcPath)from arctrl.arc import ARC
myArcPath = "arcs/myARC/"
arc.Write(myArcPath)Update
Section titled UpdateThe 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)import {ARC} from "@nfdi4plants/arctrl";
let myArcPath = "arcs/myARC/"
arc.UpdateAsync(myArcPath)from arctrl.arc import ARC
myArcPath = "arcs/myARC/"
arc.Update(myArcPath)