-
Notifications
You must be signed in to change notification settings - Fork 32
/
Copy pathnwbInstallExtension.m
83 lines (81 loc) · 2.56 KB
/
nwbInstallExtension.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
function nwbInstallExtension(extensionNames, options)
% NWBINSTALLEXTENSION - Installs a specified NWB extension.
%
% Syntax:
% NWBINSTALLEXTENSION(extensionNames) installs Neurodata Without Borders
% (NWB) extensions to extend the functionality of the core NWB schemas.
% extensionNames is a scalar string or a string array, containing the name
% of one or more extensions from the Neurodata Extensions Catalog
%
% Valid Extension Names (from https://nwb-extensions.github.io):
% - "ndx-miniscope"
% - "ndx-simulation-output"
% - "ndx-ecog"
% - "ndx-fret"
% - "ndx-icephys-meta"
% - "ndx-events"
% - "ndx-nirs"
% - "ndx-hierarchical-behavioral-data"
% - "ndx-sound"
% - "ndx-extract"
% - "ndx-photometry"
% - "ndx-acquisition-module"
% - "ndx-odor-metadata"
% - "ndx-whisk"
% - "ndx-ecg"
% - "ndx-franklab-novela"
% - "ndx-photostim"
% - "ndx-multichannel-volume"
% - "ndx-depth-moseq"
% - "ndx-probeinterface"
% - "ndx-dbs"
% - "ndx-hed"
% - "ndx-ophys-devices"
%
% Usage:
% Example 1 - Install "ndx-miniscope" extension::
%
% nwbInstallExtension("ndx-miniscope")
%
% See also:
% matnwb.extension.listExtensions, matnwb.extension.installExtension
arguments
extensionNames (1,:) string {mustBeMember(extensionNames, [...
"ndx-miniscope", ...
"ndx-simulation-output", ...
"ndx-ecog", ...
"ndx-fret", ...
"ndx-icephys-meta", ...
"ndx-events", ...
"ndx-nirs", ...
"ndx-hierarchical-behavioral-data", ...
"ndx-sound", ...
"ndx-extract", ...
"ndx-photometry", ...
"ndx-acquisition-module", ...
"ndx-odor-metadata", ...
"ndx-whisk", ...
"ndx-ecg", ...
"ndx-franklab-novela", ...
"ndx-photostim", ...
"ndx-multichannel-volume", ...
"ndx-depth-moseq", ...
"ndx-probeinterface", ...
"ndx-dbs", ...
"ndx-hed", ...
"ndx-ophys-devices" ...
] ...
)} = []
options.savedir (1,1) string = misc.getMatnwbDir()
end
if isempty(extensionNames)
T = matnwb.extension.listExtensions();
extensionList = join( compose(" %s", [T.name]), newline );
error('NWB:InstallExtension:MissingArgument', ...
'Please specify the name of an extension. Available extensions:\n\n%s\n', extensionList)
else
for extensionName = extensionNames
matnwb.extension.installExtension(extensionName, 'savedir', options.savedir)
end
end
end