diff --git a/notebooks/NWB_export.ipynb b/notebooks/NWB_export.ipynb index a9007740..10d28039 100644 --- a/notebooks/NWB_export.ipynb +++ b/notebooks/NWB_export.ipynb @@ -11,45 +11,306 @@ ] }, { - "cell_type": "markdown", - "id": "4ad5b737", + "cell_type": "code", + "execution_count": 10, + "id": "bdf5453e", + "metadata": {}, + "outputs": [], + "source": [ + "import datajoint as dj\n", + "from tests.tutorial_pipeline import lab, subject, session, probe, ephys\n", + "from element_animal.export.nwb import subject_to_nwb\n", + "from element_lab.export.nwb import element_lab_to_nwb_dict\n", + "from element_session.export.nwb import session_to_nwb\n", + "from element_array_ephys.export.nwb import ecephys_session_to_nwb\n", + "from element_interface.dandi import upload_to_dandi" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "id": "a7458904", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "DataJoint connection (connected) root@fakeservices.datajoint.io:3306" + ] + }, + "execution_count": 2, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "dj.conn()" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "id": "ff12d9aa", "metadata": {}, + "outputs": [], "source": [ - "## Setup\n", + "lab_key={\"lab\": \"LabA\"}\n", + "protocol_key={\"protocol\": \"ProtA\"}\n", + "project_key={\"project\": \"ProjA\"}\n", + "session_key = dict(subject=\"subject5\", session_datetime=\"2023-01-01 00:00:00\")\n", "\n", - "First, let's change directories to find the `dj_local_conf` file." + "lab.Lab.insert1(\n", + " {\n", + " **lab_key,\n", + " \"lab_name\": \"LabA\",\n", + " \"address\": \"\",\n", + " \"time_zone\": \"UTC+0\",\n", + " },\n", + " skip_duplicates=True,\n", + ")\n", + "lab.Organization.insert1(\n", + " {\n", + " \"organization\": \"DataJoint\",\n", + " \"org_name\": \"DataJoint\",\n", + " \"org_address\": \"4265, San Felipe St., Houston, TX\"\n", + " }, skip_duplicates=True,\n", + ")\n", + "lab.Lab.Organization.insert1(\n", + " {\n", + " **lab_key,\n", + " \"organization\": \"DataJoint\"\n", + " }, skip_duplicates=True,\n", + ")\n", + "lab.ProtocolType.insert1({\"protocol_type\": \"A\"}, skip_duplicates=True)\n", + "lab.Protocol.insert1({**protocol_key, \"protocol_type\": \"A\"}, skip_duplicates=True)\n", + "lab.Project.insert1(project_key, skip_duplicates=True)" ] }, { "cell_type": "code", - "execution_count": null, - "id": "39f49466", + "execution_count": 27, + "id": "f22ada03", "metadata": {}, "outputs": [], "source": [ - "import os\n", - "# change to the upper level folder to detect dj_local_conf.json\n", - "if os.path.basename(os.getcwd())=='notebooks': os.chdir('..')" + "session.SessionNote.insert1(\n", + " {\n", + " **session_key,\n", + " \"session_note\": \"DataJoint ephys tutorial session.\"\n", + " }\n", + ")" ] }, { "cell_type": "code", "execution_count": null, - "id": "bd47ac8d", + "id": "9fe076bd", "metadata": {}, "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": 28, + "id": "b6c8aa9e", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Lab:\n", + "\n", + "{'institution': 'DataJoint', 'lab': 'LabA', 'experiment_description': '', 'keywords': None, 'related_publications': None, 'protocol': 'ProtA', 'notes': ''}\n", + "\n", + "Animal:\n", + "\n", + "subject pynwb.file.Subject at 0x140263087158656\n", + "Fields:\n", + " age__reference: birth\n", + " date_of_birth: 2023-01-01 00:00:00+00:00\n", + " description: {\"subject\": \"subject5\", \"subject_nickname\": \"\", \"sex\": \"U\", \"subject_birth_date\": \"2023-01-01\", \"subject_description\": \"\", \"species\": null, \"line\": null, \"strain\": null, \"source\": null}\n", + " sex: U\n", + " species: []\n", + " subject_id: subject5\n", + "\n", + "\n", + "Session:\n", + "\n", + "root pynwb.file.NWBFile at 0x140263088511200\n", + "Fields:\n", + " file_create_date: [datetime.datetime(2024, 4, 19, 15, 5, 15, 957866, tzinfo=tzlocal())]\n", + " identifier: 83720c8f-64eb-4d6d-92c3-9d20deca359a\n", + " session_description: DataJoint ephys tutorial session.\n", + " session_id: subject5_2023-01-01T00:00:00\n", + " session_start_time: 2023-01-01 00:00:00+00:00\n", + " subject: subject pynwb.file.Subject at 0x140263087158656\n", + "Fields:\n", + " age__reference: birth\n", + " subject_id: subject5\n", + "\n", + " timestamps_reference_time: 2023-01-01 00:00:00+00:00\n", + "\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "/usr/local/lib/python3.9/site-packages/pynwb/file.py:146: UserWarning: Date is missing timezone information. Updating to local timezone.\n", + " args_to_set['date_of_birth'] = _add_missing_timezone(date_of_birth)\n" + ] + }, + { + "ename": "TypeError", + "evalue": "pynwb.file.NWBFile() argument after ** must be a mapping, not NoneType", + "output_type": "error", + "traceback": [ + "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", + "\u001b[0;31mTypeError\u001b[0m Traceback (most recent call last)", + "Cell \u001b[0;32mIn[28], line 9\u001b[0m\n\u001b[1;32m 6\u001b[0m \u001b[39mprint\u001b[39m(\u001b[39m'\u001b[39m\u001b[39m\\n\u001b[39;00m\u001b[39mSession:\u001b[39m\u001b[39m\\n\u001b[39;00m\u001b[39m'\u001b[39m)\n\u001b[1;32m 7\u001b[0m \u001b[39mprint\u001b[39m(session_to_nwb(session_key\u001b[39m=\u001b[39msession_key))\n\u001b[0;32m----> 9\u001b[0m nwbfile \u001b[39m=\u001b[39m ecephys_session_to_nwb(session_key\u001b[39m=\u001b[39;49msession_key,\n\u001b[1;32m 10\u001b[0m raw\u001b[39m=\u001b[39;49m\u001b[39mTrue\u001b[39;49;00m,\n\u001b[1;32m 11\u001b[0m spikes\u001b[39m=\u001b[39;49m\u001b[39mTrue\u001b[39;49;00m,\n\u001b[1;32m 12\u001b[0m lfp\u001b[39m=\u001b[39;49m\u001b[39m\"\u001b[39;49m\u001b[39mdj\u001b[39;49m\u001b[39m\"\u001b[39;49m,\n\u001b[1;32m 13\u001b[0m end_frame\u001b[39m=\u001b[39;49m\u001b[39m100\u001b[39;49m,\n\u001b[1;32m 14\u001b[0m lab_key\u001b[39m=\u001b[39;49mlab_key,\n\u001b[1;32m 15\u001b[0m project_key\u001b[39m=\u001b[39;49mproject_key,\n\u001b[1;32m 16\u001b[0m protocol_key\u001b[39m=\u001b[39;49mprotocol_key,\n\u001b[1;32m 17\u001b[0m nwbfile_kwargs\u001b[39m=\u001b[39;49m\u001b[39mNone\u001b[39;49;00m)\n", + "File \u001b[0;32m/workspaces/element-array-ephys/element_array_ephys/export/nwb/nwb.py:614\u001b[0m, in \u001b[0;36mecephys_session_to_nwb\u001b[0;34m(session_key, raw, spikes, lfp, end_frame, lab_key, project_key, protocol_key, nwbfile_kwargs)\u001b[0m\n\u001b[1;32m 606\u001b[0m nwbfile \u001b[39m=\u001b[39m session_to_nwb(\n\u001b[1;32m 607\u001b[0m session_key,\n\u001b[1;32m 608\u001b[0m lab_key\u001b[39m=\u001b[39mlab_key,\n\u001b[0;32m (...)\u001b[0m\n\u001b[1;32m 611\u001b[0m additional_nwbfile_kwargs\u001b[39m=\u001b[39mnwbfile_kwargs,\n\u001b[1;32m 612\u001b[0m )\n\u001b[1;32m 613\u001b[0m \u001b[39melse\u001b[39;00m:\n\u001b[0;32m--> 614\u001b[0m nwbfile \u001b[39m=\u001b[39m pynwb\u001b[39m.\u001b[39mNWBFile(\u001b[39m*\u001b[39m\u001b[39m*\u001b[39mnwbfile_kwargs)\n\u001b[1;32m 616\u001b[0m ephys_root_data_dir \u001b[39m=\u001b[39m ephys\u001b[39m.\u001b[39mget_ephys_root_data_dir()\n\u001b[1;32m 618\u001b[0m \u001b[39mif\u001b[39;00m raw:\n", + "\u001b[0;31mTypeError\u001b[0m: pynwb.file.NWBFile() argument after ** must be a mapping, not NoneType" + ] + } + ], "source": [ - "# We'll be working with long tables, so we'll make visualization easier with a limit\n", - "import datajoint as dj\n", - "dj.config['display.limit']=10" + "print('Lab:\\n')\n", + "print(element_lab_to_nwb_dict(lab_key=lab_key, protocol_key=protocol_key, \n", + " project_key=project_key))\n", + "print('\\nAnimal:\\n')\n", + "print(subject_to_nwb(session_key=session_key))\n", + "print('\\nSession:\\n')\n", + "print(session_to_nwb(session_key=session_key))\n", + "\n", + "nwbfile = ecephys_session_to_nwb(session_key=session_key,\n", + " raw=True,\n", + " spikes=True,\n", + " lfp=\"dj\",\n", + " end_frame=100,\n", + " lab_key=lab_key,\n", + " project_key=project_key,\n", + " protocol_key=protocol_key,\n", + " nwbfile_kwargs=None)" ] }, { - "cell_type": "markdown", - "id": "f2161a4e", + "cell_type": "code", + "execution_count": null, + "id": "9f373aed", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": 12, + "id": "ee8d1583", "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "\n", + " \n", + " \n", + " \n", + " \n", + "
\n", + " \n", + " \n", + " \n", + "
\n", + "

lab

\n", + " Abbreviated lab name\n", + "
\n", + "

organization

\n", + " Abbreviated organization name\n", + "
\n", + "

lab_name

\n", + " Full lab name\n", + "
\n", + "

address

\n", + " Physical lab address\n", + "
\n", + "

time_zone

\n", + " 'UTC±X' format or timezone, e.g., America/New_York\n", + "
\n", + "

org_name

\n", + " Full organization name\n", + "
\n", + "

org_address

\n", + " Address of the organization\n", + "
\n", + "

org_comment

\n", + " Additional notes on the organization\n", + "
\n", + " \n", + "

Total: 0

\n", + " " + ], + "text/plain": [ + "*lab *organization lab_name address time_zone org_name org_address org_comment \n", + "+-----+ +------------+ +----------+ +---------+ +-----------+ +----------+ +------------+ +------------+\n", + "\n", + " (Total: 0)" + ] + }, + "execution_count": 12, + "metadata": {}, + "output_type": "execute_result" + } + ], "source": [ - "CodeBook users should also set a couple additional config parameters." + "(lab.Lab * lab.Lab.Organization * lab.Organization & lab_key)" ] }, { @@ -78,18 +339,10 @@ }, { "cell_type": "code", - "execution_count": 2, + "execution_count": null, "id": "79cef246", "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Connecting cbroz@dss-db.datajoint.io:3306\n" - ] - } - ], + "outputs": [], "source": [ "from workflow_array_ephys.pipeline import lab, subject, session, probe, ephys\n", "from workflow_array_ephys.export import (element_lab_to_nwb_dict, subject_to_nwb, \n", @@ -110,7 +363,7 @@ }, { "cell_type": "code", - "execution_count": 3, + "execution_count": null, "id": "e6cebd98", "metadata": {}, "outputs": [], @@ -161,6 +414,75 @@ "lab.Project.insert1(project_key, skip_duplicates=True)" ] }, + { + "cell_type": "code", + "execution_count": 9, + "id": "e4c01468", + "metadata": {}, + "outputs": [ + { + "ename": "TypeError", + "evalue": "pynwb.file.NWBFile() argument after ** must be a mapping, not NoneType", + "output_type": "error", + "traceback": [ + "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", + "\u001b[0;31mTypeError\u001b[0m Traceback (most recent call last)", + "Cell \u001b[0;32mIn[9], line 1\u001b[0m\n\u001b[0;32m----> 1\u001b[0m nwbfile \u001b[39m=\u001b[39m ecephys_session_to_nwb(session_key\u001b[39m=\u001b[39;49msession_key,\n\u001b[1;32m 2\u001b[0m raw\u001b[39m=\u001b[39;49m\u001b[39mTrue\u001b[39;49;00m,\n\u001b[1;32m 3\u001b[0m spikes\u001b[39m=\u001b[39;49m\u001b[39mTrue\u001b[39;49;00m,\n\u001b[1;32m 4\u001b[0m lfp\u001b[39m=\u001b[39;49m\u001b[39m\"\u001b[39;49m\u001b[39mdj\u001b[39;49m\u001b[39m\"\u001b[39;49m,\n\u001b[1;32m 5\u001b[0m end_frame\u001b[39m=\u001b[39;49m\u001b[39m100\u001b[39;49m,\n\u001b[1;32m 6\u001b[0m lab_key\u001b[39m=\u001b[39;49mlab_key,\n\u001b[1;32m 7\u001b[0m project_key\u001b[39m=\u001b[39;49mproject_key,\n\u001b[1;32m 8\u001b[0m protocol_key\u001b[39m=\u001b[39;49mprotocol_key)\n", + "File \u001b[0;32m/workspaces/element-array-ephys/element_array_ephys/export/nwb/nwb.py:614\u001b[0m, in \u001b[0;36mecephys_session_to_nwb\u001b[0;34m(session_key, raw, spikes, lfp, end_frame, lab_key, project_key, protocol_key, nwbfile_kwargs)\u001b[0m\n\u001b[1;32m 606\u001b[0m nwbfile \u001b[39m=\u001b[39m session_to_nwb(\n\u001b[1;32m 607\u001b[0m session_key,\n\u001b[1;32m 608\u001b[0m lab_key\u001b[39m=\u001b[39mlab_key,\n\u001b[0;32m (...)\u001b[0m\n\u001b[1;32m 611\u001b[0m additional_nwbfile_kwargs\u001b[39m=\u001b[39mnwbfile_kwargs,\n\u001b[1;32m 612\u001b[0m )\n\u001b[1;32m 613\u001b[0m \u001b[39melse\u001b[39;00m:\n\u001b[0;32m--> 614\u001b[0m nwbfile \u001b[39m=\u001b[39m pynwb\u001b[39m.\u001b[39mNWBFile(\u001b[39m*\u001b[39m\u001b[39m*\u001b[39mnwbfile_kwargs)\n\u001b[1;32m 616\u001b[0m ephys_root_data_dir \u001b[39m=\u001b[39m ephys\u001b[39m.\u001b[39mget_ephys_root_data_dir()\n\u001b[1;32m 618\u001b[0m \u001b[39mif\u001b[39;00m raw:\n", + "\u001b[0;31mTypeError\u001b[0m: pynwb.file.NWBFile() argument after ** must be a mapping, not NoneType" + ] + } + ], + "source": [ + "from element_lab.export import \n", + "print('Lab:\\n')\n", + "print(element_lab_to_nwb_dict(lab_key=lab_key, protocol_key=protocol_key, \n", + " project_key=project_key))\n", + "print('\\nAnimal:\\n')\n", + "print(subject_to_nwb(session_key=session_key))\n", + "print('\\nSession:\\n')\n", + "print(session_to_nwb(session_key=session_key))\n", + "\n", + "nwbfile = ecephys_session_to_nwb(session_key=session_key,\n", + " raw=True,\n", + " spikes=True,\n", + " lfp=\"dj\",\n", + " end_frame=100,\n", + " lab_key=lab_key,\n", + " project_key=project_key,\n", + " protocol_key=protocol_key,\n", + " nwbfile_kwargs=None)" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "id": "dba53cb9", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "{'protocol': 'ProtA'}" + ] + }, + "execution_count": 8, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "protocol_key" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "147c1648", + "metadata": {}, + "outputs": [], + "source": [] + }, { "cell_type": "code", "execution_count": null, @@ -189,63 +511,20 @@ }, { "cell_type": "code", - "execution_count": 22, + "execution_count": null, "id": "7c2f913c", "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Help on function ecephys_session_to_nwb in module element_array_ephys.export.nwb.nwb:\n", - "\n", - "ecephys_session_to_nwb(session_key, raw=True, spikes=True, lfp='source', end_frame=None, lab_key=None, project_key=None, protocol_key=None, nwbfile_kwargs=None)\n", - " Main function for converting ephys data to NWB\n", - " \n", - " Parameters\n", - " ----------\n", - " session_key: dict\n", - " raw: bool\n", - " Whether to include the raw data from source. SpikeGLX and OpenEphys are supported\n", - " spikes: bool\n", - " Whether to include CuratedClustering\n", - " lfp:\n", - " \"dj\" - read LFP data from ephys.LFP\n", - " \"source\" - read LFP data from source (SpikeGLX supported)\n", - " False - do not convert LFP\n", - " end_frame: int, optional\n", - " Used to create small test conversions where large datasets are truncated.\n", - " lab_key, project_key, and protocol_key: dictionaries used to look up optional additional metadata\n", - " nwbfile_kwargs: dict, optional\n", - " - If element-session is not being used, this argument is required and must be a dictionary containing\n", - " 'session_description' (str), 'identifier' (str), and 'session_start_time' (datetime),\n", - " the minimal data for instantiating an NWBFile object.\n", - " \n", - " - If element-session is being used, this argument can optionally be used to add over overwrite NWBFile fields.\n", - "\n" - ] - } - ], + "outputs": [], "source": [ "help(ecephys_session_to_nwb)" ] }, { "cell_type": "code", - "execution_count": 4, + "execution_count": null, "id": "5edf9615", "metadata": {}, - "outputs": [ - { - "name": "stderr", - "output_type": "stream", - "text": [ - "/Users/cb/miniconda3/envs/ele/lib/python3.8/site-packages/pynwb/file.py:1037: UserWarning: Date is missing timezone information. Updating to local timezone.\n", - " warn(\"Date is missing timezone information. Updating to local timezone.\")\n", - "creating units table for paramset 0: 100%|██████████| 499/499 [00:41<00:00, 12.11it/s]\n" - ] - } - ], + "outputs": [], "source": [ "nwbfile = ecephys_session_to_nwb(session_key=session_key,\n", " raw=True,\n", @@ -260,60 +539,10 @@ }, { "cell_type": "code", - "execution_count": 5, + "execution_count": null, "id": "1131e149", "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "root pynwb.file.NWBFile at 0x140297891486016\n", - "Fields:\n", - " acquisition: {\n", - " ElectricalSeries1 ,\n", - " ElectricalSeries2 \n", - " }\n", - " devices: {\n", - " 262716621 ,\n", - " 714000838 \n", - " }\n", - " electrode_groups: {\n", - " probe262716621_shank0 ,\n", - " probe714000838_shank0 \n", - " }\n", - " electrodes: electrodes \n", - " experiment_description: Example project to populate element-lab\n", - " experimenter: ['User1']\n", - " file_create_date: [datetime.datetime(2022, 5, 31, 15, 47, 41, 270996, tzinfo=tzlocal())]\n", - " identifier: 172f2d3b-44c1-4ae1-8785-2d20d3df3db1\n", - " institution: Example Uni\n", - " keywords: ['Example' 'Study']\n", - " lab: The Example Lab\n", - " notes: Protocol for managing data ingestion\n", - " processing: {\n", - " ecephys \n", - " }\n", - " protocol: ProtA\n", - " related_publications: ['arXiv:1807.11104' 'arXiv:1807.11104v1']\n", - " session_description: Successful data collection\n", - " session_id: subject5_2018-07-03T20:32:28\n", - " session_start_time: 2018-07-04 01:32:28+00:00\n", - " subject: subject pynwb.file.Subject at 0x140297891485200\n", - "Fields:\n", - " date_of_birth: 2020-01-01 00:00:00-06:00\n", - " description: {\"subject\": \"subject5\", \"sex\": \"F\", \"subject_birth_date\": \"2020-01-01\", \"subject_description\": \"rich\", \"line\": null, \"strain\": null, \"source\": null}\n", - " sex: F\n", - " subject_id: subject5\n", - "\n", - " timestamps_reference_time: 2018-07-04 01:32:28+00:00\n", - " units: units " - ] - }, - "execution_count": 5, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "nwbfile" ] @@ -377,103 +606,10 @@ }, { "cell_type": "code", - "execution_count": 5, + "execution_count": null, "id": "84dbce9f-825e-49a4-b49f-58b406873430", "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "PATH SIZE DONE DONE% CHECKSUM STATUS MESSAGE \n", - "dandiset.yaml done updated \n", - "test1.nwb 109.8 MB 109.8 MB 100% ok done \n", - "Summary: 109.8 MB 109.8 MB 2 done 1 updated \n", - " 100.00% \n", - "Usage: dandi [OPTIONS] COMMAND [ARGS]...\n", - "\n", - " A client to support interactions with DANDI archive\n", - " (http://dandiarchive.org).\n", - "\n", - " To see help for a specific command, run\n", - "\n", - " dandi COMMAND --help\n", - "\n", - " e.g. dandi upload --help\n", - "\n", - "Options:\n", - " --version\n", - " -l, --log-level [DEBUG|INFO|WARNING|ERROR|CRITICAL]\n", - " Log level (case insensitive). May be\n", - " specified as an integer. [default: INFO]\n", - " --pdb Fall into pdb if errors out\n", - " --help Show this message and exit.\n", - "\n", - "Commands:\n", - " delete Delete dandisets and assets from the server.\n", - " digest Calculate file digests\n", - " download Download a file or entire folder from DANDI.\n", - " instances List known Dandi Archive instances that the CLI can...\n", - " ls List .nwb files and dandisets metadata.\n", - " organize (Re)organize files according to the metadata.\n", - " shell-completion Emit shell script for enabling command completion.\n", - " upload Upload Dandiset files to DANDI Archive.\n", - " validate Validate files for NWB and DANDI compliance.\n", - " validate-bids Validate BIDS paths.\n", - "Usage: dandi [OPTIONS] COMMAND [ARGS]...\n", - "\n", - " A client to support interactions with DANDI archive\n", - " (http://dandiarchive.org).\n", - "\n", - " To see help for a specific command, run\n", - "\n", - " dandi COMMAND --help\n", - "\n", - " e.g. dandi upload --help\n", - "\n", - "Options:\n", - " --version\n", - " -l, --log-level [DEBUG|INFO|WARNING|ERROR|CRITICAL]\n", - " Log level (case insensitive). May be\n", - " specified as an integer. [default: INFO]\n", - " --pdb Fall into pdb if errors out\n", - " --help Show this message and exit.\n", - "\n", - "Commands:\n", - " delete Delete dandisets and assets from the server.\n", - " digest Calculate file digests\n", - " download Download a file or entire folder from DANDI.\n", - " instances List known Dandi Archive instances that the CLI can...\n", - " ls List .nwb files and dandisets metadata.\n", - " organize (Re)organize files according to the metadata.\n", - " shell-completion Emit shell script for enabling command completion.\n", - " upload Upload Dandiset files to DANDI Archive.\n", - " validate Validate files for NWB and DANDI compliance.\n", - " validate-bids Validate BIDS paths.\n", - "work_dir: ./temp_nwb/\n", - "data_dir: ./temp_nwb/\n", - "dand_dir: ./temp_nwb/200178\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "pynwb validation errors for /Users/cb/Documents/dev/workflow-array-ephys/temp_nwb/200178/test1.nwb: []\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "PATH SIZE ERRORS UPLOAD STATUS MESSAGE \n", - "test1.nwb 109.8 MB 0 skipped file exists \n", - "dandiset.yaml 2.0 kB skipped should be edited online \n", - "Summary: 109.8 MB 2 skipped 1 file exists \n", - " 1 should be edited online\n" - ] - } - ], + "outputs": [], "source": [ "upload_to_dandi(\n", " data_directory=\"./temp_nwb/\",\n", @@ -512,7 +648,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.9.13" + "version": "3.9.17" }, "vscode": { "interpreter": {