[TEMPLATE] Python: Start here

IMPORTANT

This is a preview with example data.

Scroll to explore it. To create a notebook from this template and customize the data and analysis, click the button below.
Create a notebook from this template

Welcome to a Synthesize Bio Notebook!

Our notebooks enable you to create custom analyses that can be re-run on any dataset within the platform.

This tutorial introduces you to some of the magic functionality that makes our notebooks unique.

This is a Python notebook, but R notebooks are also available.


What Makes This Notebook Different?

  • Special functions for easily displaying interactive plots and tables
  • Automatic data import as an AnnData object
  • Notebook sharing and re-running

Built-in Functions for This Notebook Environment


  1. set_plot(plotly_plot)

    • Renders any Plotly plot.
  2. set_table(dataframe)

    • Displays any DataFrame as a paginated table.
  3. set_markdown(markdown_text)

    • Shows formatted Markdown text.

See the code chunks below for example usage.

Data Is Imported as an AnnData (Annotated Data) Object

See the code chunk below to see how the adata object is loaded.

This offers several advantages:

  • Sample-level metadata is available in adata.obs.
  • Gene-level metadata (e.g., mapping identifiers) is available in adata.var.

See the AnnData documentation to learn more!

Editing

  • You can freely modify this notebook.
  • Add, edit, or rearrange code and text chunks as needed.

Editing Code Chunks

  • Toggle "View code" in the header to display all code.
  • Run individual chunks by clicking the ► button in the top-left corner of each chunk.
  • Execute the entire notebook by clicking ► in the header.

Code Editor Shortcuts

This notebook supports VS Code-style shortcuts for efficient editing:

  • Press F1 to open the command palette and view all commands.
  • Comment/uncomment a code selection with Command (⌘) + /.
  • Indent code with Command (⌘) + ].
  • Move chunks using the Edit menu in the top-left corner of each chunk.

Pre-installed packages

Our notebook environment has some pre-installed packages as shown in the table below.

Sharing and Re-running

Share your notebook using the 🌍 Share button in the top-right menu to generate a read-only link for colleagues.

You can also use the top-right menu to:

  • Create a copy of the notebook.
  • Edit Data and re-run the notebook on different datasets.

Want to learn more?

  • Contact the team with the chat icon in the lower left corner
  • Visit our website
  • Learn more about our AI models