Jupyter

In the Python trainings and in the spatial trainings we are going to write and execute Python code in a Jupyter notebook in VSCode. Make sure you have VSCode installed.

Getting VSCode ready for Jupyter notebooks

Before you can work with Jupyter notebooks in VSCode you have to install the python and jupyter extensions.

Homework for everyone: install VSCode and add the Python and Jupyter extensions.

Working with Jupyter notebooks in VSCode

Jupyter notebooks are similar to R markdown files. They contain a mix of:

  • text with explanations written in markdown
  • Python code that you can run
  • the results of running the code

Homework for everyone: open a Jupyter notebook in VSCode

  • Download the Python syntax notebook.
  • Place it in the folder that contains the .venv file of the virtual environment (jupyter_notebooks in our case)
  • Open VSCode and open the jupyter_notebooks folder in VSCode
  • Open the Python syntax notebook
  • Select the Python from the virtual environment as kernel
  • Run the first code cell

Homework only for those who will follow the summer school

  • Add the Test notebook to the targeted_transcriptomics_analysis folder
  • Open the targeted_transcriptomics_analysis folder in VSCode
  • Open the Test notebook
  • Select the Python from the virtual environment as kernel
  • Run the first and the second code cell

In the video the targeted_transcriptomics_analysis folder is located in my home folder. For Windows users it will be here: C:/spatial/targeted_transcriptomics_analysis