Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NERD tutorials #1722

Draft
wants to merge 10 commits into
base: dev
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3,657 changes: 3,657 additions & 0 deletions docs/notebooks/NERD_TermSet_How_to_Guide.ipynb

Large diffs are not rendered by default.

855 changes: 855 additions & 0 deletions docs/notebooks/NERD_TermSet_Quickstart.ipynb

Large diffs are not rendered by default.

Binary file added docs/notebooks/er_img.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 17 additions & 0 deletions docs/notebooks/experimenter_term_set.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
id: notebooks/species_example
name: Experimenter
prefixes:
ORCID: https://orcid.org/
imports:
- linkml:types
default_range: string

enums:
Species:
permissible_values:
Dichter, Benjamin K.:
description: The ORCiD
meaning: ORCID:0000-0001-5725-6910
Rubel, Oliver:
description: The ORCiD
meaning: ORCID:0000-0001-9902-1984
Binary file added docs/notebooks/experimenters_schema.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/notebooks/species_schema.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
24 changes: 24 additions & 0 deletions docs/notebooks/species_term_set.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
id: noteeooks/species_example
name: Species
prefixes:
NCBI_TAXON: https://www.ncbi.nlm.nih.gov/Taxonomy/Browser/wwwtax.cgi?mode=Info&id=
Ensemble: https://rest.ensembl.org/taxonomy/id/
imports:
- linkml:types
default_range: string

enums:
Species:
permissible_values:
Homo sapiens:
description: Humans
meaning: NCBI_TAXON:9606
Mus musculus:
description: Mouse
meaning: Ensemble:10090
Ursus arctos horribilis:
description: Brown Bear
meaning: NCBI_TAXON:116960
Myrmecophaga tridactyla:
description: Ant Eater
meaning: NCBI_TAXON:71006
4 changes: 2 additions & 2 deletions src/pynwb/file.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import pandas as pd

from hdmf.common import DynamicTableRegion, DynamicTable
from hdmf.container import ExternalResourcesManager
from hdmf.container import HERDManager
from hdmf.utils import docval, getargs, get_docval, popargs, popargs_to_dict, AllowPositional

from . import register_class, CORE_NAMESPACE
Expand Down Expand Up @@ -150,7 +150,7 @@ def __init__(self, **kwargs):


@register_class('NWBFile', CORE_NAMESPACE)
class NWBFile(MultiContainerInterface, ExternalResourcesManager):
class NWBFile(MultiContainerInterface, HERDManager):
"""
A representation of an NWB file.
"""
Expand Down
4 changes: 2 additions & 2 deletions src/pynwb/resources.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
from hdmf.common import ExternalResources as hdmf_ExternalResources
from hdmf.common import HERD as hdmf_ExternalResources
from . import get_type_map as tm
from hdmf.utils import docval, get_docval


class ExternalResources(hdmf_ExternalResources):
class HERD(hdmf_ExternalResources):
@docval(*get_docval(hdmf_ExternalResources.__init__))
def __init__(self, **kwargs):
kwargs['type_map'] = tm()
Expand Down
4 changes: 2 additions & 2 deletions tests/unit/test_resources.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from pynwb.resources import ExternalResources
from pynwb.resources import HERD
from pynwb.testing import TestCase


Expand All @@ -7,5 +7,5 @@ def test_constructor(self):
"""
Test constructor
"""
er = ExternalResources()
er = HERD()
self.assertIsInstance(er, ExternalResources)
Loading