Setting annotations
In this page, we'll explore how to provide some values annotating your sample before running an analysis session using the ScenarioPlayer.
Annotation types
Usually, the types of annotation for your scenario(s) is given during your onboarding process with Inarix. We also give you the possible values that you can provide when setting an annotation.
Let's assume you'll have a scenario with types of annotations:
remoteId: defining the unique identifier of your sample within your company.proteinRate: defining the protein rate of your sample.variety: defining the main variety name of your sample.
How to annotate your sample?
Before entering in the ScenarioPlayerView, you may want to annotate your sample with the data already known by your application. We can programmatically declare those information.
You can set your annotation with the following calls:
// Remote ID annotation
let remoteId = "my-unique-id"
try self.player.setAnnotation(type: "remoteId", value: remoteId)
// Variety annotation
let variety = "planet"
try self.player.setAnnotation(type: "variety", value: variety)
// Protein annotation
let protein = 12.0
try self.player.setAnnotation(type: "proteinRate", value: protein)
You can have many other possible annotations, it entirely depends on your onboarding process.
Updated 9 months ago
What’s Next
Now that you can annotate your samples, how do we get the analysis results back into your application? 🧐
