Final assignment "Biological data analysis and simulation with Matlab" 2015 -
Final assignment "Biological data analysis and simulation with Matlab" 2015 -
Evaluation methods for analysing neuronal measurement data
Rules of the game
- The final task is completed in individual work solved!!!
- Aids (e.g. Matlab help, Wikipedia...) are allowed (as long as they are not other course participants, the big brother or a ready-made solution taken from the net).
- If you have any questions, Eva and Helge (email addresses see stud.IP) and I (jutta.kretzberg[at]uni-oldenburg.de, room W4-0-078, Tel 798 3314) are at your disposal. If you want to ask your questions in person: please make an appointment by email! Please email all three addresses and one of us will reply.
- If your programme does not work (or does not work for all possible cases), I would like to have a detailed documentation of what does not work.
- Solutions must reach me by 25 October 2015 via email or cloud storage. I will confirm receipt of the solution by email.
- I will get back to you by email when I have checked the tasks and, if necessary, I will arrange a time for us to have a brief discussion. (This can take several months until I have looked through and compared all the solutions. If you need your grade very urgently, please let me know).
Criteria for marking
- How complete is the task? (Extensions to the basic task lead to an improvement in the grade).
- Programming realisation
- Basic ideas of the solution approach
- Programme structure
- Handling of data
- Generality / error tolerance
- "Elegance" of the programming
- How user-friendly is the programme? (Can it be operated without programming knowledge, etc.)
- User interaction
- Help texts and comments
- Additional documentation
Task 2015: Evaluation methods for analysing neural measurement data
Download: pdf version and Word version of the task
Your task is to programme two evaluation methods for analysing neuronal measurement data and to provide them with an appealing user interface.
I would advise you to work on the preparatory tasks first. These should not be handed in, but can help you to solve the actual tasks. Then you should first write the basic version of the programmes for both methods and only tackle the extensions when these are running to your satisfaction.
Background:
Neurones (nerve cells) transmit information by changing their membrane voltage. They communicate with each other by triggering so-called action potentials (also known as spikes). These are rapid, stereotypical changes in membrane voltage that last for approximately one millisecond. As the action potentials of a neuron always look very similar, it is assumed that it is not the exact form of the voltage change that is decisive, but merely the question of whether such a voltage change has occurred or not.
Action potentials are used, among other things, to transmit information about visual impressions (images) from the eye to the brain. In the brain, the action potential sequences of many thousands of retinal ganglion cells must then be used to find out what the image that triggered these responses looked like. This creates our impression of vision (or that of the test animal).
An important question in neuroscience is how the brain solves this task: Which properties of the neuronal action potential sequences encode the stimulus? Most neuroscientists assume that the spike rate in particular, i.e. the number of action potentials that occur in a period of a certain length, plays an important role here. The approach is therefore to find a connection between a stimulus parameter (in our case it is the speed and direction of a moving dot pattern) and the neuronal response, measured as the number of spikes in a time window.
Data record:
In the matrix [CellResp.mat] matrix are real measurements of the responses of retinal ganglion cells. The simultaneously recorded responses of 20 retinal ganglion cells are stored in this data set. The recording lasted 180 seconds and is displayed in the matrix in steps of 1 ms in length. There are only two different values in the matrix: If CellResp(17, 3089) contains a 1, this means that the neuron with the number 17 triggered an action potential in time step 3089. If there is a 0, there was no action potential at this time. (You will see that there are many more zeros than ones)
These responses were triggered by a moving dot pattern. This pattern moved at a constant speed in a constant direction for 500 ms. It then randomly changed its speed and sometimes its direction to remain the same for another 500 ms. The movement took place at one of 9 possible speeds:
-2.5, - 1.875, -1.25, -0.625, 0, 0.625, 1.25, 1.875, 2.5 [mm/s]
The sign indicates in which of the two possible directions (left or right) the pattern moved. 0 means that the pattern was stationary. The sequence of the stimulus movement is shown in the vector [StimVec.mat] vector. Each number in this vector represents a 500ms long stimulation of all 20 cells in the data set.
Preparation (these tasks should not be handed in):
I would suggest that you familiarise yourself with the data set before starting the actual tasks. This is not so easy as the data set is quite large. Calculate for the exercise:
- How many action potentials did each of the neurones generate in total?
- How many action potentials did each of the neurones generate within the first 500 ms (i.e. during the first presentation of a constant speed)?
- How many action potentials did all neurones together generate during the first 500 ms?
- Were more action potentials generated in the first half or in the second 250 ms during this period?
- How many times was each of the 9 different speeds presented?
- Create a vector that contains the respective velocity in millisecond time steps and represent it graphically. (What length must it have?) Also look at the first 10 seconds as an enlargement.
- How many action potentials did the third neuron generate when the stimulus -2.5 was shown for the first time?
- How many action potentials did the third neuron generate for each of the presentations of the -2.5 speed?
Task1: Time course of responses: grid plot and population responses
The neurons respond to the stimulation with the moving dot pattern with a temporal sequence of action potentials.
A raster plot uses individual lines or dots to show graphically when a particular neuron has generated action potentials (x-axis: time, y-axis: action potential or not for each of the cells under consideration).
A population response is the response (number of action potentials in a certain time window) to a stimulus averaged over all known neurones. It is assumed that it is irrelevant which neuron generated which action potential. To calculate the population response, the 1 / 0 responses of the neurons are added up within a time window and then normalised to give the unit "action potentials / second". This time window is shifted over the time course of the responses so that the overall time course of the population response is obtained.
A1a) Write a programme that graphically displays the neuronal responses as a raster plot for a freely selectable period of time.
A1b) Write a programme that calculates the time course of the joint population response of all neurons for a freely selectable time section and a freely selectable summation time window and displays it graphically.
A1c) Combine the representation of the raster plot and the population response with the representation of the time course of the stimulus velocity so that you can see graphically which type of stimulation triggers many and which triggers few action potentials.
Task2: Tuning curves
A tuning curve indicates how the number of action potentials triggered by a neuron depends on a stimulus property. In our case, we want to find out for each of the 9 speeds how many action potentials a neuron typically generates in response during the 500 ms stimulation.
A2a) Write a function that graphically plots the mean and standard deviation of the responses (number of action potentials generated during the duration of a stimulus) for a single neuron against the values of the speed of the stimulus pattern. Remember that the responses to all presentations of the same stimulus must be summarised.
A2b) The tuning curves of the neurones can be roughly divided into three classes: Neurons with symmetrical tuning (approximately equal spiking rates for movement in both directions) and direction-sensitive neurons (which respond to movement in one of the directions with more spikes) which respond preferentially to movement to the right and movement to the left, respectively. Consider a criterion and a way of automatic classification to assign each of the 20 individual neurons to one of the three classes.
Task3: User interaction
A3a) Write a programme that controls the interaction with the user. The user should be able to choose which type of evaluation he wants to carry out and have influence on the parameters of the evaluation. (E.g. selection of the averaging time window for the population response, display of individual or all tuning curves etc...) Remember that a typical user has no programming knowledge.
Notes and expansion options
In general:
- a) Remember to keep your programmes as general as possible. They should be written in such a way that they can be used for the next data set with as little subsequent effort as possible. This may, for example, contain a different number of cells, a different sequence of stimulation or stimuli of a different length.
- b) Write your programmes in such a way that they are pleasant for the user to use. Think about what could be interesting for the user in terms of output and where they should influence the programme sequence by specifying values. Explain to the user what you expect from him and how he should interpret the programme output.
- c) Special additional task: If you have a lot of time and interest, you can programme a graphical user interface. The keyword for the help is GUI (graphical user interface), there is a tutorial there that shows you how to do it - but it is not easy and will certainly take some time. (This is also absolutely not necessary for a "very good").
Tuning curves:
- (d) Look at the distributions of the responses of individual neurones to repeated identical stimulation. Does it make more sense to use the median than the mean for the tuning curves of these neurones?
- e) The tuning does not necessarily have to refer to the entire response period to a stimulus. Generalise your programs so that shorter time windows (e.g. only the first 100 ms after a stimulus change) can be used. Does the tuning differ for different window lengths? Does it differ if you do not consider the beginning but the end of the responses (e.g. the last 100 ms in each case)?
Population response:
- f) Systematically vary the length of the time window used for averaging. Can you see a temporal response structure even within the 500 ms long blocks of the same stimulus? What is the shortest time window for which the method can still be used sensibly?
- g) Create three separate population responses for the population of cells with symmetrical tuning and for the left- and right-selective populations that you identified in task A2b).
- h) Determine the 'typical population responses' for the 9 different stimulus speeds by averaging the population responses to all presentations of the respective stimulus. Use relatively short summation time windows (e.g. 20 ms or 50 ms) to see a time course. It is particularly interesting to compare the population responses of the three populations with different tuning (left, right, symmetrical)
- i) Think of a way to classify the population response to a single stimulus using these mean time courses for each of the 9 speed values. So set yourself the same task as the brain and try to work out which stimulus it is based on the population response to a stimulus. Make a statistic about how often your programme can guess the correct stimulus.