Download instructions¶
Get the code and example data¶
For the impatient¶
CoSMoMVPA Matlab / Octave code:
git
users:git clone https://github.com/CoSMoMVPA/CoSMoMVPA.git make -C CoSMoMVPA install
also available as zip archive.
In that case, use cosmo set path to set the path.
Full CoSMOMVPA tutorial data in zip format; used for LABMAN 2017 course and NMSM 2019, Noesselt’s lab 3rd Modelling Symposium, University of Magdeburg.
fMRI AK6 and MEEG obj-6 data (for PRNI 2016 exercises): tutorial data with fMRI AK6 and MEEG obj6 data only
A minimal set of data (only fMRI AK6 data for exercises): tutorial data with AK6 data only
MEEG data (only obj-6 data for exercises): tutorial data with MEEG obj6 data only
CoSMOMVPA documentation in HTML format (for off-line viewing) is available in zip and gzipped tar archive.
For the patient¶
The Matlab / Octave code (in mvpa/
) is required for analyses in CoSMoMVPA; the tutorial data is required to run the exercises and the demos, which are included in the examples/
directory.
Installation of CoSMoMVPA:
Users on a Unix-like (Linux, OSX) platform using the command line:
git clone https://github.com/CoSMoMVPA/CoSMoMVPA.git make -C CoSMoMVPA install
Manually:
Download the zip archive.
Add the source code directories to the Matlab / Octave path, by changing the directory to the CoSMoMVPA
/mvpa
directory, then run:cosmo_set_path
(alternatively, add the
mvpa
andexternal
directories, and their subdirectories to the path, usingaddpath
).Then run
savepath
to store the new path permanently.
To check that things are working, run:
cosmo_wtf
which should provide a report of available system information.
(Matlab users can skip this step) For users of Octave, some additional packages from Octave-Force are required. First run the following from the Octave prompt:
pkg install -forge io pkg install -forge nan pkg install -forge statistics pkg install -forge general pkg install -forge miscellaneous
To activate these packages, run the following commands:
pkg load io pkg load nan pkg load statistics pkg load general pkg load miscellaneous
To load these packages automatically when Octave is started, it is recommended to add the following at the end of the
.octaverc
file (which is typically located in the user’s home directory). Note that the first command switches off themore
program for viewing output, so that all output is show directly in the command window:more off pkg load io pkg unload nan pkg load nan pkg load statistics pkg load miscellaneous pkg load general
Get the tutorial data:
The full dataset is in the tutorial data zip archive.
For LABMAN 2017 course: the tutorial data should already be on your work station.
For PRNI 2016, we used fMRI
AK6
and MEEGobj-6
: tutorial data with fMRI AK6 and MEEG obj6 data only.For a minimal set of data (only fMRI AK6 data for the exercises), consider using tutorial data with AK6 data only
Additional MEEG
obj-6
data, used for the exercises, is here: MEG obj6 data.You can move the directory to another location on your file system, if desired.
Set the location of the tutorial data in a text file named
.cosmomvpa.cfg
(in a directory that is in the matlab path), as described in the Notes section of cosmo config hdr.Use
cosmo_wizard_set_config
in CoSMoMVPA’sexamples/
directory, if you prefer a simple-to-use graphical user interface.To do so manually:
If you do not know where to store the file, just close and start Matlab afresh (so that it starts in a location that is in the Matlab path), and run
edit .cosmomvpa.cfg
Alternatively, go to CoSMoMVPA’s
mvpa/
directory and store the.cosmomvpa.cfg
file there (the disadvantage of this location is that the file may be lost if code is updated by downloading an updated.zip
-file).
Note for Windows users: when creating a new file, Windows may add (but hide) a
.txt
extension. It may be better to edit the file from Matlab.Note for Unix (OSX, Linux) users: the file can be stored in the users’
$HOME
directory.Note for Unix (OSX, Linux) users: the file will not be shown in the terminal when using
ls
, because the leading dot in the filename makes it hidden. To show hidden files, usels -a
.Add the lines for
tutorial_data_path
andoutput_data_path
, and save the file.For example, on Apple OSX
.cosmomvpa.cfg
could be stored in the/Users/karen
home directory (for a user namedkaren
), and contain the following:tutorial_data_path=/Users/karen/datasets/CoSMoMVPA/datadb/tutorial_data output_data_path=/Users/karen/tmp/CoSMoMVPA_output
You can choose in which directory you would like to store the output for from running the examples and demonstrations; just make sture that the
output_data_path
directory exists. You can create a new directory for the output if you want.
Keep your code up to date¶
CoSMoMVPA code may change rapidly. To stay up to date:
git
users (assuming you followed the instructions to get the code):git checkout master git pull origin master
everybody else: you would have to re-download the zip archive and update your local
.m
files. (At the moment we do not provide automatic detection of code that is out of date.)
External dependencies¶
Certain functionality require certain external toolboxes:
BrainVoyager files require NeuroElf toolbox.
AFNI files require the
AFNI Matlab
library.Matlab’s Support Vector Machine (SVM) classifier (accessed through cosmo classify svm), and some other functions that use statistical computations, require the Matlab statistics toolbox.
LIBSVM’s Support Vector Machine (SVM) classifier (accessed through cosmo classify libsvm) requires the LIBSVM toolbox.
MEEG data requires FieldTrip for almost all MEEG-related functions.
On Octave, the
io
,nan
,statistics
,miscellaneous
andgeneral
are required; they are available from Octave-Forge. See here for details.
For operations that require external toolboxes, CoSMoMVPA will check their presence. If a required external toolbox is not available, an error message is given with download instructions.
Developers¶
Contributions are welcomed! Please see Information for contributors.
We use a build system for generating documentation. This build system only supports Unix-like systems, and dependencies include Sphinx, Python, and sphinxcontrib-matlabdomain. For details see Setting up the documentation build system.
Unit tests require either the xUnit or MOxUnit toolbox and run on both Matlab and Octave. Doc tests are currently only supported for xUnit, which only runs on Matlab (not on Octave). MOxUnit does not support doc tests because Octave does not support the evalc
command.