Main

June 30, 2005

PC and Mac sharing?

In case you ever need this feature, it is possible! And it is fairly easy to set up. This tutorial will tell you how to connect to shared volumes on your Mac from a PC on the same network.

June 20, 2005

Test

New Blog.
Testing...

June 10, 2005

FUNDING... SOME USEFUL URLS

"Of course our work is about human betterment and mercy... but there can be no mercy without money. And recognizing that is why, perhaps, we run the only profitable Level IV trauma facility in the Western World." ----Sister John Mary Francis O.F.M.

No comment on my part. Below however, are list of links to funding resources that i have categorized for our usage in the never ending quest for ducets.

Continue reading "FUNDING... SOME USEFUL URLS" »

May 19, 2005

Sample tcl Scripts

This script is a template for a FEAT design.fsf file. When you run the script it replaces the subject's name everywhere in the design file and creates a new one. Download DesignTemplate.tcl

This script takes a FEAT design.fsf file and creates a template file from it (as illustrated above)Download makeTemplatefromDesign .sh

This script takes the output of featquery from several subjects and puts them together in one Excel file, along with the average and standard deviation. This greatly speeds up the path from analysis to a nice pretty graph. Download makeExcelFile .tcl

April 20, 2005

INTERPRETING THE RESULTS OF MELODIC

1. Melodic identifies groups of voxels that are temporally correlated.
2. These are called Components
3. The Output of Melodic displays these various components
Note: The following Picture shows a particular component identified by Melodic

IC_5_thresh.png

The following Graph charts the timecourse of the component identified by Melodic
t5.png

The following Graph charts the "Fourier Transform" of the timecourse that was previously identified by Melodic


f5.png


The task of the researcher is to examine the spatial distribution and/or timecourse of each component to determine whether it is meaningful to the data analysis.

FOR EXAMPLE: Based on the spatial distribution of the component around the edges of the brain, the following Melodic Report, suggests that this component is possibly motion artifact..

IC_9_thresh.png

t9.png

The numbers on the Y axis represent the change of voxel intensity compared to baseline....the X axis represents the time line increments.

f9.png

Generally speaking, if the activation occurs around the edge of the brain or around the ventricles, it is reasonable to presume that it could be motion artefact because any small motion at a border can result in large fluctuations in intensity.

April 10, 2005

Fitting an hrf to your data

Read about it here.

March 29, 2005

Setting up your own cluster

More info coming soon

Setting up Sun Grid Engine
-Download Sun Grid Engine from http://gridengine.sunsource.net/ , and set it up.
-Have all nodes cross-mount a central file server (preferably a RAID), using NFS mount.
Call this volume local. All the computers should therefore has a directory called /Volumes/local to which they can read and write.

Installing clustered FSL
-Install FSL in /Volumes/local/fsl
-Change environment variables (i.e. setenv FSLDIR /Volumes/local/fsl)
-Download clustered fsl plugin (coming soon to this website)
-Copy the file to your $FSLDIR
-type "cd $FSLDIR" and then "tar -xvf fslsgefiles.tar"

March 17, 2005

Using FSL - Registration

Before any multi-session or multi-subject analyses can be carried out, the different sessions need to be registered to each other. This is made easy with FEAT, by saving the appropriate transformations inside the FEAT directories; the transformations are then applied when group statistics is carried out, to tranform any relevant statistic images into the common space. By doing this (saving the relevant registration transformations and only applying them to the stats images later) a lot of disk space is saved.

Registration inside FEAT uses FLIRT (FMRIB's Linear Image Registration Tool). This is a very robust affine registration program which can register similar type images (intra-modal) or different types (inter-modal).

Typically, registration in FEAT is a two-stage process. First an example FMRI low resolution image is registered to an example high resolution image (often the same subject's T1-weighted structural). The transformation for this is saved into the FEAT directory. Then the high res image is registered to a standard image (normally a T1-weighted image in standard space, such as the MNI 152 average image). This transformation, also, is saved. Finally, the two transformations are combined into a third, which will take the low resolution FMRI images (and the statistic images derived from the first-level analyses) straight into standard space, when applied later, during group analysis.

You can carry out registration for each first-level analysis at the same time as the original analysis, or get FEAT to "register" a pre-existing FEAT directory, at a later time. In the latter case, change the Full analysis to Registration only.

The Initial structural image is the high resolution structural image which the low resolution functional data will be registered to, and this in turn will be registered to the main highres image. It only makes sense to have this initial highres image if a main highres image is also specified and used in the registration.

One example of an initial highres structural image might be a medium-quality structural scan taken during a day's scanning, if a higher-quality image has been previously taken for the subject. A second example might be a full-brain image with the same MR sequence as the functional data, useful if the actual functional data is only partial-brain. It is strongly recommended that this image have non-brain structures already removed, for example by using BET.

If the field-of-view of the functional data (in any direction) is less than 120mm, then the registration of the functional data will by default have a reduced degree-of-freedom, for registration stability.

If you are attempting to register partial field-of-view functional data to a whole-brain image then 3 DOF is recommended - in this case only translations are allowed.

If the orientation of any image is different from any other image it may be necessary to change the search to Full search.

The Main structural image is is the main high resolution structural image which the low resolution functional data will be registered to (optionally via the initial structural image), and this in turn will be registered to the standard brain. It is strongly recommended that this image have non-brain structures already removed, for example by using BET.

Standard space refers to the standard (reference) image; it should be an image already in Talairach space, ideally with the non-brain structures already removed.

Using FSL - Contrasts, Thresholding, Rendering

If you are not carrying out a Full analysis and are re-running Post-stats, a button appears to allow you to Edit contrasts. This allows setup of contrasts and F-tests, to be run on the previous analysis.

If you choose a mask for Pre-threshold masking then all stats images will be masked by the chosen mask before thresholding. There are two reasons why you might want to do this. The first is that you might want to constrain your search for activation to a particular area. The second is that in doing so, you are reducing the number of voxels tested and therefore will make any multiple-comparison-correction in the thresholding less stringent. The mask image chosen does not have to be a binary mask - for example, it can be a thresholded stats image from a previous analysis (in the same space as the data to be analysed here); only voxels containing zero in the mask image will get zeroed in this masking process. If pre-threshold masking is used, it is still necessary to carry out thresholding.

Thresholding: After carrying out the initial statistical test, the resulting Z statistic image is then normally thresholded to show which voxels or clusters of voxels are activated at a particular significance level.

If Cluster thresholding is selected, a Z statistic threshold is used to define contiguous clusters. Then each cluster's estimated significance level (from GRF-theory) is compared with the cluster probability threshold. Significant clusters are then used to mask the original Z statistic image for later production of colour blobs. This method of thresholding is an alternative to Voxel-based correction, and is normally more sensitive to activation. You may well want to increase the cluster creation Z threshold if you have high levels of activation.

The FEAT web page report includes a table of cluster details, viewed by clicking on the relevant colour-overlay image. Note that cluster p-values are not given for contrasts where post-threshold contrast masking (see below) is applied, as there is not a sensible p-value associated with the new clusters formed after masking.

If Voxel thresholding is selected, GRF-theory-based maximum height thresholding is carried out, with thresholding at the level set, using one-tailed testing. This test is less overly-conservative than Bonferroni correction.

You can also choose to simply threshold the uncorrected Z statistic values, or apply no thresholding at all.

Contrast masking: You can setup the masking of contrasts by other contrasts; after thresholding of all contrasts has taken place you can further threshold a given Z statistic image by masking it with non-zeroed voxels from other contrasts.

This means that of the voxels which passed thresholding in the contrast (or F-test) of interest, only those which also survived thresholding in the other contrasts (or F-tests) are kept.

As a further option, the generated masks can be derived from all positive Z statistic voxels in the mask contrasts rather than all voxels that survived thresholding.

Rendering: The Z statistic range selected for rendering is automatically calculated by default, to run from red (minimum Z statistic after thresholding) to yellow (maximum Z statistic). If more than one colour rendered image is to be produced (i.e., when multiple constrasts are created) then the overall range of Z values is automatically found from all of the Z statistic images, for consistent Z statistic colour-coding.

If multiple analyses are to be carried out separately, Use preset Z min/max should be chosen, and the min/max values set by hand. Again, this ensures consistency of Z statistic colour-coding - if several experiments are to be reported side-by-side, colours will refer to the same Z statistic values in each picture. When using this option, you should choose a conservatively wide range for the min and max (e.g., min=1, max=15), to make sure that you do not carry out unintentional thresholding via colour rendering.

With Solid colours you don't see any sign of the background images within the colour blobs; with Transparent colours you will see through the colour blobs to the background intensity.

If you are running a Higher-level analysis you can select what image will be used as the background image for the activation colour overlays. The default of Mean highres is probably the best for relating activation to underlying structure. For a sharper underlying image, (but one which is not so representative of the group of subjects), you can instead choose to use the highres image from the first selected subject. You can alternatively choose to use the original lowres functional data for the overlays, or the standard-space template image.

Using FSL - STATS (First Level)

FILM General Linear Model


General linear modelling allows you to describe one or more stimulation types, and, for each voxel, a linear combination of the modelled response to these stimulation types is found which minimises the unmodelled noise in the fitting. If you are not familiar with the concepts of the GLM and contrasts of parameter estimates, then you should now read Appendix A.

For normal first-level time series analysis you should Use FILM prewhitening to make the statistics valid and maximally efficient. For other data - for example, very long TR (>30s) FMRI data, PET data or data with very few time points (<50) - this should be turned off.

You can setup FILM easily for simple designs by using the FILM "wizard" - press the Simple model setup button. Then choose whether to setup ABAB... or ABACABAC... designs (block or single-event). The A blocks will normally be rest (or control) conditions. Enter the timings (in seconds) for these periods and press Process; FILM will be automatically setup for you.

If you want to setup a more complex model, or adjust the setup created by the wizard, press Full model setup button. This is now described in detail.

EVs


First set the Number of original EVs (explanatory variables) - basic number of explanatory variables in the design matrix; this means the number of different effects that you wish to model - one for each modelled stimulation type, and one for each modelled confound. For first-level analyses, it is common for the final design matrix to have a greater number of real EVs than this original number; for example, when using basis functions, each original EV gives rise to several real EVs.

Now you need to setup each EV separately. Choose the basic shape of the waveform that describes the stimulus or confound that you wish to model. The basic waveform should be exactly in time with the applied stimulation, i.e., not lagged at all. This is because the measured (time-series) response will be delayed with respect to the stimulation, and this delay is modelled in the design matrix by convolution of the basic waveform with a suitable haemodynamic response function (see below).

For an on/off (or a regularly-spaced single-event) experiment choose a square wave. To model single-event experiments with this method, the On periods will probably be small - e.g., 1s or even less.

For sinusoidal modelling choose the Sinusoid option and select the number of Harmonics (or overtones) that you want to add to the fundamental frequency.

For a single-event experiment with irregular timing for the stimulations, a custom file can be used. With Custom (1 entry per volume), you specify a single value for each timepoint. The custom file should be a raw text file, and should be a list of numbers, separated by spaces or newlines, with one number for each volume (after subtracting the number of deleted images). These numbers can either all be 0s and 1s, or can take a range of values. The former case would be appropriate if the same stimulus was applied at varying time points; the latter would be appropriate, for example, if recorded subject responses are to be inserted as an effect to be modelled. Note that it may or may not be appropriate to convolve this particular waveform with an HRF - in the case of single-event, it is.

For even finer control over the input waveform, choose Custom (3 column format). In this case the custom file consists of triplets of numbers; you can have any number of triplets. Each triplet describes a short period of time and the value of the model during that time. The first number in each triplet is the onset (in seconds) of the period, the second number is the duration (in seconds) of the period, and the third number is the value of the input during that period. The same comments as above apply, about whether these numbers are 0s and 1s, or vary continuously. The start of the first non-deleted volume correpsonds to t=0.

Note that whilst ALL columns are demeaned before model fitting, neither custom format will get rescaled - it is up to you to make sure that relative scaling between different EVs is sensible. If you double the scaling of values in an EV you will halve the resulting parameter estimate, which will change contrasts of this EV against others.

If you select Interaction then you can set which EVs this EV models the interaction between. This EV is produced by multiplying together selected EVs, and allows the modelling of the non-additive interaction between the selected EVs. This requires that the EVs are sometimes on at the same time, and sometimes on separately.

If you have chosen a Square or Sinusoid basic shape, you then need to specify what the timings of this shape are. Skip is the initial period of zeros (in seconds) before the waveform commences. Off is the duration (seconds) of the "Off" periods in the square wave. On is the duration (seconds) of the "On" periods in the square wave. Period is the period (seconds) of the Sinusoid waveform. Phase is the phase shift (seconds) of the waveform; by default, after the Skip period, the square wave starts with a full Off period and the Sinusoid starts by falling from zero. However, the wave can be brought forward in time according to the phase shift. Thus to start with half of a normal Off period, enter the Phase as half of the Off period. To start with a full On period, enter the same as the Off period. Stop after is the total duration (seconds) of the waveform, starting after the Skip period. "-1" means do not stop. After stopping a waveform, all remaining values in the model are set to zero.

Convolution sets the form of the HRF (haemodynamic response function) convolution that will be applied to the basic waveform. This blurs and delays the original waveform, in an attempt to match the difference between the input function (original waveform, i.e., stimulus waveform) and the output function (measured FMRI haemodynamic response). If the original waveform is already in an appropriate form, e.g., was sampled from the data itself, None should be selected. The next three options are all somewhat similar blurring and delaying functions. Gaussian is simply a Gaussian kernel, whose width and lag can be altered. Gamma is a Gamma variate (in fact a normalisation of the probability density function of the Gamma function); again, width and lag can be altered. Double-Gamma HRF is a preset function which is a mixture of two Gamma functions - a standard positive function at normal lag, and a small, delayed, inverted Gamma, which attempts to model the late undershoot.

The remaining convolution options setup different basis functions. This means that the original EV waveform will get convolved by a "basis set" of related but different convolution kernels. By default, an original EV will generate a set of real EVs, one for each basis function.

The Optimal/custom option allows you to use a customised set of basis functions, setup in a plain text file with one column for each basis function, sampled at the temporal resolution of 0.05s. The main point of this option is to allow the use of "FLOBS" (FMRIB's Linear Optimal Basis Set), which is a method for generating a set of basis functions that has optimal efficiency in covering the range of likely HRF shapes actually found in your data. You can either use the default FLOBS set, or use the Make_flobs GUI on the FEAT Utils menu to create your own customised set of FLOBS.

The other basis function options, which will not in general be as good at fitting the data as FLOBS, are a set of Gamma variates of different widths and lags, a set of Sine waves of differing frequencies or a set of FIR (finite-impulse-response) filters (with FIR the convolution kernel is represented as a set of discrete fixed-width "impulses").

You should normally apply the same temporal filtering to the model as you have applied to the data, as the model is designed to look like the data before temporal filtering was applied. In this way, long-time-scale components in the model will be dealt with correctly. This is set with the Apply temporal filtering option.

Adding a fraction of the temporal derivative of the blurred original waveform is equivalent to shifting the waveform slightly in time, in order to achieve a slightly better fit to the data. Thus adding in the temporal derivative of a waveform into the design matrix allows a better fit for the whole model, reducing unexplained noise, and increasing resulting statistical significances. Thus, setting Add temporal derivative produces a new waveform in the final design matrix (next to the waveform from which it was derived) This option is not available if you are using basis functions.

Orthogonalising an EV with respect to other EVs means that it is completely independent of the other EVs, i.e. contains no component related to them. Most sensible designs are already in this form - all EVs are at least close to being orthogonal to all others. However, this may not be the case; you can use this facility to force an EV to be orthogonal to some or all other EVs. This is achieved by subtracting from the EV that part which is related to the other EVs selected here. An example use would be if you had another EV which was a constant height spike train, and the current EV is derived from this other one, but with a linear increase in spike height imposed, to model an increase in response during the experiment for any reason. You would not want the current EV to contain any component of the constant height EV, so you would orthogonalise the current EV wrt the other.

Contrasts


Each EV (explanatory variable, i.e., waveform) in the design matrix results in a PE (parameter estimate) image. This estimate tells you how strongly that waveform fits the data at each voxel - the higher it is, the better the fit. For an unblurred square wave input (which will be scaled in the model from -0.5 to 0.5), the PE image is equivalent to the "mean difference image". To convert from a PE to a t statistic image, the PE is divided by its standard error, which is derived from the residual noise after the complete model has been fit. The t image is then transformed into a Z statistic via standard statistical transformation. As well as Z images arising from single EVs, it is possible to combine different EVs (waveforms) - for example, to see where one has a bigger effect than another. To do this, one PE is subtracted from another, a combined standard error is calculated, and a new Z image is created.

All of the above is controlled by you, by setting up contrasts. Each output Z statistic image is generated by setting up a contrast vector; thus set the number of outputs that you want, using Number of contrasts. To convert a single EV into a Z statistic image, set its contrast value to 1 and all others to 0. Thus the simplest design, with one EV only, has just one contrast vector, and only one entry in this contrast vector; 1. To add more contrast vectors, increase the Number of contrasts. To compare two EVs, for example, to subtract one stimulus type (EV1) from another type (EV2), set EV1's contrast value to -1 and EV2's to 1. A Z statistic image will be generated according to this request.

For first-level analyses, it is common for the final design matrix to have a greater number of real EVs than the original number; for example, when using basis functions, each original EV gives rise to several real EVs. Therefore it is possible in many cases for you to setup contrasts and F-tests with respect to the original EVs, and FEAT will work out for you what these will be for the final design matrix. For example, a single [1] contrast on an original EV for which basis function HRF convolutions have been chosen will result in a single [1] contrast for each resulting real EV, and then an F-test across these. In general you can switch between setting up contrasts and F-tests with respect to Original EVs and Real EVs; though of course if you fine-tune the contrasts for real EVs and then revert to original EV setup some settings may be lost. When you View the design matrix or press Done at the end of setting up the model, an Original EVs setup will get converted to the appropriate Real EVs settings.

An important point to note is that you should not test for differences between different conditions (or at higher-level, between sessions) by looking for differences between their separate individual analyses. One could be just above threshold and the other just below, and their difference might not be significant. The correct way to tell whether two conditions or session's analyses are significantly different is to run a differential contrast like [1 -1] between them (or, at higher-level, run a higher-level FEAT analysis to contrast lower-level analyses); this contrast will then get properly thresholded to test for significance.

There is another important point to note when interpreting differential (eg [1 -1]) contrasts. This is that you are quite likely to only want to check for A>B if both are positive. Don't forget that if both A and B are negative then this contrast could still come out significantly positive! In this case, the thing to do is to use the Contrast masking feature (see below); setup contrasts for the individual EVs and then mask the differential contrast with these.

F-tests


F-tests enable you to investigate several contrasts at the same time, for example to see whether any of them (or any combination of them) is significantly non-zero. Also, the F-test allows you to compare the contribution of each contrast to the model and decide on significant and non-significant ones. F-tests are non-directional (i.e. test for "positive" and "negative" activation).

One example of F-test usage is if a particular stimulation is to be represented by several EVs, each with the same input function (e.g. square wave or custom timing) but all with different HRF convolutions - i.e. several basis functions. Putting all relevant resulting parameter estimates together into an F-test allows the complete fit to be tested against zero without having to specify the relative weights of the basis functions (as one would need to do with a single contrast). So - if you had three basis functions (EVs 1,2 and 3) the wrong way of combining them is a single (T-test) contrast of [1 1 1]. The right way is to make three contrasts [1 0 0] [0 1 0] and [0 0 1] and enter all three contrasts into an F-test. As described above, FEAT will automatically do this for you if you set up contrasts for original EVs instead of real EVs.

You can carry out as many F-tests as you like. Each test includes the particular contrasts that you specify by clicking on the appropriate buttons.

Buttons


To view the current state of the design matrix, press View design. This is a graphical representation of the design matrix and parameter contrasts. The bar on the left is a representation of time, which starts at the top and points downwards. The white marks show the position of every 10th volume in time. The red bar shows the period of the longest temporal cycle which was passed by the highpass filtering. The main top part shows the design matrix; time is represented on the vertical axis and each column is a different (real) explanatory variable (e.g., stimulus type). Both the red lines and the black-white images represent the same thing - the variation of the waveform in time. Below this is shown the requested contrasts; each row is a different contrast vector and each column refers to the weighting of the relevant explanatory variable. Thus each row will result in a Z statistic image. If F-tests have been specified, these appear to the right of the contrasts; each column is a different F-test, with the inclusion of particular contrasts depicted by filled squares instead of empty ones.

If you have more than one EV and you press Covariance you will see a graphical representation of the covariance matrix of the design matrix. The first matrix shows the absolute value of the normalised correlation of each EV with each EV. If a design is well-conditioned (i.e. not approaching rank deficiency) then the diagonal elements should be white and all others darker. So - if there are any very bright elements off the diagonal, you can immediately tell which EVs are too similar to each other - for example, if element [1,3] (and [3,1]) is bright then columns 1 and 3 in the design matrix are possibly too similar. Note that this includes all real EVs, including any added temporal derivatives, basis functions, etc. The second matrix shows a similar thing after the design matrix has been run through SVD (singular value decomposition). All non-diagonal elements will be zero and the diagonal elements are given by the eigenvalues of the SVD, so that a poorly-conditioned design is obvious if any of the diagonal elements are black.

When you have finished setting up the design matrix, press Done. This will dismiss the GLM GUI, and will give you a final view of the design matrix.

Use FSL - Analysis Tools - PRE-STATS

Slice timing correction corrects each voxel's time-series for the fact that later processing assumes that all slices were acquired exactly half-way through the relevant volume's acquisition time (TR), whereas in fact each slice is taken at slightly different times. Slice timing correction works by using (Hanning-windowed) sinc interpolation to shift each time-series by an appropriate fraction of a TR relative to the middle of the TR period. It is necessary to know in what order the slices were acquired and set the appropriate option here. If slices were acquired from the bottom of the brain to the top select Regular up. If slices were acquired from the top of the brain to the bottom select Regular down. If the slices were acquired with interleaved order (0, 2, 4 ... 1, 3, 5 ...) then choose the Interleaved option. If slices were not acquired in regular order you will need to use a slice order file or a slice timings file. If a slice order file is to be used, create a text file with a single number on each line, where the first line states which slice was acquired first, the second line states which slice was acquired second, etc. The first slice is numbered 1 not 0. If a slice timings file is to be used, put one value (ie for each slice) on each line of a text file. The units are in TRs, with 0.5 corresponding to no shift. Therefore a sensible range of values will be between 0 and 1.

You will normally want to apply Motion correction; this attempts to remove the effect of subject head motion during the experiment. MCFLIRT uses FLIRT (FMRIB's Linear Registration Tool) tuned to the problem of FMRI motion correction, applying rigid-body transformations. Note that there is no "spin history" (aka "correction for movement") option with MCFLIRT. This is because this is still a poorly understood correction method which is under further investigation.

By default BET brain extraction is applied to create a brain mask from the first volume in the FMRI data. This is normally better than simple intensity-based thresholding for getting rid of unwanted voxels in FMRI data. Note that here, BET is setup to run in a quite liberal way so that there is very little danger of removing valid brain voxels. If the field-of-view of the image (in any direction) is less than 30mm then BET is turned off by default.

Spatial smoothing is carried out on each volume of the FMRI data set separately. This is intended to reduce noise without reducing valid activation; this is successful as long as the underlying activation area is larger than the extent of the smoothing. Thus if you are looking for very small activation areas then you should maybe reduce smoothing from the default of 5mm, and if you are looking for larger areas, you can increase it, maybe to 10 or even 15mm. To turn off spatial smoothing simply set FWHM to 0.

Intensity normalisation forces every FMRI volume to have the same mean intensity. For each volume it calculates the mean intensity and then scales the intensity across the whole volume so that the global mean becomes a preset constant. This step is normally discouraged - hence is turned off by default. When this step is not carried out, the whole 4D data set is still normalised by a single scaling factor ("grand mean scaling") - each volume is scaled by the same amount. This is so that higher-level analyses are valid.

Highpass temporal filtering uses a local fit of a straight line (Gaussian-weighted within the line to give a smooth response) to remove low frequency artefacts. This is preferable to sharp rolloff FIR-based filtering as it does not introduce autocorrelations into the data. Lowpass temporal filtering reduces high frequency noise by Gaussian smoothing (sigma=2.8s), but also reduces the strength of the signal of interest, particularly for single-event experiments. It is not generally considered to be helpful, so is turned off by default. By default, the temporal filtering that is applied to the data will also be applied to the model.

The MELODIC option runs the ICA (Independent Component Analysis) tool in FSL. We recommend that you run this, in order to gain insight into unexpected artefacts or activation in your data. "

February 17, 2005

Setting up Environment for FSL3.2

To use the new version of FSL on the cluster you need to change your environment variables. Follow the appropriate directions (whether you use bash or tcsh).

TCSH:
To use the new version of FSL open .tcshrc (in your home directory) with a text editor and find the line that says

setenv FSLDIR /Volumes/local/fsl

Change it to

setenv FSLDIR /Volumes/local/fsl3.2

Also add another line below it that says

source $FSLDIR/etc/fslconf/fsl.csh

Save it and close it. Then type

source ~/.tcshrc

on the command line.

BASH
Open .bash_profile in your home directory, with a text editor.
Find the line that says
export FSLDIR=/Volumes/local/fsl
and change it to
export FSLDIR=/Volumes/local/fsl3.2

Add a line below this that says
source $FSLDIR/etc/fslconf/fsl.sh

Save and close. Then type in the command line
source ~/.bash_profile

September 01, 2004

Setting up your .tcshrc file

The .tcshrc file is a resource file in your home directory that sets up certain environment variables. To set it up just copy and paste the following commands once you are logged in to miles:


echo "setenv FSLDIR /Volumes/local/fsl" > ~/.tcshrc
echo " set path = ( ~/bin /Volumes/local/bin /usr/bin /bin /usr/local/sbin /usr/sbin /sbin /usr/X11R6/bin $FSLDIR/bin . )" >> ~/.tcshrc

August 24, 2004

Using Sun Grid Engine

Step 1: Setting up the Environment
To use Sun Grid Engine you should add the following to your .tcshrc file in your home directory:
set path = ( /Volumes/local/bin $path )

Step 2: Submitting a job
To submit a script to the cluster type
qsub <scriptname>

Step 2a: Submitting an array job

qsub -t <start value>-<end value>:<increment> <scriptname>
e.g. qsub -t 2-10:2 array_script.sh This goes from 2-10 counting by twos (i.e. 2, 4, 6, 8, 10)

The script should use the $SGE_TASK_ID variable to find out which job number it is, in order to access the correct data file or name the output correctly or whatever.

August 23, 2004

Changing user passwords on cluster

There are two ways of changing your password on the cluster: using the Finder, or the unix 'passwd' command. This document describes both methods in detail:
Changing your password using Finder
Changing your password using 'passwd' command
Changing your password using Finder
Assuming that you are working from a Mac, running OS X, the following steps will allow you to change your password on the cluster (or any other Mac OS X machine you have access to). If you are working from any other type of machine/operating system, you will need to change your password using the passwd command.

Finder Step 1. In the Finder toolbar, select
GO -> Connect to Server.

NOTE: Click on any image to enlarge.
Select Server Step 2. Enter the server address and click on 'Connect'. The cluster address is:
fmri00-miles.hosted.ats.ucla.edu
HINT: if you click on the (+) button after you enter the server address, it will be added to the list of your favorite servers. Next time you connect, you will simply select the cluster from the list, instead of typing the name again.
Select Server Step 3. Enter your username and click on the 'Options...' button. Do not enter the password in this window, since you are going to change it.
Select Server Step 4. In the Options Window, you can check "Add Password to Keychain" which will remember you password for this particular server (after you log in for the first time); then click on 'Change Password...'
Select Server Step 5. Enter you old password, and then choose a new one. Click OK.
Select Server Step 6. If there were no errors setting your new password, you will be returned to the Login Window. You can enter your new password now and log in, or you can select 'Cancel' if you do not wish to connect. Your new password will be saved.
If you have any problems changing your password contact me (see contact info below).
For details about connecting to the server, see... (coming soon)
Changing your password using 'passwd' command
You can use this method to change your password on the cluster from any type of machine/operating system, providing you have an application which allows you to run ssh (Secure Shell) to connect to the remote server. On a Windows machine, you will need to get an ssh application (I believe there are some free downloads available from www.versiontracker.com, but I am not sure. You will need to look elsewhere for help with ssh on Windows.). On any type of unix or linux machine, you should be able to use ssh via an xterm. On a Mac OS X, ssh can be used from the Terminal Application:

NOTE: Click on any image to enlarge.

Step 1. In the Finder window, navigate to the Terminal application. It can be found in Applications -> Utilities -> Terminal.

Finder


Step 2. When you open the Terminal application. you will see a welcome window, similar to this. Other unix/linux users should see a similar xterm window.

Select Server All of the commands in the following steps below should be typed at the prompt. Hit the Return key after every command.

Step 3. Now that the Terminal is open, you will have to connect to the cluster machine. The only way to connect via Terminal, is to use the ssh command. All Mac OS X machines have ssh installed. If you are unsure you have ssh, you can check by typing:

which ssh

and the response should be a full path to where ssh is installed. On an OS X machine, it will be: /usr/bin/ssh. If you get ssh: Command not found. then you either do not have ssh installed, or it is not on your path.
To connect to the cluster type:

ssh username@fmri00-miles.hosted.ats.ucla.edu

where 'username' is the username that was setup for you on the cluster. The remote machine will then ask you for your password:
username@fmri00-miles.hosted.ats.ucla.edu's password:
Type your current password and you will be logged on and welcomed to cluster:

Welcome to Darwin!
[fmri00-miles:~] username%

Step 4. Finally, to change the password type:

passwd

and enter your old (current, the one you used to log in) password:

Changing password for username.
Old password:

You will then be prompted to enter and retype the new password:

Changing password for username.
Old password:
New password:
Retype new password:

And, that's it! You have a new password...