Get the code and example data¶
For the impatient¶
CoSMoMVPA Matlab / Octave code:
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
For the patient¶
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
Download the zip archive.
(alternatively, add the
externaldirectories, and their subdirectories to the path, using
to store the new path permanently.
To check that things are working, run:
which should provide a report of available system information.
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
.octavercfile (which is typically located in the user’s home directory). Note that the first command switches off the
moreprogram 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
obj-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
obj-6data, 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.
examples/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
Alternatively, go to CoSMoMVPA’s
mvpa/directory and store the
.cosmomvpa.cfgfile there (the disadvantage of this location is that the file may be lost if code is updated by downloading an updated
Note for Windows users: when creating a new file, Windows may add (but hide) a
.txtextension. It may be better to edit the file from Matlab.
Note for Unix (OSX, Linux) users: the file can be stored in the users’
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, use
Add the lines for
output_data_path, and save the file.
For example, on Apple OSX
.cosmomvpa.cfgcould be stored in the
/Users/karenhome directory (for a user named
karen), and contain the following:
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_pathdirectory 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:
gitusers (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
.mfiles. (At the moment we do not provide automatic detection of code that is out of date.)
Certain functionality require certain external toolboxes:
AFNI files require the
MEEG data requires FieldTrip for almost all MEEG-related functions.
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.
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