From ed9d4edd159d790788b5150402423123b3772072 Mon Sep 17 00:00:00 2001 From: Shaojun Xie Date: Mon, 25 Nov 2024 17:29:51 -0500 Subject: [PATCH] Add docs/BIOI611_scRNA_seq_cele_cellranger.ipynb --- docs/BIOI611_scRNA_seq_cele_cellranger.ipynb | 192 +++++++++++++++++++ 1 file changed, 192 insertions(+) create mode 100644 docs/BIOI611_scRNA_seq_cele_cellranger.ipynb diff --git a/docs/BIOI611_scRNA_seq_cele_cellranger.ipynb b/docs/BIOI611_scRNA_seq_cele_cellranger.ipynb new file mode 100644 index 0000000..522c375 --- /dev/null +++ b/docs/BIOI611_scRNA_seq_cele_cellranger.ipynb @@ -0,0 +1,192 @@ +{ + "nbformat": 4, + "nbformat_minor": 0, + "metadata": { + "colab": { + "provenance": [], + "authorship_tag": "ABX9TyM1qw4hoF2m/f1TZvaSuigX", + "include_colab_link": true + }, + "kernelspec": { + "name": "python3", + "display_name": "Python 3" + }, + "language_info": { + "name": "python" + } + }, + "cells": [ + { + "cell_type": "markdown", + "metadata": { + "id": "view-in-github", + "colab_type": "text" + }, + "source": [ + "\"Open" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "id": "ld1dk0-eu0yH" + }, + "outputs": [], + "source": [] + }, + { + "cell_type": "markdown", + "source": [ + "#\n", + "\n", + "## Data availability\n", + "\n", + "Data can be obtained from the link below:\n", + "https://www.ncbi.nlm.nih.gov/geo/query/acc.cgi?acc=GSE126954\n", + "\n", + "An copy of the data has been stored here:\n", + "/scratch/zt1/project/bioi611/shared/raw_data/10x_cele_data/scRNA/\n", + "\n", + "\n", + "1. If you want to download and prepare the files yourself,\n", + "\n", + "\n", + "\n", + "here is the process:\n", + "\n", + "For each sample, fetch the sra files using `prefectch`\n", + "\n", + "For example:\n", + "\n", + "```\n", + "prefetch SRR8611967\n", + "```\n", + "\n", + "2. Convert sra file to fastq files\n", + "\n", + "```\n", + "\n", + "```\n" + ], + "metadata": { + "id": "wp0tDwoeu5A6" + } + }, + { + "cell_type": "markdown", + "source": [ + "## Prepare the genome\n", + "\n", + "You don't need to run this step. The content in this part is to show you if you want to prepare the reference genome for cellranger, how you can prepare." + ], + "metadata": { + "id": "XLHnr3OBxtzk" + } + }, + { + "cell_type": "markdown", + "source": [ + "\n", + "```\n", + "## /scratch/zt1/project/bioi611/shared/reference/cellranger_mkref/\n", + "$ cat /scratch/zt1/project/bioi611/shared/reference/cellranger_mkref/scRNA_cellranger_mkref.sub\n", + "#!/bin/bash\n", + "#SBATCH --partition=standard\n", + "#SBATCH -t 40:00:00\n", + "#SBATCH -n 1\n", + "#SBATCH -c 26\n", + "#SBATCH --mem=250g\n", + "#SBATCH --job-name=scRNA_cellranger_mkref\n", + "#SBATCH --mail-type=FAIL,BEGIN,END\n", + "#SBATCH --error=%x-%J-%u.err\n", + "#SBATCH --output=%x-%J-%u.out\n", + "export PATH=/scratch/zt1/project/bioi611/shared/software/cellranger-8.0.1/bin:$PATH\n", + "cellranger mkgtf ../Caenorhabditis_elegans.WBcel235.111.gtf \\\n", + " Caenorhabditis_elegans.WBcel235.111.filtered.gtf \\\n", + " --attribute=gene_biotype:protein_coding > scRNA_cellranger_mkref.filter_gtf.log 2>&1\n", + "cellranger mkref --genome=Caenorhabditis_elegans_genome \\\n", + " --fasta=../Caenorhabditis_elegans.WBcel235.dna.toplevel.fa \\\n", + " --genes=Caenorhabditis_elegans.WBcel235.111.filtered.gtf \\\n", + " > scRNA_cellranger_mkref.log 2>&1 \n", + "```" + ], + "metadata": { + "id": "VPE4Lf7VziX-" + } + }, + { + "cell_type": "markdown", + "source": [ + "## Run `cellranger count`" + ], + "metadata": { + "id": "9kSwjmf4yyLy" + } + }, + { + "cell_type": "markdown", + "source": [ + "```\n", + "sbatch /scratch/zt1/project/bioi611/shared/scripts/scRNA_10x_cele_cellranger_count.Uwsync_300min.sub\n", + "sbatch /scratch/zt1/project/bioi611/shared/scripts/scRNA_10x_cele_cellranger_count.Uwsync_400min.sub\n", + "sbatch /scratch/zt1/project/bioi611/shared/scripts/scRNA_10x_cele_cellranger_count.Uwsync_500min.sub\n", + "```" + ], + "metadata": { + "id": "D-3wIPjgxt3E" + } + }, + { + "cell_type": "markdown", + "source": [ + "## Aggregate the `cellranger count` results" + ], + "metadata": { + "id": "X4gkK-Wny1vG" + } + }, + { + "cell_type": "markdown", + "source": [ + "Many experiments generate data for multiple samples. Depending on the experimental design, these samples may represent replicates from the same set of cells, cells from different tissues or time points from the same individual, or cells from different individuals. These samples could be processed through various Gel Bead-in Emulsion (GEM) wells wells or multiplexed within the same GEM well on Chromium instruments.\n", + "\n", + "To work with data from multiple GEM wells, you can aggregate and analyze the outputs from multiple runs of each of these pipelines using `cellranger aggr`." + ], + "metadata": { + "id": "ztWC52azyqum" + } + }, + { + "cell_type": "markdown", + "source": [ + "```\n", + "sbatch /scratch/zt1/project/bioi611/shared/scripts/scRNA_10x_cele_cellranger_aggr.sub\n", + "```" + ], + "metadata": { + "id": "JF7K8exAyNry" + } + }, + { + "cell_type": "code", + "source": [], + "metadata": { + "id": "JxBOZbI4xsE4" + }, + "execution_count": null, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "\n" + ], + "metadata": { + "id": "EeibAuVev0Na" + }, + "execution_count": null, + "outputs": [] + } + ] +} \ No newline at end of file