Create ARCs from SOPs
This guide demonstrates how to use ARCtrl to generate an ARC from previously created SOP annotation tables.
Labs or facilities frequently combine identical types of studies and assays into new ARCs in a modular fashion. These studies and assays following routine methods are called standard operating procedures (SOPs). Consider a lab that routinely uses mass spectrometry to assess the proteome from various samples. The lab might maintain a pool of SOPs, e.g. for different sample sources (e.g. plants or bacteria) or protein digestion methods (e.g. trypsin or formic acid).
Source
flowchart LR
subgraph ARC3 direction LR subgraph s3[Study: Samples] A31[Bacterial Growth] end subgraph a3[Assay: Proteomics] B31[Protein Digest with Formic Acid] B32[Mass Spec Proteomics] end A31 --> B31 B31 --> B32 end
subgraph ARC2 direction LR subgraph s2[Study: Samples] A21[Bacterial Growth] end subgraph a2[Assay: Proteomics] B21[Protein Digest with Trypsin] B22[Mass Spec Proteomics] end A21 --> B21 B21 --> B22 end
subgraph ARC1 direction LR subgraph s1[Study: Samples] A11[Plant Growth] end subgraph a1[Assay: Proteomics] B11[Protein Digest with Trypsin] B12[Mass Spec Proteomics] end A11 --> B11 B11 --> B12 end
linkStyle default stroke:#2D3E50,stroke-width:3px; classDef default rx:1em,ry:1em;
classDef greyBox fill:#eaecee,color:#2D3E50,rx:1em,ry:1em,width:1100px,font-weight:bold,font-size:16px,margin-top:80px; classDef whiteBox fill:#ffffff,color:#2D3E50,rx:1em,ry:1em,margin-top:80px; classDef mint fill:#62d4c1; classDef yellow fill:#ffd34d; classDef olive fill:#b4ce82; classDef red30 fill:#D46275;
class ARC1,ARC2,ARC3 greyBox; class a1,a2,a3,s1,s2,s3 whiteBox; class A11 olive; class A21,A31 red30; class B11,B21 yellow; class B31 mint;Study SOP: Plant Growth
Section titled “Study SOP: Plant Growth”The SOP holds the following template table to be filled with the information about how the plant samples were grown:
| Input [Source Name] | Protocol REF | Characteristic [organism] | Characteristic [Tissue] | Characteristic [Growth Medium] | Characteristic [ecotype] | Parameter [Light intensity] | Factor [temperature] | Parameter [exposure duration] | Output [Sample Name] |
|---|---|---|---|---|---|---|---|---|---|
The SOP in json format looks like this
{ "Identifier": "AthalianaColdStress", "Description": "Cold acclimation analysis of Arabidopsis leaf tissue", "Tables": [ { "name": "plant-growth", "header": [ { "headertype": "Input", "values": [ "Source Name" ] }, { "headertype": "ProtocolUri", "values": [] }, { "headertype": "Characteristic", "values": [ { "annotationValue": "organism" } ] }, { "headertype": "Characteristic", "values": [ { "annotationValue": "Tissue", "termSource": "NCIT", "termAccession": "NCIT:C12801" } ] }, { "headertype": "Characteristic", "values": [ { "annotationValue": "Growth Medium", "termSource": "NCIT", "termAccession": "NCIT:C85504" } ] }, { "headertype": "Characteristic", "values": [ { "annotationValue": "ecotype", "termSource": "EFO", "termAccession": "EFO:0000434" } ] }, { "headertype": "Parameter", "values": [ { "annotationValue": "Light intensity", "termSource": "MIAPPE", "termAccession": "MIAPPE:0101" } ] }, { "headertype": "Factor", "values": [ { "annotationValue": "temperature", "termSource": "EFO", "termAccession": "EFO:0001702" } ] }, { "headertype": "Parameter", "values": [ { "annotationValue": "exposure duration", "termSource": "NCIT", "termAccession": "NCIT:C83280" } ] }, { "headertype": "Output", "values": [ "Sample Name" ] } ] } ]}Assay SOP: Protein Digest with Trypsin
Section titled “Assay SOP: Protein Digest with Trypsin”This SOP contains the already filled out annotation table with the information about the SOP to trypsin-digest extracted proteins.
| Input [Sample Name] | Parameter [sample mass] | Parameter [Protein Precipitation] | Parameter [alkylating agent] | Parameter [reducing agent] | Parameter [cleavage agent name] | Parameter [Tryptic Digestion] | Parameter [sample preparation] | Output [Sample Name] |
|---|---|---|---|---|---|---|---|---|
| 10 | acetone | Chloroacetamide | TCEP | Trypsin | in-solution digestion | reversed-phase solid-phase extraction |
The SOP in json format looks like this
{ "Identifier": "Proteomics_MS", "MeasurementType": { "annotationValue": "Proteomics_MS", "termSource": "MS", "termAccession": "https://www.ebi.ac.uk/ols4/ontologies/ms/classes/http%253A%252F%252Fpurl.obolibrary.org%252Fobo%252FMS_1003348" }, "TechnologyType": { "annotationValue": "Mass Spectrometry", "termSource": "NCIT", "termAccession": "https://bioregistry.io/NCIT:C17156" }, "TechnologyPlatform": { "annotationValue": "timsTOF Pro 2", "termSource": "MS", "termAccession": "MS:1003230" }, "Tables": [ { "name": "ProtDigest-Trypsin", "header": [ { "headertype": "Input", "values": [ "Sample Name" ] }, { "headertype": "Parameter", "values": [ { "annotationValue": "sample mass", "termSource": "MS", "termAccession": "MS:1000004" } ] }, { "headertype": "Parameter", "values": [ { "annotationValue": "Protein Precipitation", "termSource": "NCIT", "termAccession": "NCIT:C113065" } ] }, { "headertype": "Parameter", "values": [ { "annotationValue": "alkylating agent", "termSource": "CHEBI", "termAccession": "CHEBI:22333" } ] }, { "headertype": "Parameter", "values": [ { "annotationValue": "reducing agent", "termSource": "CHEBI", "termAccession": "CHEBI:63247" } ] }, { "headertype": "Parameter", "values": [ { "annotationValue": "cleavage agent name", "termSource": "MS", "termAccession": "MS:1001045" } ] }, { "headertype": "Parameter", "values": [ { "annotationValue": "Tryptic Digestion", "termSource": "NCIT", "termAccession": "NCIT:C68835" } ] }, { "headertype": "Parameter", "values": [ { "annotationValue": "sample preparation", "termSource": "MS", "termAccession": "MS:1000831" } ] }, { "headertype": "Output", "values": [ "Sample Name" ] } ], "values": [ [ [ 0, 0 ], { "celltype": "FreeText", "values": [ "" ] } ], [ [ 1, 0 ], { "celltype": "Unitized", "values": [ "10", { "annotationValue": "microgram", "termSource": "UO", "termAccession": "https://bioregistry.io/UO:0000023" } ] } ], [ [ 2, 0 ], { "celltype": "Term", "values": [ { "annotationValue": "acetone", "termSource": "CHEBI", "termAccession": "https://bioregistry.io/CHEBI:15347" } ] } ], [ [ 3, 0 ], { "celltype": "Term", "values": [ { "annotationValue": "Chloroacetamide", "termSource": "NCIT", "termAccession": "https://bioregistry.io/NCIT:C161899" } ] } ], [ [ 4, 0 ], { "celltype": "Term", "values": [ { "annotationValue": "TCEP", "termSource": "CHEBI", "termAccession": "https://bioregistry.io/CHEBI:63213" } ] } ], [ [ 5, 0 ], { "celltype": "Term", "values": [ { "annotationValue": "Trypsin", "termSource": "MS", "termAccession": "https://www.ebi.ac.uk/ols4/ontologies/ms/classes/http%253A%252F%252Fpurl.obolibrary.org%252Fobo%252FMS_1001251" } ] } ], [ [ 6, 0 ], { "celltype": "Term", "values": [ { "annotationValue": "in-solution digestion", "termSource": "MS", "termAccession": "https://www.ebi.ac.uk/ols4/ontologies/ms/classes/http%253A%252F%252Fpurl.obolibrary.org%252Fobo%252FMS_1002986" } ] } ], [ [ 7, 0 ], { "celltype": "Term", "values": [ { "annotationValue": "reversed-phase solid-phase extraction", "termSource": "CHMO", "termAccession": "http://purl.obolibrary.org/obo/CHMO_0001585" } ] } ], [ [ 8, 0 ], { "celltype": "FreeText", "values": [ "" ] } ] ] } ]}The following script is split in two parts.
Part 1: Define inputs and outputs
Section titled “Part 1: Define inputs and outputs”The first part includes the variable information, that needs to be adapted per ARC as highlighted, i.e.
- the path to the ARC (
arcPath) - the
personsto be added - the ARC’s
titleandidentifier - the paths to existing SOPs (
studyJsonPathsandassayJsonPaths)
In this example, the script uses only the two SOPs (“PlantGrowth” and “ProtDigest-Trypsin”) introduced above, and it adds two contact persons. Both of these variables could be extended to add more SOPs or more persons one per line, respectively.
#r "nuget: ARCtrl"
open ARCtrlopen ARCtrl.Jsonopen ARCtrl.Helper
// Path where the ARC should be createdlet arcPath = "template-arc"
// Contactslet persons = ResizeArray[ Person(firstName = "Viola", lastName = "Canina"); Person(firstName = "Jasmine", lastName = "Beetroot", midInitials = "L"); ]
// Investigationlet inv = ArcInvestigation( identifier = "AthalianaColdStressSugar", title = "Arabidopsis thaliana cold acclimation", contacts = persons )
// Paths to study SOP(s) of type ARCtrl.jsonlet studyJsonPaths = [ @"PlantGrowth.arctrl.json" ]
// Paths to assay SOP(s) of type ARCtrl.jsonlet assayJsonPaths = [ @"ProtDigest-Trypsin.arctrl.json" ]from arctrl.arc import ARCfrom arctrl.arctrl import ArcInvestigation, Personfrom arctrl.arctrl import JsonController
import json
# Path where the ARC should be createdarcPath = "template-arc"
# Contactspersons = [ Person(first_name = "Viola", last_name = "Canina"), Person(first_name = "Jasmine", last_name = "Beetroot", mid_initials = "L")]
# Investigationinv = ArcInvestigation( identifier = "AthalianaColdStressSugar", title = "Arabidopsis thaliana cold acclimation", contacts = persons )
# Paths to study SOP(s) of type ARCtrl.jsonstudyJsonPaths = [ "PlantGrowth.arctrl.json" ]
# Paths to assay SOP(s) of type ARCtrl.jsonassayJsonPaths = [ "ProtDigest-Trypsin.arctrl.json" ]Part 2: Combine and write the ARC
Section titled “Part 2: Combine and write the ARC”The second part of the script creates the ARC based on the provided information and SOPs.
// Add study
let addStudyFromJson (studyJsonPath : string) =
let studyJsonString = System.IO.File.ReadAllText(studyJsonPath) let studyFromJson = ArcStudy.fromJsonString(studyJsonString)
inv.AddStudy studyFromJson
studyJsonPaths|> Seq.iter addStudyFromJson
// Add assay
let addAssayFromJson (assayJsonPath : string) =
let assayJsonString = System.IO.File.ReadAllText(assayJsonPath) let assayFromJson = ArcAssay.fromJsonString(assayJsonString)
inv.AddAssay assayFromJson
assayJsonPaths|> Seq.iter addAssayFromJson
// Create ARC
let arc = ARC( isa = inv )
// Write ARC to path
arc.Write arcPath# Add studydef addStudyFromJson(studyJsonPath): with open(studyJsonPath, encoding="utf-8") as f: studyJsonString = json.dumps(json.load(f))
studyFromJson = JsonController.Study().from_json_string(studyJsonString)
inv.AddStudy(studyFromJson)
for s in studyJsonPaths: addStudyFromJson(s)
# Add assaydef addAssayFromJson (assayJsonPath):
with open(assayJsonPath) as f: assayJsonString = json.dumps(json.load(f))
assayFromJson = JsonController.Assay().from_json_string(assayJsonString)
inv.AddAssay(assayFromJson)
for a in assayJsonPaths: addAssayFromJson(a)
# Create ARCarc = ARC( isa = inv )
# Write ARC to patharc.Write(arcPath)Download example
Section titled “Download example”You can download the example script and SOPs here to adapt them to your needs.