@@ -11,29 +11,42 @@ the same thing different ways, and a reader has no authoritative reference for w
1111meant.
1212
1313**External resources ** solve this by linking a term in your file to a standardized entry in an
14- external **ontology **, **registry **, or **atlas ** — for example linking the species
14+ external **ontology **, **registry **, or **atlas **; for example linking the species
1515``"Mus musculus" `` to its entry in the NCBI Taxonomy. This makes your annotations unambiguous,
16- machine-readable, and interoperable: tools can group, search, and compare data across files and
17- labs because everyone points at the same canonical identifier.
16+ machine-readable, and interoperable, enabling tools to group, search, and compare data across
17+ files and labs because everyone points at the same canonical identifier.
18+
19+ In NWB, these links are stored using **HERD ** (HDMF External Resources Data Structure). HERD is a
20+ dedicated data structure for attaching external references to existing values in a file.
21+ HERD stores, for each annotation, the term as it appears in your file and the location where it is used,
22+ along with a compact identifier (``entity_id ``) and a resolvable URL (``entity_uri ``) for the
23+ external entry.
24+
25+ To simplify the use of external resources, **TermSets ** defined via LinkML can be used to
26+ define a set of valid terms and their corresponding external references. Using TermSets, you
27+ can then constrain a field to only accept terms from that set, validate values as they are written,
28+ and automatically populate HERD with the corresponding references.
1829
19- In NWB, these links are stored using HDMF's **HERD ** (HDMF External Resources Data) structure,
20- which records, for each annotation, the term as it appears in your file together with a compact
21- identifier (``entity_id ``) and a resolvable URL (``entity_uri ``) for the external entry.
2230
2331How to add external resources to an NWB file
2432--------------------------------------------
2533
26- There are two complementary ways to connect NWB data to external terms, both provided by HDMF:
27-
28- * **HERD ** lets you attach references to existing values in a file — recording that a given
29- attribute or column value corresponds to a specific external term. See the
30- :hdmf-docs: `HERD tutorial <tutorials/plot_external_resources.html> ` for a walkthrough of
31- :py:meth: `HERD.add_ref <hdmf.common.resources.HERD.add_ref> `.
32- * **TermSet ** lets you validate values *as you write them *, constraining a field to terms drawn
33- from a chosen ontology. See the :hdmf-docs: `TermSet tutorial <tutorials/plot_term_set.html> `,
34- and the PyNWB
35- :pynwb-docs: `How to Configure Term Validations <tutorials/general/plot_configurator.html> `
36- tutorial for configuring term validation across a file.
34+ **PyNWB tutorials **: The following tutorials provide a practical guide to using HERD and TermSets in PyNWB:
35+
36+ * :pynwb-docs: `Linking to External Resources <tutorials/general/plot_external_resources.html> `:
37+ Learn how to use HERD to annotate a single NWB file with external resources in PyNWB.
38+ * :pynwb-docs: `Annotating Multiple Files <tutorials/general/resources_streaming.html> `:
39+ Learn how to use HERD to annotate multiple remote NWB files using streaming to avoid downloading them all.
40+ * :pynwb-docs: `TermSet for Validation <tutorials/general/plot_configurator.html> `: Learn how to configure PyNWB
41+ to automatically use pre-configured TermSets to validate terms and automatically populate HERD.
42+
43+ **HDMF tutorials **: The following tutorials provide a deeper dive into the underlying HDMF structures and how to use them:
44+
45+ * :hdmf-docs: `HERD tutorial <tutorials/plot_external_resources.html> `: Learn more about the
46+ underlying HDMF HERD data structure and how to use it.
47+ * :hdmf-docs: `TermSet tutorial <tutorials/plot_term_set.html> `: Learn more about how to create
48+ new term sets and how to use TermSets to validate values against an ontology and automatically
49+ populate HERD.
3750
3851The rest of this page covers a question that comes up with both approaches: once you have picked
3952an external term, what exactly should go in the ``entity_id `` and ``entity_uri `` fields?
0 commit comments