Statistical NonParametric Mapping, development version
Matlab
Pull request Compare This branch is 35 commits behind SnPM-toolbox:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
config Fix function name. Sep 1, 2017
test No warning if no GT when non-regression is not available Sep 28, 2017
.gitattributes Create repo and README file Sep 9, 2013
.gitignore [gitconfig] Ignore Matlab asv files Sep 13, 2013
Contents.m Headers Nov 10, 2013
LICENCE Create LICENCE Nov 14, 2016
README.md Removed references to Warwick in the READMEs May 8, 2018
README.txt Removed references to Warwick in the READMEs May 8, 2018
snpm.m Do not use addpath in deployed mode. Sep 1, 2017
snpm_P_FDR.m Add and remove commas according to best practices. Sep 1, 2017
snpm_STcalc.m Add and remove commas according to best practices. Sep 1, 2017
snpm_abline.m Use && and || instead of & and | in conditional statements. Sep 1, 2017
snpm_check_nperm.m Fix function name. Sep 1, 2017
snpm_clone_vol.m Headers Nov 10, 2013
snpm_combo.m Use STRCMPI instead of STRCMP with LOWER. Sep 1, 2017
snpm_combo_pp.m Additional fixes for commas, spaces and semicolons. Sep 1, 2017
snpm_cp.m Add and remove commas according to best practices. Sep 1, 2017
snpm_defaults.m Lower PairT exhustive per nsubj limit Mar 28, 2018
snpm_get_defaults.m Headers Nov 10, 2013
snpm_init.m Do not use addpath in deployed mode. Sep 1, 2017
snpm_list.m Fix function name. Sep 1, 2017
snpm_mip.m Add and remove commas according to best practices. Sep 1, 2017
snpm_pi_ANOVAbtwnS.m Additional fixes for commas, spaces and semicolons. Sep 1, 2017
snpm_pi_ANOVAwithinS.m Use && and || instead of & and | in conditional statements. Sep 1, 2017
snpm_pi_Corr.m Add and remove commas according to best practices. Sep 1, 2017
snpm_pi_Corr1S.m Add and remove commas according to best practices. Sep 1, 2017
snpm_pi_OneSampT.m Add and remove commas according to best practices. Sep 1, 2017
snpm_pi_PairT.m Lower PairT exhustive per nsubj limit Mar 28, 2018
snpm_pi_PairTrand.m Add and remove commas according to best practices. Sep 1, 2017
snpm_pi_TwoSampPairT.m Use && and || instead of & and | in conditional statements. Sep 1, 2017
snpm_pi_TwoSampT.m Add and remove commas according to best practices. Sep 1, 2017
snpm_pi_TwoSampTss.m Add and remove commas according to best practices. Sep 1, 2017
snpm_pp.m Tiny, invisible formatting change in table format (to match spm_list) Sep 14, 2017
snpm_t2z.m Add identifiers to errors and warnings Jul 20, 2016
snpm_uc_FDR.m Add identifiers to errors and warnings Jul 20, 2016
snpm_ui.m Additional fixes for commas, spaces and semicolons. Sep 1, 2017
spm_append_96.m Add and remove commas according to best practices. Sep 1, 2017
spm_xyz2e.m Add identifiers to errors and warnings Jul 20, 2016
tbx_cfg_snpm13.m Do not use addpath in deployed mode. Sep 1, 2017

README.md

SnPM: Statistical nonParametric Mapping

DOI

The Statistical non-Parametric Mapping (SnPM) toolbox provides an extensible framework for voxel level non-parametric permutation/randomisation tests of functional Neuroimaging experiments with independent observations.

The SnPM toolbox provides an alternative to the Statistics section of SPM. SnPM uses the General Linear Model to construct pseudo t-statistic images, which are then assessed for significance using a standard non-parametric multiple comparisons procedure based on randomisation/permutation testing. It is most suitable for single subject PET/SPECT analyses, or designs with low degrees of freedom available for variance estimation. In these situations the freedom to use weighted locally pooled variance estimates, or variance smoothing, makes the non-parametric approach considerably more powerful than conventional parametric approaches, as are implemented in SPM. Further, the non-parametric approach is always valid, given only minimal assumptions.

More information at: http://www.nisox.org/Software/SnPM

Non-regression testing

Download test data and set up test data directory (first time only)

The first time you will run the tests, clone the test data (from here) :

git clone git@github.com:SnPM-toolbox/SnPM_test_data.git

Then, fill in the testDataDir variable in snpm_test_config.m to point to the data you just downloaded. For example:

global testDataDir;
testDataDir = '~/snpm_test_data';

You can then untrack the configuration file in git (to avoid pushing your local configuration to the main repository):

git update-index --assume-unchanged test/snpm_test_config.m

Run the test suite

Then, the tests can be started with:

snpm_tests

Run a single test

run(test_oneSample, 'test_onesample_1')

SnPM13: Bugs & Fixes

This section describes the bugs that have been reported, along with the appropriate fixes. Updated versions of appropriate SnPM functions are available at snpm13_updates

SnPM 13.1.05
  • fix: two-sample t-test with nscans>12 was errored due to call to undefined variable nPerm (bug introduced in previous release: 13.1.4) (snpm_pi_TwoSampT)
  • fix: warning on size of SnPM_ST.mat was never raised
  • Add seed shuffling for paired two-sample test modules (snpm_pi_PairT, snpm_pi_PairTrand)
  • Version 13.1.05 (snpm)
SnPM 13.1.04
  • snpm SnPM version 13.1.04

  • snpm_bch_ui, snpm_cp, snpm_ui Fix: implicit masking for non-float datatypes

  • snpm_pi_ANOVAbtwnS, snpm_pi_ANOVAwithinS, snpm_pi_Corr, snpm_pi_Corr1S, snpm_pi_OneSampT, snpm_pi_TwoSampPairT, snpm_pi_TwoSampT, snpm_pi_TwoSampTss Update syntax to set the seed of the random number generator (rng)

  • snpm_defaults New SnPM global parameter shuffle_seed. If true, the rng uses a 'shuffle' seed providing different results for each run. If false Matlab's 'default' seed or any seed defined by the user will be used .

  • snpm_pi_TwoSampT Allows MC permutation (with reptitions) for large enough nPerms

  • snpm_pp, snpm_ui Do not display figures in command-line mode

  • snpm, snpm_check_nperm, snpm_combo, snpm_cp, snpm_init, snpm_pi_ANOVAbtwnS, snpm_pi_ANOVAwithinS, snpm_pi_Corr, snpm_pi_Corr1S, snpm_pi_OneSampT, snpm_pi_PairT, snpm_pi_PairTrand, snpm_pi_TwoSampPairT, snpm_pi_TwoSampT, snpm_pi_TwoSampTss, snpm_pp, snpm_t2z, snpm_uc_FDR, snpm_ui, spm_append_96 Add identifiers to errors and warnings

  • snpm_cp Fix: Do not assume statistic is T when computing cluster forming threshold from P-value

  • generic_test_snpm, skeleton_class, test_ANOVAbetween, test_multisub_withinsubanova, test_multisubpaired2cond, test_multisubsimpleregression, test_oneSample, test_onesub_regression, test_onesub_twocondrepl, test_twoSample, test_twosample_twocond Test in command-line mode with no shuffling for the random seed, using new rng syntax.

Updates from SnPM 13.1.03
  • snpm SnPM version 13.1.03

  • snpm_pi_PairT Now allows more than 52 subjects, as previously that would generate a "Maximum variable size allowed by the program" error message.

Updates from SnPM 13.1.02
  • snpm SnPM version 13.1.02

  • snpm_pp, snpm_combo_pp Update contrast display for compatibility with Matlab R2014b.

  • generic_test_snpm Updates affecting tests only.

Updates from SnPM 13.1.01
  • snpm SnPM version 13.1.01

  • snpm_pp Check that 'Locs_vox' is integer according to a pre-defined tolerance level (as in snpm_cp).

Updates from SnPM13.1.00
  • snpm_cp, snpm_pp, generic_test_snpm, test_oneSample Cluster-forming threshold defined by a P-value are now extended to pseudo-T statistic (with variance smoothing). The Z-score corresponding to the selected P-value is used as an approximation of pseudo-T values.
Updates from SnPM13.0.14
  • snpm_bch_ui_Corr, snpm_bch_ui_Corr1S, snpm_pi_Corr, snpm_pi_Corr1S, test_multisubsimpleregression, test_onesub_regression Introduce nuisance covariates in simple-subject and multi-subject regressions.
Updates from SnPM13.0.13
  • snpm_combo_pp Fix: Set bNeg to 0 for F-tests.
Updates from SnPM13.0.12
  • snpm_pi_OneSampT Fix: Added new random mode for sampling of sign flips (Above 53 scans the binary-coding fails as Matlab's double significand runs out of precision).
Updates from SnPM13.0.11
  • snpm_ui Fix: When relative thresholding is set, then global calculation (user defined or mean) must be computed.

  • snpm_pi_TwoSampPairT, snpm_pi_TwoSampT Fix: Unbalanced two-sample tests were wrongly aborted.

  • test_multisubpaired2cond, test_oneSample, test_twoSample, test_twosample_twocond Updates affecting tests only.

Updates from SnPM13.0.10
  • snpm_ui Fix: ANCOVA normalisation (with an image presenting negative mean using spm_globals).
Updates from SnPM13.09
  • snpm_cp Increase tolerance in checking that 'Locs_vox' is integer.
Updates from SnPM13.08
  • snpm_cp, spm_append_96 Display warning message if SnPM_ST file becomes very large. Display more meaningful error message when Locs_vox is not interger.

  • snpm_pp Display warning message if SnPM_ST can not be loaded.

Updates from SnPM13.07
  • snpm For backward-compatibility, open SPM batch window and display where to find SnPM tools when 'snpm' in called at the Matlab prompt.

  • snpm_pp Fix: slow cluster inference with variance smoothing.

  • generic_test_snpm, test_oneSample, test_twoSample Updates affecting tests only.

Updates from SnPM13.06
  • snpm_ui Apply user-defined scaling.

  • generic_test_snpm, test_oneSample, test_onesub_twocondrepl, test_twoSample Updates affecting tests only.

Updates from SnPM13.05
  • snpm_STcalc Cluster labels from spm_max are not necessarily continuous.

  • snpm_pi_ANOVAbtwnS, snpm_pi_ANOVAwithinS, snpm_pi_Corr, snpm_pi_Corr1S, snpm_pi_OneSampT, snpm_pi_PairT, snpm_pi_TwoSampPairT, snpm_pi_TwoSampT, snpm_pi_TwoSampTss Fix: if number of requested permutations is equal to the maximum number of possible permutations.

  • snpm_pi_TwoSampTss, snpm_pi_TwoSampPairT, snpm_pi_TwoSampT Compute possible permutations (PiCond) in a more efficient way to avoid potential memory faults for large groups.

Updates from SnPM13.04
  • snpm_ui Apply absolute and relative masking.
Updates from SnPM13.03
  • snpm_pi_TwoSampT Compute possible permutations (PiCond) in a more efficient way to avoid potential memory faults for large groups.
Updates from SnPM13.02
  • snpm_pp Fix: if the extension is missing in the provided result file name, use .nii by default. Use NaNs in thresholded map background instead of zeros.

  • [deleted spm_SnPM13] SnPM is now only accessible through the Batch window (SPM -> Tools -> SnPM).

  • snpm_pi_ANOVAbtwnS, snpm_pi_ANOVAwithinS, snpm_pi_Corr1S, snpm_pi_OneSampT, snpm_pi_PairT, snpm_pi_TwoSampPairT, snpm_pi_TwoSampT Minor update in the display.

  • test/ Miror corrections affecting tests procedure only.

Updates from SnPM13.01
  • snpm_cp Synopsis: When half the permutations are computed (i.e. bhPerms is true) and StartPerm is 2 then the initial number of permutation could be 2 depending on sign of T0.

  • snpm_test_config, snpm_test_gound_truth and generic_test_snpm Miror corrections affecting tests procedure only.