Setting Up a Basic fMRI Analysis Pipeline for Beginners
fMRI is one of those techniques that sounds way more complicated than it needs to be once you strip away the jargon. You get brain scans, run them through preprocessing, build a statistical model, and look at activation maps. That's the whole game. The hard part is the execution, not the concept. When I first started running my own pipelines instead of relying on core lab members, I wasted about three weeks before I figured out the right order of operations. Here's how I'd tell someone to do it now. I ran into this particular resource when I was looking for UPMC's internal fMRI training materials on their Infonet portal. They have a solid collection of guides and reference documents that are genuinely useful, especially if you're new to the workflow. The site isn't particularly well-organized, but the content is technically sound. My recommendation is to bookmark their imaging section and come back to it whenever you hit a wall, rather than trying to read everything at once. That approach works better. The standard pipeline looks something like this: you start with DICOM files coming off the scanner, convert them to NIfTI format using something like dcm2niix, then run through motion correction, spatial smoothing, slice-timing correction, registration to a structural scan, normalization to MNI space, and finally statistical analysis. Each step has knobs you can turn, and most people leave them at defaults until they have a reason not to. That's fine. Default settings get you 90% of the way there on a typical task-based fMRI study.
I want to flag something that trips people up constantly. The motion correction step in SPM, FSL, or AFNI does its job, but it can't recover data from subjects who move more than about 3-4 mm during a scan. I had a participant in a working memory study who was essentially dancing in the scanner and the software flagged it, but I missed it in the quality check phase because I was looking at the wrong parameter. The fix was running a quick visual inspection of the realignment parameters plot before spending hours on full preprocessing. Takes about ten minutes and saves you from cleaning up garbage data later. Another thing nobody warns you about is the temporal filtering decision. High-pass filtering is essential for removing low-frequency drift from the scanner and from slow physiological processes. But if you set the cutoff too aggressively, you can wipe out the very signals you're trying to detect. The rule of thumb is to set the high-pass filter to about half the length of your experimental cycle. If your task blocks are 30 seconds on and 30 seconds off, don't high-pass above 120 seconds. It's a small detail that makes a large difference in your statistical output. Multi-level modeling matters more than most beginners realize. You're not just running one big group analysis. The first level is each individual subject's data, producing contrast images. The second level treats those contrast images as observations across subjects. Skipping the first level and trying to jam raw data into a single analysis will give you results that look convincing but are statistically invalid. Fixed-effects approaches on single subjects can appear in the literature occasionally, but they're not generalizable. Don't do it unless you have a very specific reason and you understand what you're giving up.
Here's where I have to be honest about the limitations. fMRI has terrible temporal resolution compared to EEG. You're looking at blood flow changes that lag behind actual neural activity by four to six seconds. That means you can't use it to study millisecond-scale cognitive processes. It also has poor spatial specificity at the individual level. The activation blobs you see on a group map might look precise, but the actual neural activity could be spread over centimeters. Group-level analysis smooths over a lot of individual variation, and that's both a feature and a limitation. The statistical corrections are another minefield. Family-wise error correction and false discovery rate correction exist for a reason, but they're often applied mechanically without understanding what they actually do. FDR is more lenient than FWE and tends to be a reasonable middle ground for neuroimaging studies. If you're running mass-univariate tests across tens of thousands of voxels, you're doing thousands of simultaneous statistical comparisons. Uncorrected thresholds at p
.001 will give you activations, but a large portion of them will be false positives. That's just basic statistics. I've seen published papers with uncorrected thresholds that wouldn't survive a glance from a reviewer who knows what they're looking at. For software, the common choices are FSL, SPM, AFNI, and BrainVoyager. I use FSL primarily because it's command-line driven and scriptable, which matters when you're processing dozens of subjects. SPM is more GUI-friendly and better documented for beginners. AFNI is powerful but has a steeper learning curve. None of them are wrong. Pick one and stick with it until you understand it. Jumping between packages mid-project is how you introduce subtle preprocessing inconsistencies that are nearly impossible to debug.
Get the Full Details

If you're working with resting-state data instead of task-based data, the pipeline changes slightly. You still do motion correction and smoothing, but you also need to address physiological noise from cardiac and respiratory cycles. I've used a combination of CompCor and band-pass filtering between 0.01 and 0.1 Hz, which is standard practice. Some people add ICA-based denoising with tools like ICA-AROMA, and that's worth considering if your motion artifacts are severe. The extra processing time is maybe 20-30 minutes per subject on a decent machine, which is minor compared to scanning time. Quality control is the step most people rush through. I recommend spending at least 15 minutes per subject on visual inspection of the functional and structural scans. Check for artifacts, bad slices, misalignment between functional and structural data, and any unusual signal dropout in regions near the sinuses and ear canals. Those areas are almost always problematic on standard EPI sequences. If you skip QC, you'll get weird activation patterns in your orbitofrontal and inferior temporal regions that aren't real signal, they're just artifact. I learned that the hard way on my first independent project. The hardware matters too, but not in the way people think. A 3T scanner is standard and sufficient for most cognitive neuroscience questions. Going to 7T gives you better spatial resolution, but it also introduces more artifacts and requires more specialized sequences and expertise. For a beginner, 3T is the right choice. Coil configuration also makes a noticeable difference. A 32-channel head coil will give you meaningfully better signal-to-noise ratio than an older 8-channel or 16-channel system, especially in deeper brain regions. This is something to consider when you're planning a study and have any say in scanner time allocation.
Sample size is probably the biggest practical constraint most researchers face. A typical task-based fMRI study with adequate power for a moderate effect size needs somewhere between 30 and 50 subjects, depending on the design and expected effect magnitude. G*Power doesn't really handle fMRI well, so most people use simulation-based power analysis or just follow conventions from similar published studies. It's not ideal, but it's what the field does. Underpowered studies produce inflated effect sizes and poor replicability. That's a known problem, and it's slowly improving as the field pushes back on small-n neuroimaging work. At the end of the day, fMRI is a tool with real capabilities and real limitations. It can localize cognitive processes to broad brain regions, it can track changes over time with intervention studies, and it can reveal connectivity patterns that correlate with behavior. It cannot tell you exactly which neurons are firing. It cannot give you causal evidence on its own. And it will absolutely waste your money and time if you treat it like a black box that produces results without requiring thoughtful experimental design and careful analysis. Pick a question it can actually answer, use the right pipeline, check your data at every step, and you'll get useful results. The rest is just practice.
