owned this note
owned this note
Published
Linked with GitHub
---
title: Moorea iSamples Notes
tags: isamples, Moorea, collection
---
### iSamples Context
```plantuml
!include https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4_Container.puml
System(isc, "iSC", "iSamples Central")
System_Boundary(isamples, "iSamples"){
System(isb, "iSB", "iSamples-In-A-Box")
System_Ext(collection, "Collection", "Collection of sample records")
Rel(isb, collection, "Get records from collection")
}
BiRel(isb, isc, "Synchronize records")
Person(user, "User", "Data User")
Rel(user, isc, "Discover")
Rel(user, isb, "Discover")
Person(admin, "Admin", "Administrator")
Rel_U(admin, isc, "Manage")
Rel(admin, isb, "Manage")
System(models, "Models", "Community maintained data models and definitions, vocabulaies, ontologies, schemas")
Rel(models, isb, "Inform")
Rel(models, isc, "Inform")
SHOW_LEGEND()
```
---
### Search Interface
[https://hyde.cyverse.org/isamples_central/ui](https://hyde.cyverse.org/isamples_central/ui/)

---
### Prototyping
https://find.isample.xyz/

---
### Overview

---
### Containerized

---
### System

---
### Current Deployment
```plantuml
!include https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4_Container.puml
System(isc, "iSC", "iSamples Central")
System_Boundary(isamples_geome, "iSamples-GEOME"){
System(isb_geome, "iSB", "GEOME")
System_Ext(collection, "GEOME", "Collection of sample records")
Rel(isb_geome, collection, "Get records from collection")
}
System_Boundary(isamples_smith, "iSamples-SMITHSONIAN"){
System(isb_smith, "iSB", "Smithsonian")
System_Ext(collection_smith, "Smithsonian", "Collection of sample records")
Rel(isb_smith, collection_smith, "Get records from collection")
}
System_Boundary(isamples_oc, "iSamples-OpenContext"){
System(isb_oc, "iSB", "OpenContext")
System_Ext(collection_oc, "OpenContext", "Collection of sample records")
Rel(isb_oc, collection_oc, "Get records from collection")
}
System_Boundary(isamples_sesar, "iSamples-SESAR"){
System(isb_sesar, "iSB", "SESAR")
System_Ext(collection_sesar, "SESAR", "Collection of sample records")
Rel(isb_sesar, collection_sesar, "Get records from collection")
}
BiRel(isc, isb_geome, "Synchronize Records")
BiRel(isc, isb_smith, "Synchronize Records")
BiRel(isc, isb_oc, "Synchronize Records")
BiRel(isc, isb_sesar, "Synchronize Records")
```
---
### Hierarchical
```plantuml
!include https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4_Container.puml
System(isc, "iSC", "iSamples Central")
System(isc2, "iSC 2", "iSamples Central 2")
System(isb_a, "iSB")
System(isb_b, "iSB")
System(isb_c, "iSB")
System(isb_a2, "iSB")
System(isb_b2, "iSB")
Rel(isc, isb_a, "get")
Rel(isc, isb_b, "get")
Rel(isc, isb_c, "get")
Rel(isc2, isc, "get")
Rel(isc2, isb_a2, "get")
Rel(isc2, isb_b2, "get")
```
---
### Multiple "Centrals"
```plantuml
!include https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4_Container.puml
System(isc, "iSC", "iSamples Central")
System(isc2, "iSC 2", "iSamples Central 2")
System(isb_a, "iSB")
System(isb_b, "iSB")
System(isb_c, "iSB")
Rel(isc, isb_a, "get")
Rel(isc, isb_b, "get")
Rel(isc2, isb_b, "get")
Rel(isc2, isb_c, "get")
```
---
### Supporting Content Creation
* Sample record creation
* Minting identifiers
* pre-allocation
* retention with samples
* accumulation of information
* sub-samples, processing, analysis, publication
* Seamless ingest to collections
* Flow through to iSB, iSC
---
### Common Sampling Workflow
```plantuml
@startuml
actor "Field\nResearcher" as field
entity "Local\nIdentifier\nAuthority" as auth1
participant "The Natural\nEnvironment" as env
database "Sample\nCollection" as coll
entity "Global\nIdentifier\nAuthority" as auth2
participant iSamples
activate field
field --> env: collect sample
env --> field: unidentified sample
field --> auth1: get identifier
auth1 --> field: id-01
field --> field: Create record\nwith id-01
deactivate field
... Back to office ...
field --> coll: store sample id-01
activate coll
coll --> auth2: get identifier
auth2 --> coll: id-02
coll --> coll: preserveRecord(id-02)
coll --> field: ok
deactivate coll
iSamples --> coll: Harvest Records
field --> iSamples: get id-01
iSamples --> field: Huh?
@enduml
```
---
### Workflow with preallocated identifiers
```plantuml
actor "Field\nResearcher" as user
participant models
participant samples
participant idgen
participant collection
participant isamples
== Prepare Experiment ==
user -> models: createExperiment()
activate models
models -> samples: create()
models -> user: samples
deactivate models
user -> samples: allocateIdentifiers()
activate samples
samples -> idgen: allocateIdentifiers()
activate idgen
idgen -> samples: identifiers
deactivate idgen
samples -> user: OK
deactivate samples
== Collect Samples ==
user -> samples: createRecords()
== Publish Samples ==
user -> samples: publish()
samples -> collection: publish()
isamples -> collection: getUpdates()
activate isamples
collection -> isamples: records
deactivate isamples
```
---
### iSamples Sampling Support
```plantuml
!include https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4_Container.puml
AddElementTag("v2.0", $borderColor="#250339", $fontColor="#ffffff", $bgColor="#9775AA")
AddRelTag("v2.0", $lineColor="#754B8E", $textColor="#754B8E")
System(isb, "iSB", "iSamples-In-A-Box")
System(models, "Models", "Community maintained data models and definitions, vocabulaies, ontologies, schemas")
System(idgen, "ID Authority", "Identifier authority with capability of creating identifiers", $tags="v2.0")
System_Ext(collection, "Collection", "Collection of sample records")
System(samples, "Sample staging", "Staging area in support of sample collection. Spreadsheet, CSV, data package, etc.", $tags="v2.0")
Person(creator, "Creator", "Data record creator (e.g. field scientist collecting samples)")
Rel(models, samples, "1. Generate Template")
Rel(creator, collection, "2. Get minting auth")
Rel(creator, samples, "3. Pre-allocate identifiers")
Rel(samples, idgen, "4. Get provisional identifiers")
Rel(creator, samples, "5. Populate sample records")
Rel(creator, collection, "6. Request sample publication")
Rel(collection, idgen, "7. Published identifiers")
Rel(isb, collection, "8. Get records from collection")
```
---
### Core model
* Model definitions in LinkML
* Vocabularies defined in SKOS
* GeoJSON, other standard structures
* Models used for:
* Mapping source to iSamples Core
* Index construction
* Defining user interfaces
* Sample staging
* Extended for experiment / community demands
---
---
---
## Notes
### Sampling support
The staging area is constructed with input from the community defined models, and uses identifiers pre-allocated from an ID authority using authorization provided by the creator or the collection. After populating the sample staging (and content validation), the content is loaded ("published") to the collection. This operation also moves the pre-allocated identifiers from a provisional to "published" or "non-provisional" status. iSB subsequently retrieves the content and makes it available to iSC through the normal synchronization workflow.
The sample staging area is an environment that facilitates data collection by the researcher. It is informed by the community data models, and also by common APIs and functionality needed to support reliable capture of the content, mint identifiers, validate content, and publish content to a collection. One approach being investigated is to use a frictionless data package, with the package schema generated from the iSamples LinkML definitions.
Currently, four collections have content mapped to the common data model. Those data are exposed via an API that iSamples central uses to find changes and retrieve new and updated content. There is currently no mechanism in iSamples to add content to a collection - that is a role for each collection.
Each instance currently has the URL patterns:
```
BASE_URL/ui Web user interface
/docs API documentation
/ API operations base
```
So for example, iSamples central currently has the base url of `https://hyde.cyverse.org/isamples_central/` so the UI is accessible at:
>[https://hyde.cyverse.org/isamples_central/ui/](https://hyde.cyverse.org/isamples_central/ui/)
and the API docs are at:
> [https://hyde.cyverse.org/isamples_central/docs/](https://hyde.cyverse.org/isamples_central/docs/)
Current iSamples Central and iSamples-In-A-Box UI instances are at:
| Label | URL |
| --- | --- |
| iSamples Central | https://hyde.cyverse.org/isamples_central/ui/ |
| GEOME iSB | https://henry.cyverse.org/geome/ui/ |
| SESAR iSB | https://henry.cyverse.org/sesar/ui/ |
| Smithsonian iSB | https://henry.cyverse.org/smithsonian/ui/ |
| OpenContext iSB | https://henry.cyverse.org/opencontext/ui/ |
| Dev iSC | https://mars.cyverse.org/isamples_central/ui/
Each is a docker container instance that differ only in basic configuration properties. Deployment and upgrade is managed through Ansible playbooks to minimize operational overhead.
Basic use metrics are being recorded with a self hosted instance of plausible.io, available at
>https://metrics.isample.xyz
There are several threads of UI prototyping activity exploring mechanims for selecting, navigating, and rendering large volumes of information accessible through iSample Central. Various prototypes are available at:
> https://find.isample.xyz/