Skip to content

Commit

Permalink
Merge pull request #4315 from hexhowells/main
Browse files Browse the repository at this point in the history
New Filter, Plot and Explore (Jupyter Notebook) tutorial
  • Loading branch information
bgruening authored Aug 25, 2023
2 parents a20023d + fdc74ea commit e63a214
Show file tree
Hide file tree
Showing 25 changed files with 1,069 additions and 1 deletion.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
destination:
type: library
name: GTN - Material
description: Galaxy Training Network Material
synopsis: Galaxy Training Network Material. See https://training.galaxyproject.org
items:
- name: Single Cell
description: Training material and practicals for all kinds of single cell analysis
(particularly scRNA-seq!). When you generate your lovely gene lists for your cells,
consider checking out our Transcriptomics tutorials for further network analysis!
items:
- name: Filtrado, representación y exploración de secuenciación de ARN de células
únicas
items:
- name: 'DOI: 10.5281/zenodo.4624461'
description: latest
items:
- url: https://zenodo.org/api/files/7dc49f8f-137e-49e3-8eec-1e78cb9d7612/Mito-counted_AnnData
src: url
ext: h5ad
info: https://doi.org/10.5281/zenodo.4624461
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
layout: faq-page
---
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
# Introduction

You’ve done all the work to make a single cell matrix, with gene counts and mitochondrial counts and buckets of cell metadata from all your variables of interest. Now it’s time to fully process our data, to remove low quality cells, to reduce the many dimensions of data that make it difficult to work with, and ultimately to try to define our clusters and to find our biological meaning and insights! There are many packages for analysing single cell data - Seurat Satija et al. 2015, Scanpy Wolf et al. 2018, Monocle Trapnell et al. 2014, Scater McCarthy et al. 2017, and so forth. We’re working with Scanpy, the python iteration of the most widely used single cell toolkit.

> <details-title>Python Version</details-title>
>
> This tutorial is an adaptation of [Filter, Plot and Explore]({% link topics/single-cell/tutorials/scrna-case_basic-pipeline/tutorial.md %}). The workflow has been converted into a Jupyter notebook that can be ran in Galaxy through `JupyterLab`. The notebook runs in Python and primarily relies on the Scanpy library for performing most tasks. Running through this notebook will allow you to see and modify the code being run at each step, so feel free to experiment with the different code cells to gain a deeper understanding of the analysis process.
>
{: .details}


## Get data

We've provided you with experimental data to analyse from a mouse dataset of fetal growth restriction {% cite Bacon2018 %}. This is the full dataset generated from [this tutorial]({% link topics/single-cell/tutorials/scrna-case_alevin-combine-datasets/tutorial.md %}) if you used the full FASTQ files rather than the subsampled ones (see the [study in Single Cell Expression Atlas](https://www.ebi.ac.uk/gxa/sc/experiments/E-MTAB-6945/results/tsne) and the [project submission](https://www.ebi.ac.uk/arrayexpress/experiments/E-MTAB-6945/)). You can find this dataset in this [input history](https://usegalaxy.eu/u/wendi.bacon.training/h/cs3-answerkey) or download from Zenodo below.

You can access the data for this tutorial in multiple ways:

1. **Your own history** - If you're feeling confident that you successfully ran a workflow on all 7 samples from the previous tutorial, and that your resulting 7 AnnData objects look right (you can compare with the [answer key history](https://usegalaxy.eu/u/wendi.bacon.training/h/cs2combining-datasets-after-pre-processing---input-1)), then you can use those! To avoid a million-line history, I recommend dragging the resultant datasets into a fresh history

{% snippet faqs/galaxy/histories_copy_dataset.md %}

2. **Importing from a history** - You can import [this history](https://usegalaxy.eu/u/wendi.bacon.training/h/cs3-answerkey)

{% snippet faqs/galaxy/histories_import.md %}

3. **Uploading from Zenodo** (see below)

> <hands-on-title>Option 3: Uploading from Zenodo</hands-on-title>
>
> 1. Create a new history for this tutorial
> 2. Import the AnnData object from [Zenodo]({{ page.zenodo_link }})
>
> ```
> {{ page.zenodo_link }}/files/Mito-counted_AnnData
> ```
>
> {% snippet faqs/galaxy/datasets_import_via_link.md %}
>
> 3. **Rename** {% icon galaxy-pencil %} the datasets `Mito-counted AnnData`
> 4. Check that the datatype is `h5ad`
>
> {% snippet faqs/galaxy/datasets_change_datatype.md datatype="h5ad" %}
>
{: .hands_on}

## Launching JupyterLab

Notebook's can be run in Galaxy using the JupyterLab tool. JupyterLab is an interactive development environment that allows users to create interactive workflows combining code, text descriptions, and visualisations.

> {% snippet faqs/galaxy/interactive_tools_jupyter_launch.md %}
> <warning-title>Save your data!</warning-title>
> Data saved in interactive notebooks only persist with the instance currently running, stopping JupyterLab will result in loosing any stored data. Regularly download any important files/data!
{: .warning}

## Prepare the notebook

You have two options for running the code in this tutorial, you can either download a completed version of the notebook from the overview box at the start of this tutorial or follow along and create the notebook yourself as you go.

> <hands-on-title>Option 1: Importing notebook from file</hands-on-title>
>
> 1. Download the notebook from the {% icon external-link %} **Supporting Materials** section in the overview box
>
> 2. Click the {% icon galaxy-upload %} **Upload Files** button in JupyterLab
>
> 3. Select the downloaded notebook ```filter_plot_and_explore.ipynb```
>
> 4. The notebook should appear on the left hand side, click on the file to open it (if prompted to select a kernel select ```Python```)
>
{: .hands_on}

> <hands-on-title>Option 2: Creating a new notebook</hands-on-title>
>
> 1. Under the **Notebook** section in the JupyterLab select ```Python 3```
>
> 2. Rename the new notebook from the left-hand side panel
>
{: .hands_on}

{% icon congratulations %} Congratulations! you now have JupyterLab running and can start the tutorial!
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
@article {Moreno2020.04.08.032698,
author = {Moreno, P. and Huang, N. and Manning, J.R. and Mohammed, S. and Solovyev, A. and Polanski, K. and Chazarra, R. and Talavera-Lopez, C. and Doyle, M. and Marnier, G. and Gr{\"u}ning, B. and Rasche, H. and Bacon, W. and Perez-Riverol, Y. and Haeussler, M. and Meyer, K.B. and Teichmann, S. and Papatheodorou, I.},
title = {User-friendly, scalable tools and workflows for single-cell analysis},
elocation-id = {2020.04.08.032698},
year = {2020},
doi = {10.1101/2020.04.08.032698},
publisher = {Cold Spring Harbor Laboratory},
abstract = {Single-cell RNA-Seq (scRNA-Seq) data analysis requires expertise in command-line tools, programming languages and scaling on compute infrastructure. As scRNA-Seq becomes widespread, computational pipelines need to be more accessible, simpler and scalable. We introduce an interactive analysis environment for scRNA-Seq, based on Galaxy, with ~70 functions from major single-cell analysis tools, which can be run on compute clusters, cloud providers or single machines, to bring compute to the data in scRNA-Seq.Competing Interest StatementThe authors have declared no competing interest.},
URL = {https://www.biorxiv.org/content/early/2020/04/09/2020.04.08.032698},
eprint = {https://www.biorxiv.org/content/early/2020/04/09/2020.04.08.032698.full.pdf},
journal = {bioRxiv}
}
@article{Bacon2018,
doi = {10.3389/fimmu.2018.02523},
url = {https://doi.org/10.3389/fimmu.2018.02523},
year = {2018},
month = nov,
publisher = {Frontiers Media {SA}},
volume = {9},
author = {Wendi A. Bacon and Russell S. Hamilton and Ziyi Yu and Jens Kieckbusch and Delia Hawkes and Ada M. Krzak and Chris Abell and Francesco Colucci and D. Stephen Charnock-Jones},
title = {Single-Cell Analysis Identifies Thymic Maturation Delay in Growth-Restricted Neonatal Mice},
journal = {Frontiers in Immunology}
}
@article{Satija2015,
doi = {10.1038/nbt.3192},
url = {https://doi.org/10.1038/nbt.3192},
year = {2015},
month = apr,
publisher = {Springer Science and Business Media {LLC}},
volume = {33},
number = {5},
pages = {495--502},
author = {Rahul Satija and Jeffrey A Farrell and David Gennert and Alexander F Schier and Aviv Regev},
title = {Spatial reconstruction of single-cell gene expression data},
journal = {Nature Biotechnology}
}
@article{Wolf2018,
doi = {10.1186/s13059-017-1382-0},
url = {https://doi.org/10.1186/s13059-017-1382-0},
year = {2018},
month = feb,
publisher = {Springer Science and Business Media {LLC}},
volume = {19},
number = {1},
author = {F. Alexander Wolf and Philipp Angerer and Fabian J. Theis},
title = {{SCANPY}: large-scale single-cell gene expression data analysis},
journal = {Genome Biology}
}
@article{Trapnell2014,
doi = {10.1038/nbt.2859},
url = {https://doi.org/10.1038/nbt.2859},
year = {2014},
month = mar,
publisher = {Springer Science and Business Media {LLC}},
volume = {32},
number = {4},
pages = {381--386},
author = {Cole Trapnell and Davide Cacchiarelli and Jonna Grimsby and Prapti Pokharel and Shuqiang Li and Michael Morse and Niall J Lennon and Kenneth J Livak and Tarjei S Mikkelsen and John L Rinn},
title = {The dynamics and regulators of cell fate decisions are revealed by pseudotemporal ordering of single cells},
journal = {Nature Biotechnology}
}
Loading

0 comments on commit e63a214

Please sign in to comment.