If you're a biology student, a researcher, or someone switching into bioinformatics, you've probably seen words like pipeline, Nextflow, Snakemake, conda and workflow everywhere and nobody explains them from scratch, so they feel scary.
This blog fixes that. By the end, you'll know:
- what a pipeline is and why bioinformatics needs workflow managers
- what Nextflow and Snakemake are
- what Java, Python, conda and mamba are, and why they come up
- how to install everything
- how to practice with a tiny project
- where these tools are used in real life
- how to keep learning after this
No prior knowledge needed. Let's go.
Part 1: The Basics
What is a pipeline?
In bioinformatics, you rarely do just one thing to your data. You do many steps, one after another.
For example, in an RNA-seq analysis:
- Check quality of raw reads (FastQC)
- Trim bad parts (Trimmomatic or fastp)
- Align reads to a genome (STAR or HISAT2)
- Count reads per gene (featureCounts)
- Combine results across samples and compare conditions
The output of step 1 goes into step 2, step 2 goes into step 3, and so on. This chain of steps is called a pipeline (or workflow).
Think of it like cooking. A recipe has steps: wash rice, boil water, cook rice, add salt. A pipeline is a recipe for your data.
Why not just run commands one by one?
You can, and when you're learning, you should. But in real projects:
- You might have 50 or 500 samples. Typing commands 500 times is not practical.
- A step fails at sample 37. Do you restart everything?
- Your colleague asks "how did you get this result?" and you can't remember which tool version or settings you used.
- You move from your laptop to a university server (HPC) or cloud, and everything breaks.
A simple bash script helps, but it still doesn't solve most of this.
What is a workflow manager?
A workflow manager is software that runs your pipeline for you, and does it smartly. It:
- runs steps in the correct order
- runs independent samples in parallel (at the same time)
- resumes from where it failed instead of starting over
- keeps your analysis reproducible (same input gives same output, on any computer)
- works on your laptop, HPC clusters and cloud with little change
Nextflow and Snakemake are the two most popular workflow managers in bioinformatics.
What is Nextflow?
Nextflow is a workflow manager built for data-heavy pipelines. You write your pipeline as processes (steps) connected by channels (the pipes that carry data between steps). It's based on a language called Groovy, which runs on Java. You don't need to learn Java itself, but you do need Java installed.
Nextflow is very popular in genomics and has a huge community project called nf-core, which provides ready-made, well-tested pipelines (RNA-seq, variant calling, single-cell and more). Many labs and companies use it.
What is Snakemake?
Snakemake is a workflow manager written in Python. You write your pipeline in a file called a Snakefile, using rules. Each rule says: "to make this output, take this input and run this command."
Snakemake works backwards. You say what final files you want, and it figures out which rules to run. If you know a little Python, Snakemake feels natural, because the Snakefile is an extension of Python syntax.
What is the role of these tools in bioinformatics?
Workflow managers sit in the middle of your analysis. They don't analyze data themselves. They coordinate the tools that do.
Your raw data↓[ Workflow manager: Nextflow / Snakemake ]↓ runs, in order and in parallel:FastQC → fastp → aligner → counting → MultiQC↓Final results
Their role is to make your analysis automated, scalable and reproducible. Reproducibility matters a lot in science. If someone else can't repeat your analysis, it's hard to trust it.
Part 2: The Supporting Cast (Java, Python, conda, mamba)
Beginners get confused because installing Nextflow or Snakemake involves other things. Here's what each one is.
What is Java and why does Nextflow need it?
Java is a programming language and runtime. Nextflow is built on top of it, so Java has to be installed on your computer for Nextflow to run. Think of Java as the engine, and Nextflow as the car built on it.
- You do not need to write Java code.
- You only need the Java runtime installed, in a version that Nextflow supports (a recent version like 17 or higher; check the Nextflow docs for the current requirement).
What is Python and why does Snakemake need it?
Python is a popular programming language, very common in bioinformatics. Snakemake is written in Python, and a Snakefile uses Python-like syntax. Having Python available is required, and knowing basic Python helps a lot when your Snakefiles get more advanced.
You don't need to be a Python expert to start. Variables, lists and basic loops are enough for a first pipeline.
What is conda?
Bioinformatics tools are installed in complicated ways. Each tool needs specific versions of other software (called dependencies), and these often conflict with each other.
Conda is a package and environment manager that solves this. It lets you:
- install software with one command
- create separate environments, like isolated boxes, where each project has its own tool versions
For example, one environment can have an old version of a tool for Project A and a new version for Project B, without them fighting.
Most people install conda through Miniconda or Miniforge, which are lightweight installers.
What is Bioconda?
Bioconda is a "channel" (think: a software store) for conda that contains thousands of bioinformatics tools: samtools, bwa, fastqc, and Snakemake itself. This is why you'll see -c bioconda in install commands.
What is mamba?
Mamba is a faster replacement for conda. It does the same job, but resolves and installs packages much more quickly. The commands are almost identical, so wherever you see conda install, you can usually write mamba install instead. If you install Miniforge, you typically get mamba along with conda.
How do they all fit together?
| Tool | What it is | Role in your workflow |
|---|---|---|
| Linux/terminal | The command-line interface | Where you run everything |
| Java | Runtime/engine | Needed to run Nextflow |
| Python | Programming language | Needed for Snakemake |
| conda / mamba | Package and environment manager | Installs tools and keeps versions organized |
| Bioconda | Software repository for biology tools | Source of bioinformatics tools |
| Nextflow / Snakemake | Workflow managers | Run your multi-step pipeline automatically |
Part 3: Before You Start (Prerequisites)
1. Basic Linux
Workflow managers are used from the terminal. Get comfortable with:
pwd,ls,cd: see where you are, list files, move aroundmkdir,cp,mv,rm: make, copy, move, deletecat,head,less: look inside filesnanoorvim: edit files
Even a few days of Linux practice is enough to start.
2. If you use Windows
Install WSL (Windows Subsystem for Linux), which gives you a real Linux terminal inside Windows. Most bioinformatics tools work best on Linux or macOS, so it's worth setting up.
3. A text editor
VS Code is a great choice, and it works with WSL too.
4. Basic Python (recommended for Snakemake)
Just the fundamentals to begin with.
Part 4: Installation, Step by Step
Step 1: Install Miniforge (conda + mamba)
Go to the Miniforge GitHub page, download the installer for your system, and follow the instructions. After installing, close and reopen your terminal and check:
conda --versionmamba --version
Step 2: Create a practice folder
mkdir workflow_practicecd workflow_practicemkdir data
Step 3: Create tiny test data
No real data needed. We'll make two small fake FASTQ files:
printf "@read1\nACGTACGT\n+\nIIIIIIII\n@read2\nTTGGCCAA\n+\nIIIIIIII\n" > data/sample1.fastqprintf "@read1\nGGGGCCCC\n+\nIIIIIIII\n@read2\nAAAATTTT\n+\nIIIIIIII\n@read3\nCGCGCGCG\n+\nIIIIIIII\n" > data/sample2.fastq
Sample 1 has 2 reads and sample 2 has 3 reads. Our goal is a pipeline that counts reads per sample. Small, but the idea is the same as in big pipelines.
Step 4: Install Snakemake
mamba create -c conda-forge -c bioconda -n snakemake snakemakeconda activate snakemakesnakemake --version
What this does:
create -n snakemakemakes a new environment named "snakemake"-c conda-forge -c biocondatells it where to download fromconda activate snakemakeenters that environment
Any time you open a new terminal, run conda activate snakemake again before using it.
Step 5: Install Nextflow
Option A (using conda/mamba, which also takes care of Java in the same environment):
mamba create -c conda-forge -c bioconda -n nextflow nextflowconda activate nextflownextflow -version
Option B (official installer): first check Java with java -version. If missing, install a supported version, then:
curl -s https://get.nextflow.io | bashchmod +x nextflowmv nextflow ~/bin/
Make sure ~/bin is in your PATH. If anything differs on your system, the official Nextflow installation docs have the latest instructions.
Part 5: Your First Snakemake Pipeline
Activate the environment and make sure you're in workflow_practice:
conda activate snakemakeThe idea
Snakemake thinks backwards: "I want these final files. What rules do I need to run to get them?"
Write the Snakefile
Create a file named exactly Snakefile (capital S, no extension):
SAMPLES = ["sample1", "sample2"]rule all:input:expand("results/{sample}.count.txt", sample=SAMPLES)rule count_reads:input:"data/{sample}.fastq"output:"results/{sample}.count.txt"shell:"echo $(( $(wc -l < {input}) / 4 )) > {output}"
Understand it line by line
SAMPLES = [...]is a normal Python list of sample namesrule alllists the final files we want. It's the "goal" of the pipelineexpand(...)builds the list of output files for each samplerule count_readsis the actual step{sample}is a wildcard, a placeholder Snakemake fills in for each sample- A FASTQ read takes 4 lines, so lines divided by 4 gives the read count
Run it
Always do a dry run first (shows what would happen, without running):
snakemake -nThen the real run:
snakemake --cores 2cat results/*.count.txt
You should see 2 and 3.
See the smart behavior
Run snakemake --cores 2 again. It says nothing needs to be done, because outputs already exist. Edit data/sample1.fastq and run again, and only sample1 re-runs.
Part 6: Your First Nextflow Pipeline
Activate the environment:
conda activate nextflowTest the install
nextflow run helloIf it prints "Hello world!" style output, Nextflow works.
The 3 core concepts
- Process: one step (command, inputs, outputs)
- Channel: the pipe that carries data between steps
- Workflow: where you connect processes together
Write the pipeline
Create main.nf:
params.reads = "data/*.fastq"process COUNT_READS {publishDir "results_nf", mode: 'copy'input:path fastqoutput:path "${fastq.simpleName}.count.txt"script:"""echo \$(( \$(wc -l < ${fastq}) / 4 )) > ${fastq.simpleName}.count.txt"""}workflow {reads_ch = Channel.fromPath(params.reads)COUNT_READS(reads_ch)}
Understand it
params.readsis a parameter: where input files areChannel.fromPathcollects all matching files and sends them into the processCOUNT_READSruns once per file, in parallelpublishDircopies final outputs to a clean results folder- Inside the
scriptblock,\$is used so the shell (not Nextflow) handles the$signs
Run it
nextflow run main.nfcat results_nf/*.count.txt
The magic flag: -resume
nextflow run main.nf -resumeFinished tasks show as cached and are skipped. Nextflow stores all intermediate work in a work/ folder with hash-named subfolders. Don't be scared by those, and don't delete work/ if you want resume to work.
Part 7: Nextflow vs Snakemake
| Nextflow | Snakemake | |
|---|---|---|
| Based on | Groovy (runs on Java) | Python |
| Thinking style | Data flows through channels | Rules produce output files (backwards) |
| Feels easier if | You like dataflow/pipeline thinking | You already know Python |
| Ready-made pipelines | nf-core (very large collection) | Snakemake workflow catalog |
| Resume | -resume flag | Automatic, based on files |
| Preview | Not a direct equivalent | snakemake -n dry run |
| Runs on | Laptop, HPC, cloud | Laptop, HPC, cloud |
Neither is "better". Both are widely used. Which one you need often depends on your lab, your company or your job description, so learning both makes you more flexible.
Part 8: Where Are These Used? (Applications)
Workflow managers are used wherever data analysis has many steps and many samples:
- RNA-seq analysis: QC, alignment, counting, differential expression
- Variant calling (DNA-seq / exome / genome): finding mutations
- Single-cell analysis: processing large single-cell datasets
- Metagenomics: identifying microbes in samples
- ChIP-seq / ATAC-seq: regulatory genomics
- Genome assembly and annotation
- Clinical and diagnostic genomics: where reproducibility and traceability matter
- Pharma and biotech pipelines: standardized, repeatable analysis at scale
- Research labs: sharing pipelines along with a publication so others can reproduce the work
If you look at bioinformatics job descriptions, you'll often see "experience with Nextflow or Snakemake" listed, especially for roles involving NGS data.
Part 9: How to Start Practicing (Roadmap)
Week 1: Linux basics. Navigation, files, editing, pipes.
Week 2: Conda/mamba. Create environments, install tools like samtools or fastqc, export an environment.
Week 3: Run tools manually. Run FastQC and one more tool on a small sample by hand. Understand inputs and outputs.
Week 4: Your first workflow. Rebuild the tiny pipeline from this post in one tool (Snakemake if you know Python, Nextflow otherwise), then in the other.
Week 5+: Grow it.
- Replace the read counting with a real tool (FastQC, fastp)
- Add a second and third step
- Add a config file for parameters
- Try containers (Docker or Singularity) later, so that tools come packaged
Then: Run a community pipeline (nf-core) on a small test dataset, just to see how a professional pipeline is structured.
Good practice project ideas
- Count reads in several FASTQ files (what we did)
- FastQC on multiple samples, then combine with MultiQC
- Trim reads and then run QC again
- A mini RNA-seq pipeline on a small public dataset
Free resources
- Official Nextflow documentation and training material
- nf-core website (tutorials and pipelines)
- Official Snakemake documentation and tutorial
- Official Miniforge/conda documentation
Part 10: Common Beginner Mistakes
- Skipping Linux. If the terminal feels strange, workflow tools will feel 10x harder.
- Forgetting to activate the environment. "Command not found" often just means you didn't run
conda activate. - Wrong Snakefile name. It must be
Snakefileunless you point to another name. - Mixing tabs and spaces in Snakemake. Use consistent 4-space indentation.
- Deleting Nextflow's
work/folder and then wondering why-resumedoesn't work. - Starting with a giant pipeline. Start tiny, then grow.
- Installing everything in one environment. Make a separate environment per project or tool set.
- Copy-pasting without understanding. Change something on purpose, break it, and fix it. That's how it sticks.
Final Thoughts
Nextflow and Snakemake look intimidating, but they're just tools to organize and automate the steps you already do manually. Once you understand the ideas (steps, inputs, outputs, environments), the syntax becomes easy to pick up.
You don't need to learn everything at once. Install the tools, run the tiny pipeline from this post, and then improve it one step at a time. That's how every bioinformatician started.
Conclusion
Nextflow and Snakemake can look scary at first, but they're just tools that automate the same steps you'd otherwise run by hand, again and again. Once you understand the basic ideas (inputs, outputs, steps, environments), the syntax becomes much easier to pick up.
Here's what we covered:
- A pipeline is a chain of analysis steps, and a workflow manager runs it for you in an automated, reproducible and scalable way.
- Nextflow (built on Java) and Snakemake (built on Python) are the two most popular workflow managers in bioinformatics.
- Conda and mamba keep your tools and versions organized, and Bioconda is where most bioinformatics tools live.
- You can practice with tiny fake files, and you don't need big datasets or a server to begin.
Don't try to learn everything in one go. Pick one tool, run the small pipeline from this post, then change something on purpose, break it, and fix it. That is how you really learn. Start small, stay consistent, and grow one step at a time.
If you're a student or career switcher, remember that nobody starts as an expert. Every bioinformatician once stared at their first error message and had no idea what it meant. Keep going.
If you get stuck anywhere, drop a comment below and I'll help you out. And tell me: which one are you starting with, Nextflow or Snakemake?
For more beginner-friendly bioinformatics content, follow BI23 (Bioinformatics Made Easy) on YouTube and LinkedIn, and if you want personal guidance, you can book a 1:1 session with me on Topmate.
Happy learning! 🧬