Differential RNA splicing analysis with single-cell/nucleus RNA-seq data¶
Before you start¶
- Map sc(sn)RNA-seq reads to the reference genome and keep a coordinate-sorted BAM/CRAM with
CB(cell barcode) andUB(UMI) tags. Tosa usesCBto select cells andUBto deduplicate molecules. - Download a gene annotation file of your interest in GTF format.
Installation¶
Follow the installation guide and activate the environment containing Shiba. The commands below use the Conda-installed launchers. For a source checkout, use the source invocation instead. These examples require the v1.0.0 implementation, including Tosa.
scShiba¶
1. Prepare inputs¶
experiment.tsv: A tab-separated table with one row per library. alignment points to a BAM or CRAM file; barcode points to the library's barcode/group table.
1 2 3 | |
barcodes.tsv is a tab-separated text file of barcode and group name like this. Barcodes must match the CB tags, including any suffix such as -1:
1 2 3 4 5 6 7 8 9 10 | |
Make sure to use tabs
If you copy and paste the above example, your experiment.tsv file may contain spaces instead of tabs, which will causes an error when you run scShiba. Please make sure that you are using a tab character between the columns.
config.yaml: A yaml file of the configuration.
This guide describes the Tosa-enabled v1.0.0 implementation. The v0.8.2 package
uses the earlier STARsolo SJ input. To try generated data from a source
checkout, run python test/make_sc_tosa_fixture.py /path/to/fixture from the
checkout root and use its config.yaml. This test helper is not packaged.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | |
- The working directory where the output files will be saved. Please make sure that you have write permission to this directory.
- The path to the gene annotation file in GTF format.
- The path to the
experiment.tsvfile. - Set to
Trueif you want to skip the differential analysis and only calculate PSI values for each sample. - Significance threshold for differential splicing analysis.
- Minimum difference in PSI values between groups to be considered significant.
- Reference group for differential splicing analysis.
- Alternative group for differential splicing analysis.
- Minimum number of reads required to calculate PSI values.
- Set to
Trueif you want to generate a file of splicing analysis results in excel format.
2. Run¶
1 | |
You are going to use 4 threads for parallelization. You can change the number of threads by changing the -p option.
Results now include PSI_RI.txt for intron-retention analysis, alongside the existing seven event types.
Did you encounter any problems?
You can run scShiba with the --verbose option to see the debug log. This will help you to find the problem.
1 | |
SnakeScShiba¶
A snakemake-based workflow of scShiba. This is useful for running scShiba on a cluster. Snakemake automatically parallelizes the jobs and manages the dependencies between them.
1. Prepare inputs¶
experiment.tsv: The same sample, alignment, barcode table used by scShiba.
config.yaml: A yaml file of the configuration. This is the same as the input for scShiba but with the addition of the container field.
The container reference below must resolve to a published release matching your source. Until that release is available, run Snakemake locally with the source environment or build docker/Dockerfile_develop and set container to your matching SIF image.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | |
- The working directory where the output files will be saved. Please make sure that you have write permission to this directory.
- The Docker image of Shiba.
- The path to the gene annotation file in GTF format.
- The path to the
experiment.tsvfile. - Set to
Trueif you want to skip the differential analysis and only calculate PSI values for each sample. - Significance threshold for differential splicing analysis.
- Minimum difference in PSI values between groups to be considered significant.
- Reference group for differential splicing analysis.
- Alternative group for differential splicing analysis.
- Minimum number of reads required to calculate PSI values.
- Set to
Trueif you want to generate a file of splicing analysis results in excel format.
2. Run¶
Install Snakemake and Apptainer/Singularity, set
SHIBA_HOME, and select a
matching container image as described in the installation guide.
For execution in the activated Conda environment, omit --use-singularity.
1 2 3 4 5 | |