top of page

Python

  1. An interactive Python tutorial (on codeacademy), useful for getting started with Python

  2. Think Python: How to Think Like a Computer Scientist (free online book)

  3. Python Data Science Handbook (free online book)

  4. Useful documentation for strings and regular expressions – A description of the new formatting of strings in Python 3.6, a tool to help build and test regular expressions, and an interactive tutorial on regular expressions in python.
    (take links from CBU open science resources)

  5. Python tips and tricks

  6. Coding exercises for beginners

  7. A Psychopy tutorial (a package for creating psychology/neuroscience experiments)

  8. Case Studies in Neural Data Analysis – free online book for neuroscience analysis (EEG/spike train data).

  9. Useful packages –

    • Numpy- MATLAB-like arrays in Python

    • Scipy- Various tools for scientific computing in Python, including the Scipy library itself (providing numerical functions), pandas for data structures and scikit-learn for machine learning. Scipy also includes a good stats package (scipy.stats) and memory-efficient sparse arrays (scipy.sparse).

    • statsmodels- R-like model estimation

    • Matplotlib- Widely-used plotting library. A useful feature is the plotting gallery, where you can visually search for the type of plot you’re looking for and see the code that generates it. For higher-level visualisation, seaborn makes it easier to create pretty and informative statistical plots (see gallery).

    • itertools- Part of the Python standard library, useful for efficient iteration

    • PyMVPA- Multivariate Pattern Analysis tools (with many types of classifiers and support for searchlight analysis)

    • Nipy- Both a library called Nipy, for analysis of neuroimaging data, and a collection of projects devoted to analysis of neuroimaging in python (including nipypye and nibabel listed below).

    • Nilearn- Machine learning for neuroimaging, as well as convenient data manipulation and nice plotting functions for neuroimaging data.

    • Nipype- Enables running algorithms from many different neuroimaging packages in one workflow, using a uniform interface. Porcupine is a graphical interface for building Nipype-based pipelines.

    • Nibabel- Reading and writing of common neuroimaging file formats (including nifti)

    • PySurfer- A library for visualizing cortical surface representations of neuroimaging, primarily for used with Freesurfer. Instructions to facilitate installation with Python 3.6 can be found here.

    • PyBIDS- A library for interacting with datasets in BIDS format

    • pydeface- A tool for defacing nifti images.

    • Keras- A deep learning library

    • pymatbridge- A python interface for calling MATLAB. There’s also an IPython extension called matlab_magic for using pymatbridge in an IPython notebook

    • scikit-learn – a machine learning package in python (including a link to this tutorial

    • PyMVPD – a toolbox for modeling multivariate interactions between brain regions in fMRI

  10. Switching from MATLAB to Python-

    • A translation of MATLAB commands and logic to numpy arrays can be found here

    • A Migration guide from MATLAB to Python, by Enthought

    • A style guide for Python code

    • Using scipy.io you can load and save MATLAB mat files.

    • Spyder is a convenient MATLAB-like development environment (with an editor, a console and dubugging tools). Another editor worth checking out is Visual Studio Code.

  11. Jupyter Notebooks- Jupyter notebooks, a part of Project Jupyter are documents that combine text, live code and visualisation of results. Using JupyterLab (which is replacing Jupyter Notebook), You can write blocks of code within the document and run them interactively, viewing the results within the same document. These documents are especially useful for sharing code and for starting out with python, as you can try things and immediately see their results. A few useful tidbits:

    • A demonstration of how to use Jupyter Lab

    • Jupyter Notebooks aren’t only for python – you can also combine R within the same document (and you’ll have access to the variables created in Python), as well as shell, by adding the relevant kernels.

    • The text parts of the notebook are written in markdown (formatted text, a bit like html, but simpler). A useful guide with tips for markdown can be found here

    • A Jupyter Notebook debugger

    • Colaboratory is a Jupyter notebook environment that runs on the cloud and doesn’t require any setup. You can use it to open jupyter notebooks directly from github by replacing “http://github.com/” with “http://colab.research.google.com/github/” in the URL of the notebook.

  12. Website - ​A website with data science and coding resources sent to us by Avery (11th grade STEM club member) - thank you Avery!

R

  1. R books – An Introduction to R, YaRrr! The Pirate’s Guide to R, R for Data Science, Learning Statistics with R, Statistical Inference via Data Science: A ModernDive into R and the Tidyverse

  2. Datacamp Introduction to R free course

  3. Video lectures on mixed effects modeling (part 1, part 2), that accompany this paper. And an OSF link for the data, code, and slides

  4. Slides about linear mixed effects models (examples in R using lme4)

  5. Introduction to the BayesFactor package (for Bayesian stats in R)

  6. Short course on Bayesian statistics in R, along with the source materials, and a video.

  7. Jupyter Notebooks- Jupyter notebooks, a part of Project Jupyter are documents that combine text, live code and visualisation of results. Using JupyterLab (which is replacing Jupyter Notebook), You can write blocks of code within the document and run them interactively, viewing the results within the same document. These documents are especially useful for sharing code and for starting out with python, as you can try things and immediately see their results. A few useful tidbits:

    • A demonstration of how to use Jupyter Lab

    • Jupyter Notebooks aren’t only for python – you can also combine R within the same document (and you’ll have access to the variables created in Python), as well as shell, by adding the relevant kernels.

    • The text parts of the notebook are written in markdown (formatted text, a bit like html, but simpler). A useful guide with tips for markdown can be found here

    • A Jupyter Notebook debugger

    • Colaboratory is a Jupyter notebook environment that runs on the cloud and doesn’t require any setup. You can use it to open jupyter notebooks directly from github by replacing “http://github.com/” with “http://colab.research.google.com/github/” in the URL of the notebook.

    • JupyterLite – a JupyterLab distribution that runs entirely in the web browser (no need to install anything)

Programming- Python
Programming- R

Programming

Statistics

  1. Introduction to Modern Statistics – online book

  2. Andy Field’s stats lectures, and Andy Conway’s stats lectures

  3. Video lectures on mixed effects modeling (part 1, part 2), that accompany this paper. And an OSF link for the data, code, and slides.

  4. Daniel Lakens’ courses on coursera on improving statistics and structuring studies

  5. Visualizations of statistical concepts – Seeing Theory, Hierarchical Modeling

  6. An online book about reproducible research

  7. ReproNim – Reproducible Neuroimaging Computation

  8. Books/articles – Introduction to linear mixed modeling in experimental psychology (book chapter), Best practice guidance for linear mixed-effects models in psychological science (article), Mixed Models with R (online document), Bayes factor design analysis (article), Choosing priors for Bayesian stats (post), JASP guidelines for Bayesian analysis (article), Special issue on Bayesian methods in psychology, A Q&A about differences in the null hypothesis in frequentist vs. Bayesian stas, Sequential Probability Ratio t-test (article proposing an alternative approach to BFDA).

  9. Tutorial on use of mixed-effects models for fMRI

  10. DABEST – open-source libraries in Matlab, Python and R for estimation graphics (that demonstrate
    effect size), and a
    paper about the approach.

Statistics

Online experiments

  1. Javascript tutorials – w3schools, tutorialspoint, The Modern JavaScript Tutorial, codeacademy

  2. Tryit Editor for javascript/html – an online tool to see the results of snippets of code

  3. jsPsych – JavaScript framework for behavioral experiments (link includes tutorials)

  4. JATOS – a tool to help run studies on a server

  5. Mindprobe – a server for hosting online experiments, that runs JATOS

  6. An online book about reproducible research

  7. ReproNim – Reproducible Neuroimaging Computation

  8. Pavlovia – experiment management using a GitHub-like interface (payment is per participant), an alternate approach to using a server+JATOS

  9. Prolific – the current primary platform we use in the lab for participant recruitment for online studies

  10. Additional participant recruitment platforms – Gorilla (only for experiments built with the Gorilla experiments builder, less flexible), MTurk (a tutorial can be found here, and a comprehensive guide here)

  11. Methods to remove junk data from online experiments (especially on mTurk)

Open science

  1. Sharing Code and Data

    • If you have a bunch of python scripts and you’re not sure how to share them, this tutorial will guide you through the process of turning them into a shareable Python package.

    • Docker – Enables you to create a container with the environment needed to run your code (system settings, dependencies, etc.) such that anyone with Docker installed can run your code and get the same results, regardless of their system. You can then share your docker container publicly on DockerHub.

    • Singularity – Similar to Docker, but can be run in environments (like the CBU) that don’t support Docker due to security concerns.

    • Neuordocker – Creates a docker container for you, with all the main neuroimaging software. This can also be used as a basis to create the specific docker container for your code.

    • ReproZip – Since docker containers can very quickly become huge, this helps reduce the size of the container, packaging only the relevant components.

    • Binder, repo2docker – Tools to build a container from a repository

    • DataLad – Dataset portal and versioning system (like GitHub for data), with links to dataset hosted on other websites.

    • Open Science Framework – A free research project management platform, including version control and data sharing (for smaller projects, such as behavioural studies or statistical maps).

    • Neurovault – A public repository where you can place unthresholded statistical maps.

    • OpenNEURO – A free platfrom for sharing neuroimaging data in BIDS format. If you agree to make the dataset public within 18 months, you can use free cloud computing to run various workflows such as fMRIprep and MRIQC.

    • Code Ocean – A platform for sharing code in multiple programming languages (including MATLAB). The computing itself is cloud-based, so that users don’t have to install anything locally.

    • NITRC – Has links to open datasets and tools, as well as a cloud-computing environment

    • figshare – Cloud solutions to store, share and manage all possible research outputs (and you can get a DOI for the outputs).

  2. Git/GitHub
    Git is a version control system you can use on your own computer to keep track of changes to your code. GitHub is a platform to share code, using git for version control. GitHub has a very detailed help where you can find detailed information, but below are a few useful resources:

  3. BIDS format
    BIDS is a standardised way of organising neuroimaging data. Formatting data in BIDS makes it easier to share, and enables use of tools that expect data to be in BIDS format.

    • The BIDS Starter Kit helps learn how to organise data in BIDS format.

    • Dcm2Bids is a useful tool for converting raw data (dicoms) to BIDS format. Within the CBU, cbu2bids is based on Dcm2Bids, but it sets specific parameters for running on the CBU imaging system.

    • Once the data is in BIDS, it can be read into a Python data structure using PyBIDs.

    • BIDS Apps are various tools you can use to analyse data in BIDS format, including fmriprep, a preprocessing pipeline, MRIQC for data quality control, and BIDSonym for de-identification of anatomical data.

  4. Preregistration and Registered Reports
    Preregistration has been suggested as an important way to combat publication bias, p-hacking and analytic flexibility without preventing exploratory research. Below are some useful resources:

    • Some background

    • A ‘how to’

    • The easiest platform for preregistration is aspredicted

    • A more thorough platform for new studies is the Open Science Framework with an example here

    • A useful template for preregistration of fMRI studies

    • Many journals now accept ‘registered reports’ – in other words, you submit the preregistered plan and paper outline, which is provisionally accepted solely on basis of the methods, not the results. Some resources here

  5. The Practice of Reproducible Research - an online book

  6. Octopus – may be the future of scientific publishing. An publishing platform that breaks down traditional publications to smaller units

  7. GitLab – a software development and management platform that supports collaboration

Online experiments
Open Science

fMRI preprocessing and analysis tools

  1. fmriprep – a preprocessing pipeline for fMRI Data (and a useful example from the MemoLab on how to run it on a cluster)

  2. mriqc – a workflow that extracts various image quality metrics from MRI data to help assess data quality (and a useful example from the MemoLab on how to run it on a cluster)

  3. Nipype - a neuroimaging analysis package in Python that allows combining different neuroimaging software in one workflow (a tutorial can be found here)

  4. BrainIAK – a package of python modules for brain imaging analyses (+ an article describing the package)

  5. MRIflows – a set of fully automatic neuroimaging pipelines for preprocessing and 1st and 2nd level univariate and multivariate analyses (a preprint describing the advantages of fMRIflows can be found here).

  6. DeepMReye – a tool (based on a CNN) that decodes gaze position from fMRI signals from the eyeballs (the paper describing the method can be found here).

  7. ITK-snap – software for manual segmentation

  8. mricron – nifti file visualization

fMRI preprocessing and analsis tools

fMRI resources

  1. Guide for optimal MTL scanning

  2. practical fMRI – a blog with various tips for better planning of fMRI experiments

  3. NeuroPowerTools – includes NeuroPower (a toolbox to compute the necessary sample size in fMRI) and NeuroDesign (a tool for optimizing the experimental design, a preprint about it can be found here)

  4. Andy’s Brain Book (includes also a unix tutorial) and Andy’s Brain Blog

  5. Blog post about things to keep in mind when planning and running an fMRI experiment

  6. Representational Similarity Analysis (RSA) workshop

  7. An article about calculating effect sizes in fMRI data (includes Matlab code for calculation).

  8. Neuroscout – a platform for fast and flexible re-analysis f naturalistic fMRI studies (the datasets themselves are on OpenNeuro and DataLad).

  9. MRI lectures by Paul Callaghan

  10. Mumford Brain Stats fMRI lectures by Jeanette Mumford (and her website with additional resources)

  11. Places to get help with fMRI analyses – Mumford Brain Stats and Neurostars (a forum for getting help from other neuroscientists, they also have links to numerous training courses)

fMRI resources

summer courses / online courses

  1. Principles of fMRI online course by Martin Lindquist and Tor Wager (can also be taken on coursera)

  2. fmri4newbies – crash course in brain imaging by Jody Culham (uses BrainVoyager)

  3. DartBrains – course/book on fMRI analysis, including use of analysis tools in python

  4. Neuroimaging Analysis Methods for Naturalistic Data – course/book focusing specifically on analysis of naturalistic data

  5. NIMH fMRI summer courses + MVPA course (include video recordings and slides)

  6. Recordings from an NIMH workshop on Naturalistic stimuli

  7. Rebecca Saxe’s fMRI Bootcamp (Part 1 – Basics of MRI, Part 2 – fMRI Timecourse)

  8. Neurohackademy – a summer school in neuroimaging and data science, most talks from previous schools can be found on the website.

  9. UofM Training course in fMRI

  10. Kavli Summer Institute in Cognitive Neuroscience (Brain Camp) – a summer course in cognitive neuroscience

  11. General course platforms with a variety of online courses – Coursera, Datacamp, Udemy

  12. Two neuroimaging courses on coursera offered by Johns Hopkins university – Fundamental Neuroscience for Neuroimaging and Neuroscience and Neuroimaging Specialization

  13. AFNI bootcamp – set of videos describing fMRI processing with AFNI

  14. Neuromatch Academy provides Computational Neuroscience and Deep Learning courses with personalized support (or a free version as observers). Previous course materials can be found online.

  15. The Human Brain – Cognitive Neuroscience course by Nancy Kanwisher

  16. ABCD ReproNim Course – course on reproducible data analysis. Mostly focused on using the ABCD study data, but includes general talks about reproducible research.

  17. List of neuroimaging training resources

  18. UCL course - Designing and Analysing fMRI Experiments

  19. course (under development) about functional neuroimaging analysis in Python

summer courses / online courses

Atlases and segmentation

  1. A website that lists different cortical, and subcortical segmentations in MNI space

  2. The Schaefer parcellation, based on resting state fMRI from nearly 1500 participants. Have different granularities of parcellations from 100 to 1000, as well as divisions of the parcellations to networks.

  3. Atlases included in FSL

  4. Probabilistic maps of the hippocampus and surrounding cortices – based on manual segmentation of 55 T1 images then warped to MNI space (by Maureen Ritchey and colleagues)

  5. Freesurfer – automated cortical and subcortical segmentation, including hippocampal subfield segmentation

  6. The Hippocampal Subfields Group – a group of researchers working towards reaching a consensus in hippocampal labeling, the website includes useful resources for hippocampal segmentation

  7. MTL segmentation guide by Mariam Aly

  8. Automatic Segmentation of Hippocampal Subfields – automated segmentation software

  9. Hippocampal segmentation on JOVE

Atlases and segmentation

Open datasets

  1. studyforrest – 3T and 7T fMRI of the movie Forrest Gump (also in an audio movie version) and of music listening.

  2. Narratives collection – a collection of fMRI datasets with people listening to naturalistic spoken stories (+ a preprint describing the collection)

  3. Sherlock dataset – fMRI dataset of participants watching Sherlock Holmes followed by recall (in the scanner).

  4. CamCAN - Large ageing dataset that includes (among others) fMRI scans of participants watching an 8-min film

  5. The Naturalistic Neuroimaging Database – fMRI dataset of 86 participants who watched one of 10 full-length movies (a paper about the dataset can be found here)

  6. The Human Connectome Project (HCP) – has several large datasets, including movie watching. EasyHCP is a python package to help access and handle HCP data on AWS (Amazon Web Services).

  7. MTL segmentation guide by Mariam Aly

  8. Automatic Segmentation of Hippocampal Subfields – automated segmentation software

  9. Hippocampal segmentation on JOVE

  10. iEEG/fMRI dataset in which participants viewed a 6.5 min narrative film

Open datasets

Miscellaneous tidbits

  1. TimeSformer – Facebook AI action recognition in videos

  2. Tutorial on recurrent Neural Networks and their use for neuroscience

  3. VR toolkits for traffic and social interactions (Ubiq), based on Unity

  4. Brainhack – brain hackathons organized in numerous places worldwide. The OHBM Brainhack is accompanied by TrainTrack, an event which is more training oriented (check their website for useful tutorials).

  5. A twitter thread with resources that support efficient academic paper reading

  6. A twitter thread about writing twitter threads

Micellaneous tidbits
bottom of page