Browse Source

gin commit from magenta

New files: 13
Modified files: 1
M. Sonntag 3 years ago
parent
commit
c5b4c9a9c7

File diff suppressed because it is too large
+ 1286 - 0
2020_RDM_course_nix.ipynb


+ 135 - 0
2020_RDM_course_nix_excercise.ipynb

@@ -0,0 +1,135 @@
+{
+ "cells": [
+  {
+   "cell_type": "markdown",
+   "metadata": {},
+   "source": [
+    "This notebook is set up to be used with Python 3(.6+). Also to properly run this notebook the following libraries need to be installed:\n",
+    "- `pip install matplotlib`\n",
+    "- `pip install numpy`\n",
+    "- `pip install pandas`\n",
+    "- `pip install nixio==1.5.0b4`\n"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": null,
+   "metadata": {},
+   "outputs": [],
+   "source": [
+    "# First lets check which files are available to us in the general and in the excercise folder\n",
+    "import os\n",
+    "\n",
+    "os.listdir()"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": null,
+   "metadata": {},
+   "outputs": [],
+   "source": [
+    "os.listdir(\"./excercise\")"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": null,
+   "metadata": {},
+   "outputs": [],
+   "source": [
+    "# Use the pandas library to read in columns from CSV files\n",
+    "import pandas as pd"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": null,
+   "metadata": {},
+   "outputs": [],
+   "source": [
+    "# The raw data files do not provide column headers so we'll write them first.\n",
+    "#   Check the \"README.md\" files for details.\n",
+    "col_names = [\"current_frame\", \"time_elapsed\", \"obj_substracted\", \"substracted_value\", \"obj_value\", \"obj_size\", \"background_value\", \"x_old\", \"y_old\"]"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": null,
+   "metadata": {},
+   "outputs": [],
+   "source": [
+    "# Read the content of the first file.\n",
+    "content = pd.read_csv(\"./excercise/20121202Pflp178GCaMP5kN2shift_210421W1bag.log\", header=None, names=col_names)"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": null,
+   "metadata": {},
+   "outputs": [],
+   "source": [
+    "# Briefly check the content\n",
+    "content"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": null,
+   "metadata": {},
+   "outputs": [],
+   "source": [
+    "# Plot raw data to get a general idea how it looks like\n",
+    "import matplotlib.pyplot as plot\n",
+    "\n",
+    "x = content[\"current_frame\"]\n",
+    "y = content[\"obj_substracted\"]\n",
+    "plot.plot(x,y)\n",
+    "plot.show()"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "metadata": {},
+   "source": [
+    "Now we are set\n",
+    "- create a NIX file and a Block in it.\n",
+    "- create a DataArray for each raw data file and transfer the data of one of the columns.\n",
+    "- properly add Dimensions, labels and units.\n",
+    "- plot the data from the data stored in the NIX file.\n",
+    "- add meaningful metadata to the general NIX file and the individual DataArrays from information found in the README.md.\n",
+    "- connect all three DataArrays via a MultiTag. You can use the shift paradim as a reference or come up with your own points of interest.\n",
+    "- Plot the data using the MultiTag.\n",
+    "- If you work with Binder, make sure you regularly download the notebook to your local machine."
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": null,
+   "metadata": {},
+   "outputs": [],
+   "source": []
+  }
+ ],
+ "metadata": {
+  "kernelspec": {
+   "display_name": "Python 3",
+   "language": "python",
+   "name": "python3"
+  },
+  "language_info": {
+   "codemirror_mode": {
+    "name": "ipython",
+    "version": 3
+   },
+   "file_extension": ".py",
+   "mimetype": "text/x-python",
+   "name": "python",
+   "nbconvert_exporter": "python",
+   "pygments_lexer": "ipython3",
+   "version": "3.8.1"
+  }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 4
+}

+ 2 - 0
README.md

@@ -1,2 +1,4 @@
 # demo-lecture-07
 
+This repository serves as a Binder capable repository containing Jupyter notebooks to introduce and excercise the usage of the NIX (Neuroscience exchange) data format.
+

File diff suppressed because it is too large
+ 6199 - 0
excercise/20121202Pflp178GCaMP5kN2shift_210421W1bag.log


File diff suppressed because it is too large
+ 6199 - 0
excercise/20121202Pflp178GCaMP5kN2shift_210421W2bag.log


File diff suppressed because it is too large
+ 6099 - 0
excercise/20121205Pflp178GCaMP5kN2shift_210421W4bag.log


+ 74 - 0
excercise/README.md

@@ -0,0 +1,74 @@
+# Recording description
+
+InVivo single cell recording in strain N2 Caenorhabditis elegans.
+Activity shown in oxygen sensitive neuron(s) using Calcium Indicator GCaMP5k.
+
+## Oxygen shift paradigm
+
+Experiments used an oxygen concentration shift paradigm:
+- 110 seconds 21% O2 concentration; hard oxygen switch
+- 360 seconds 04% O2 concentration; hard oxygen switch
+- 140 seconds 21% O2 concentration
+
+## Recording files
+
+Calcium imaging traces can be found in files with the extension "*.log".
+
+The nine columns contained in these log files are to be interpreted in this order:
+"current_frame", "time_elapsed", "obj_substracted", "substracted_value", "obj_value", "obj_size", "background_value", "x_old", "y_old"
+
+e.g.
+[1],  [2],    [3],     [4],     [5],  [6], [7],     [8], [9] 
+6046, 605491, 10768.6, 12809.4, 23578, 80, 160.118, 264, 65
+
+The columns are interpreted as:
+
+[1] current_frame       ... recorded frame
+[2] time_elapsed        ... time in milliseconds [ms]
+[3] obj_substracted     ... object_value - background_value; Fluorescence [AU]
+[4] substracted_value   ... background_value; Fluorescence [AU]
+[5] obj_value           ... average value of region of interest; Fluorescence [AU]
+[6] obj_size            ... whole area of region of interest in pixel [px]
+[7] background_value    ... average of designated background region; Fluorescence [AU]
+[8] x_old               ... previous x position of region of interest [px]
+[9] y_old               ... previous y position of region of interest [px]
+
+## Recording files metadata
+file name, strain, protocol [%], feeding condition [hour], worm resting time [min], tracked neuron, intensity, Comments, tracking comment, frames, genetic modification, shifting times [s], worm, paralytic agent, EM gain settig, LED I, Gray Filter, exposure
+
+20121202Pflp178GCaMP5kN2shift_210421W1, N2, cs01_shift 21-04-21, 1h50, 7', BAG,	4000/400,'' ,'' 6100, Pflp-8; Pflp-17::GCaMP5.k, 110-360-150, 1, Tetramisol 5mM, 1500, 20, 0.2, 100 ms
+
+20121202Pflp178GCaMP5kN2shift_210421W2, N2, cs01_shift 21-04-21, 2h17, 5'30'', BAG (+URX), 4400/500, process visible, '', 6100, Pflp-8; Pflp-17::GCaMP5.k, 110-360-150, 1, Tetramisol 5mM, 1500, 20, 0.2, 100 ms
+
+20121205Pflp178GCaMP5kN2shift_210421W4, N2, cs01_shift, 21-04-21, 2h20, 5', BAG, 6200/500, process visible, '', 6100, Pflp-8; Pflp-17::GCaMP5.k, 110-360-150, 1, Tetramisol 5mM, 1500, 20, 0.2, 100 ms
+
+## Recording equipment and settings
+
+Zeiss epifluorescence microscope equipped with a CoolLED pE-100 excitation system.
+Images were acquired with an Andor iXon 397 EMCCD camera and MetaMorph software (Universal Imaging)
+Objective: Pln Apo 40x/1.3 oil DIC II
+
+Zeiss recording settings:
+pE LED intensity 2                      ... 20
+Zeiss 6x reflector changer              ... none
+Zeiss 3x Optovar turret                 ... 1x Tubelens
+Zeiss 3x Beam Path Switching Baseport   ... 100% Baseport
+Zeiss 3x Sideport Baseport              ... 100% L
+Zeiss RL 6x FL Attenuator               ... 20%
+
+Digitizer                               ... 14 bit (10MHz)
+Exposure Time                           ... 100ms
+EM Gain                                 ... 1500
+
+# Background
+The Caenorabdhitis elegans neurons labeled BAG and URX have been reported to be tonic signaling neurons. The constant high concentration of increased intracellular Ca 2+ is thought to be mediated by L-type voltage gated Ca 2+ channels (L-VGCC), IP3 and ryanodine receptor Ca 2+ channels. (Busch et al, 2011)
+The activity of the oxygen de- and increase sensory neurons BAG and URX is tested in
+an N2 strain (ZIM226) background. The strain contains an extra-chromosomal array expressing GCaMP5k under the flp-8 and the flp-17 promoter. Flp-8 is expressed in URX, flp-17 in BAG. GCaMP5k is a genetically encoded calcium indicator (Akerboom et al, 2012) which links calmodulin to an inactive form of GFP. Upon binding of Ca 2+ to calmodulin the conformation of GFP changes and becomes fluorescent. Depolarization of a neuron leads to an intracellular release of Ca 2+. GCaMP therefore is a useful second messenger in visualizing neuronal activity.
+
+## Neuronal activity in an oxygen shift paradigm
+To study the response of the sensory neurons to a harsh stimulus, animals were exposed to subsequent oxygen shifts from 21-4% and back to 21%, oxygen concentrations are always balanced with nitrogen. The oxygen "down shift" (DS) took place 110 seconds, the "up shift" (US) 470 seconds after the start of the experiment.
+
+# Data provenance
+All recordings were done at and by:
+The Research Institute of Molecular Pathology (IMP), Vienna, Austria
+Research Group Manuel Zimmer

+ 4 - 0
requirements.txt

@@ -0,0 +1,4 @@
+matplotlib
+numpy
+pandas
+nixio==1.5.0b4

BIN
resources/G-Node-logo.png


BIN
resources/nix_datamodel_v1.5.0.png


BIN
resources/nix_mtag_concept.png


BIN
resources/nix_odML_model_simplified.png


BIN
resources/nix_regular_sampled.png


+ 1 - 0
runtime.txt

@@ -0,0 +1 @@
+python-3.8