Skip to content

Commit

Permalink
Merge pull request #82 from Mayrlab/dev
Browse files Browse the repository at this point in the history
Milestone v0.4.1
  • Loading branch information
mfansler committed May 20, 2024
2 parents 5b440bb + dc319bf commit 876264d
Show file tree
Hide file tree
Showing 8 changed files with 52 additions and 56 deletions.
14 changes: 11 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
# scUTRquant
A bioinformatics pipeline for single-cell 3' UTR isoform quantification.

The accompanying manuscript is openly available at:

> Fansler, M.M., Mitschka, S. & Mayr, C. Quantifying 3′UTR length from scRNA-seq data reveals changes independent of gene expression. *Nat Commun* **15**, 4050 (2024). [https://doi.org/10.1038/s41467-024-48254-9](https://doi.org/10.1038/s41467-024-48254-9)
# Overview
The **scUTRquant** pipeline builds on `kallisto bus` to provide a reusable tool for
quantifying 3' UTR isoforms from 3'-end tag-based scRNA-seq datasets. The pipeline
Expand Down Expand Up @@ -202,6 +206,11 @@ On GitHub runners with 2-3 cores, these examples have typical execution times of
On HPC systems with multiple nodes with multiple cores, a large job (e.g., 1-2TB raw data)
can process in under an hour when properly configured.

## Full Examples
The inputs used to process data in [the manuscript][ref:scUTRquant] are also available in the
[scUTRquant-inputs repository](https://github.com/Mayrlab/scUTRquant-inputs).
These also include individual Snakemake pipelines to download atlas-scale datasets.

# File Specifications
## Configuration File

Expand Down Expand Up @@ -318,12 +327,11 @@ snakemake --profile profile_name --configfile examples/neuron_1k_v3_fastq/config
# Citation
Fansler, M. M., Mitschka, S., & Mayr, C. (2023). Comprehensive annotation of 3′UTRs from primary cells and their quantification from scRNA-seq data.
*bioRxiv*, 2021.11.22.469635. https://doi.org/10.1101/2021.11.22.469635
Fansler, M.M., Mitschka, S. & Mayr, C. Quantifying 3′UTR length from scRNA-seq data reveals changes independent of gene expression. *Nat Commun* **15**, 4050 (2024). [https://doi.org/10.1038/s41467-024-48254-9](https://doi.org/10.1038/s41467-024-48254-9)
<!-- References -->
[ref:scUTRquant]: https://doi.org/10.1101/2021.11.22.469635
[ref:scUTRquant]: https://doi.org/10.1038/s41467-024-48254-9
[ref:snakemake]: https://snakemake.readthedocs.io/en/stable/index.html
[ref:txcutr]: https://doi.org/doi:10.18129/B9.bioc.txcutr
2 changes: 1 addition & 1 deletion Snakefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
container: "docker://mfansler/scutr-quant:0.1.5"
container: "docker://mfansler/scutr-quant:0.4.0"
configfile: "config.yaml"

import os
Expand Down
31 changes: 7 additions & 24 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,26 +1,9 @@
FROM --platform=linux/amd64 condaforge/mambaforge:4.10.3-3

SHELL ["/bin/bash", "--login", "-c"]

# Install custom kallisto build
COPY kallisto-build.yaml .
RUN mamba env create -f kallisto-build.yaml -n kallisto-build \
&& git clone -b stranded --single-branch https://github.com/mfansler/kallisto.git /tmp/kallisto \
&& mkdir -p /tmp/kallisto/build && cd /tmp/kallisto/build \
&& . /opt/conda/etc/profile.d/conda.sh \
&& conda activate kallisto-build \
&& cmake /tmp/kallisto && make && make install \
&& cd $HOME && rm -rf /tmp/kallisto \
&& conda deactivate \
&& mamba env remove -n kallisto-build -y \
&& mamba clean -qafy

# readr needs timezone info
RUN apt-get update > /dev/null \
&& DEBIAN_FRONTEND="noninteractive" apt-get install --no-install-recommends -y tzdata > /dev/null \
&& apt-get clean
FROM --platform=linux/amd64 mambaorg/micromamba:1.5.8

# Install required packages in base
COPY scutr-quant.yaml .
RUN mamba env update -n base -f scutr-quant.yaml \
&& mamba clean -qafy
COPY --chown=$MAMBA_USER:$MAMBA_USER scutr-quant.yaml /tmp/scutr-quant.yaml
RUN micromamba install -yn base -f /tmp/scutr-quant.yaml \
&& micromamba clean -qafy

# Put base bin on PATH
ENV PATH "$MAMBA_ROOT_PREFIX/bin:$PATH"
13 changes: 0 additions & 13 deletions docker/kallisto-build.yaml

This file was deleted.

28 changes: 21 additions & 7 deletions docker/scutr-quant.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,26 @@ channels:
- conda-forge
- bioconda
- defaults
- merv
dependencies:
## downloading
- gzip
- tar
- wget

## kallisto-bustools
- merv::kallisto=0.46.2sq
- bustools=0.40.0
- r-base=4.0
- r-tidyverse=1.3
- r-cowplot=1.1
- bioconductor-singlecellexperiment=1.10
- bioconductor-plyranges=1.8
- xorg-libxt
- fonts-conda-ecosystem

## sce + reporting
- r-base=4.1
- r-dplyr=1.0
- r-ggplot2=3.3
- r-matrix=1.4
- r-readr=2.1
- r-rmarkdown=2.14
- r-stringr=1.4
- bioconductor-hdf5array=1.22
- bioconductor-singlecellexperiment=1.16
- bioconductor-plyranges=1.14
- openssl=1
8 changes: 4 additions & 4 deletions extdata/targets/targets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ utrome_mm10_v2:
gtf: "utrome.e30.t5.gc25.pas3.f0.9999.w500.gtf"
kdx: "utrome.e30.t5.gc25.pas3.f0.9999.w500.kdx"
merge_tsv: "utrome.e30.t5.gc25.pas3.f0.9999.w500.m200.tsv"
tx_annots: "utrome_txs_annotation.Rds"
gene_annots: "utrome_genes_annotation.Rds"
tx_annots: "utrome_mm10_v2_tx_annots.2024.05.13.Rds"
gene_annots: "utrome_mm10_v2_gene_annots.2024.05.13.Rds"
download_script: "download_utrome.sh"

utrome_hg38_v1:
Expand All @@ -24,8 +24,8 @@ utrome_hg38_v1:
gtf: "utrome.e30.t5.gc39.pas3.f0.9999.w500.gtf"
kdx: "utrome.e30.t5.gc39.pas3.f0.9999.w500.kdx"
merge_tsv: "utrome.e30.t5.gc39.pas3.f0.9999.w500.m200.tsv"
tx_annots: "utrome_txs_annotation.Rds"
gene_annots: "utrome_genes_annotation.Rds"
tx_annots: "utrome_hg38_v1_tx_annots.2024.05.13.Rds"
gene_annots: "utrome_hg38_v1_gene_annots.2024.05.13.Rds"
download_script: "download_utrome.sh"

## example custom target using GENCODE
Expand Down
6 changes: 4 additions & 2 deletions extdata/targets/utrome_hg38_v1/download_utrome.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ wget -O tmp.tar.gz "https://figshare.com/ndownloader/files/35874803?private_link

# hg38 Annotations
## txs
wget -O utrome_txs_annotation.Rds "https://figshare.com/ndownloader/files/36741828?private_link=9f97fd9772574bee6a61"
wget -O utrome_hg38_v1_tx_annots.2024.05.13.csv.gz "https://figshare.com/ndownloader/files/46407826?private_link=9f97fd9772574bee6a61"
wget -O utrome_hg38_v1_tx_annots.2024.05.13.Rds "https://figshare.com/ndownloader/files/46407829?private_link=9f97fd9772574bee6a61"

## genes
wget -O utrome_genes_annotation.Rds "https://figshare.com/ndownloader/files/36741825?private_link=9f97fd9772574bee6a61"
wget -O utrome_hg38_v1_gene_annots.2024.05.13.csv.gz "https://figshare.com/ndownloader/files/46407820?private_link=9f97fd9772574bee6a61"
wget -O utrome_hg38_v1_gene_annots.2024.05.13.Rds "https://figshare.com/ndownloader/files/46407823?private_link=9f97fd9772574bee6a61"
6 changes: 4 additions & 2 deletions extdata/targets/utrome_mm10_v2/download_utrome.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ wget -O tmp.tar.gz "https://figshare.com/ndownloader/files/36677958?private_link

# mm10 Annotations
## txs
wget -O utrome_txs_annotation.Rds "https://figshare.com/ndownloader/files/36741822?private_link=78bbfa3c5e58a8cc5275"
wget -O utrome_mm10_v2_tx_annots.2024.05.13.csv.gz "https://figshare.com/ndownloader/files/46407730?private_link=78bbfa3c5e58a8cc5275"
wget -O utrome_mm10_v2_tx_annots.2024.05.13.Rds "https://figshare.com/ndownloader/files/46407733?private_link=78bbfa3c5e58a8cc5275"

## genes
wget -O utrome_genes_annotation.Rds "https://figshare.com/ndownloader/files/36741819?private_link=78bbfa3c5e58a8cc5275"
wget -O utrome_mm10_v2_gene_annots.2024.05.13.csv.gz "https://figshare.com/ndownloader/files/46407724?private_link=78bbfa3c5e58a8cc5275"
wget -O utrome_mm10_v2_gene_annots.2024.05.13.Rds "https://figshare.com/ndownloader/files/46407727?private_link=78bbfa3c5e58a8cc5275"

0 comments on commit 876264d

Please sign in to comment.