Thursday, July 26, 2018
Some coding stuffs
Now after coding your analyses, you want to present them in a nicely fashion. One way is to use iPython notebook which is now popularly known as Jupyter (Julia-Python-R). While the installation is straightforward, the additional installation of libraries can be tricky. Yeah this is the downside of using Linux/Mac system, you gotta know what you are doing. For example, I remember I couldn't get ezANOVA to work in Jupyter. It is very handy to also learn how to customize this Jupyter notebook. The following link is useful to integrate multiple languages.
https://vatlab.github.io/sos-docs/
There are some drawbacks of using Linux operating system from a Windows/Mac user perspective (at least to me!) One of the most dangerous commands to use is "rm" which basically remove files/folders without putting them to the recycle bin. Others, such as "cp" and "mv" are equally dangerous if not used carefully.
Sunday, February 25, 2018
Glossary of Movement Disorder Terms
Symptoms of movement disorders can be confusing as some of them are similar. Each condition may be well characterized by its behavioral signatures that include: spatio-temporal and kinetic features, and frequency characteristics.
Ataxia: an unsteady and swaying walk, often with feet planted widely apart. Many symptoms of ataxia mimic those of being drunk, such as slurred speech, stumbling, falling, and incoordination (lack of synergy). These symptoms are caused by damage to the cerebellum.
Bradykinesia: slowness of movement. It is closely related to hypokinesia means decreased amplitude or range of movement. Bradykinesia is a prominent feature of parkinsonism (PD) due to the damage in basal ganglia. It is mild in the early disease stages but becomes more severe in the advanced stages of Parkinsonism.
Dysmetria: misjudging the distance to a target. A person with dysmetria will have problems reaching out and accurately touching a targeted object.
Chorea: involuntary, irregular, purposeless, non-rhythmic, abrupt, rapid, or unsustained movements that seem to flow from one body part to another. A characteristic feature of chorea is that the movements are unpredictable in timing, direction, and body parts affected. This is a typical symptom of Huntington's disease, another disease that impacts basal ganglia.
Akathisia: means unable to sit still. When sitting, a person may caress their scalp, cross and uncross their legs, rock or squirm in their chair, get out of the chair often and pace back and forth, and even make noises such as moaning. When standing, a person with akathisia may involuntarily march in place.
Tuesday, January 9, 2018
Additional Notes on fMRI
When deciding a suitable MRI sequence, you have to decide the choice between short or long repetition time (TR) and echo time (TE). Different combinations of these two values produce different types of MR images. See below. To recap, the T2* image has transverse magnetization which decays much faster than would be predicted by natural atomic and molecular mechanisms. In practice, T2* can be considered as an effective/observed T2 image, whereas the T2 image is considered the natural or true T2 (i.e. T2* is always less than or equal to T2). The T2* images result principally from inhomogeneities in the main magnetic field.Non-parametric Approach to MRI
To see why this makes sense, the task-based block design paradigm will be used, i.e. a subject performs a task in one block and rest in the other. If a specific location of the brain is used during tasks, we should expect a task-related activation during the task, but not during the rest period. Here, we reshuffle or scramble the data across TRs. If a particular voxel is involved in the task, we should not expect any strong correlation between the predicted BOLD response and the actual activation because the 'reshuffled data' is just random noise. Reshuffling does not change the mean and variance of the dataset, that is, we don't tamper with the data.
In analyzing task-based fMRI data, for example, you form a design matrix according to your behavioural task and conduct a GLM (using FEAT, let say) to obtain parametric estimates or PEs of the corresponding regressors. To correct for the familywise error, the multiple comparison problem across voxels, we then use GRF theory by defining cluster-forming threshold (Z = 2.30 in FEAT). According to Echlund et al, GRF performance in controlling Type-I Error is poor. In fact, it is recommended to use non-parametric tests such as permutation testing to control for Type-I Error.
Using randomise on my dataset
For my iMac machine purchased in 2011 with Intel i5 Quad-core, 3.1 GHz, it takes me 8-9 minutes to analyze a decent task-based, 100 x 100 x 63 x 250, preprocessed 4D NIFTI file using 1000x permutation. With FEAT-glm using the same GLM design matrix, it takes me 2-3 minutes.
There are two main types of cost function: intra-modal (least squares and normalised correlation) and inter-modal (correlation ratio and mutual information-based options).


The left panel shows the registration accuracy of the subject's T1 image to the standard MNI 1mm template of 3 different software packages. The right panel also shows what happened when the MNI 2mm template was used instead.
