CBIO7501 · Lesson 06

pixi run jupyter labFrom notebooks/explore-reads.ipynb:
sample
SRR2584863 21.0
SRR2584866 21.8
SRR2589044 21.4
%%bash, or %%R with rpy2pixi run jupyter lab)If it fails here, it would fail for everyone else. Quarto renders notebooks the same way, on a fresh kernel (lesson 07).
.ipynb files rendered, with their saved outputsjupyter nbconvert --to html, or quarto render notebook.ipynbIn this course: commit notebooks without outputs; share the rendered HTML for reading.
| Jupyter | Quarto (lesson 07) | |
|---|---|---|
| file format | JSON (.ipynb) |
Markdown (.qmd) |
| code runs in | cells, one at a time, in any order | cells, all at render |
| you work in | the browser | your editor and the command line |
| way of working | interactive | render top to bottom |
| good for | exploring | reports you share |
Quarto also renders .ipynb files, so the two work together.
| Use it for | |
|---|---|
| Notebook | exploring, trying ideas |
scripts/ |
code you reuse (the report imports it) |
| Quarto report | results you show others (lesson 07) |
3 minutes. Open a notebook you wrote before this course. Would it run from top to bottom on a fresh kernel today? What would stop it: missing data, a cell run out of order, a package version, a path on your laptop?
[1] [4] [2] [3]. What does it suggest?
jupyter lab (b) jupyter nbconvert --execute ... (c) jupyter kernelspec listnbconvert --execute, before you shareNow: tutorial 06, then your own project.
Text and slides CC BY 4.0 unless marked otherwise. Full list: Sources and credits.
CBIO7501: The Art of Reproducible Research - CC BY 4.0