Giter Site home page Giter Site logo

fdr_permutations's Introduction

Permutation based clusterwise FDR correction

This repository houses data, code, results, and manuscripts for preliminary investigations into investigating a permutation framework for clusterwise false discovery rate correction for fMRI data.

Data

This folder houses single subject and group level results from 4 OpenfMRI.org datasets1. These are the results as reported in Eklund et. al.2 and were provided to us by Anders Eklund.

Scripts

The scripts used to generate our permutations and test statistic. For details about the method, see the Letter and Methods folders.

  1. Perm_clusterP.py - This script generates permutations of each first level contrast by sign randomly sign flipping the original design matrix and calculating the number of significant clusters present in each permutation for multiple cluster defining thresholds.
  2. CombinePMF.py - This script estimates our final probability mass function by combining across the normalized histograms of each permutation. Permutations in which no clusters were observed assign all of their value to 0.
  3. FDR_correct.py - This script gathers the actual cluster extents and corrected pRFT-FWE values for all observed clusters from the group level Z images. It then compares each cluster extent to the PMF calculated above to determine an uncorrected p-value based on how often we observed a cluster of that size in the permutations. Finally, these uncorrected p-values are submitted to false discovery rate correction to obtain a corrected pFDR. We then plot the pRFT-FWE values against the pFDR values for two cluster defining thresholds.
  4. slab.py - This script houses a number of helper functions used elsewhere in the code.
  5. IPython notebook/Binder - We have set up a binder that accesses the IPython notebook in Scripts so that you can interact with the code that calculates the uncorrected p-values, FDR corrects them, and plots them. You can access it here Binder

Results

This houses saved results for each contrast. The msgpack python module was used for saving results. See the slab.SavePermResults calls in the above scripts for the order of variables saved. Additionally, output from FSL's cluster function is housed in the stdout.nipype files. If the LoadResults variable is set in FDR_correct.py it will load these files directly rather than trying to use FSL.

Letter

LaTeX and PDF versions of our response to Eklund, et al.2 Submitted to arXiv on 8/3/2016.

Methods

LaTeX and PDF versions of our extended methods from the above letter, going into more detail about our analysis.

References

1: https://openfmri.org/dataset/ds000003/
https://openfmri.org/dataset/ds000005/
https://openfmri.org/dataset/ds000006/
https://openfmri.org/dataset/ds000107/

2: Eklund, A., Nichols, T. E., & Knutsson, H. (2016). Cluster failure: Why fMRI inferences for spatial extent have inflated false-positive rates. Proceedings of the National Academy of Sciences, 113(28), 7900โ€“7905. http://doi.org/10.1073/pnas.1602413113

fdr_permutations's People

Contributors

dankessler avatar mangstad avatar sripada avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.