Biowulf High Performance Computing at the NIH
LeafCutter on Biowulf

Leafcutter quantifies RNA splicing variation using short-read RNA-seq data. The core idea is to leverage spliced reads (reads that span an intron) to quantify (differential) intron usage across samples.

References:

Documentation
Important Notes

Interactive job
Interactive jobs should be used for debugging, graphics, or applications that cannot be run as batch jobs.

Allocate an interactive session and run the program.
Sample session (user input in bold):

[user@biowulf]$ sinteractive --cpus-per-task=8
salloc.exe: Pending job allocation 46116226
salloc.exe: job 46116226 queued and waiting for resources
salloc.exe: job 46116226 has been allocated resources
salloc.exe: Granted job allocation 46116226
salloc.exe: Waiting for resource configuration
salloc.exe: Nodes cn3144 are ready for job

[user@cn3144 ~]$ module load leafcutter
[user@cn3144 ~]$ tar -xzvf $LEAFCUTTER_EXAMPLES/example_geuvadis.tar.gz
...
[user@cn3144 ~]$ for bamfile in `ls run/geuvadis/*.bam`
do
    echo Converting $bamfile to $bamfile.junc
    bam2junc.sh $bamfile $bamfile.junc
    echo $bamfile.junc >> test_juncfiles.txt
done
...
[user@cn3144 ~]$ leafcutter_cluster.py -j test_juncfiles.txt -m 50 -o testYRIvsEU -l 500000
...
[user@cn3144 ~]$ echo "RNA.NA18486_YRI.chr1.bam YRI
RNA.NA18487_YRI.chr1.bam YRI
RNA.NA18488_YRI.chr1.bam YRI
RNA.NA18489_YRI.chr1.bam YRI
RNA.NA18498_YRI.chr1.bam YRI
RNA.NA06984_CEU.chr1.bam CEU
RNA.NA06985_CEU.chr1.bam CEU
RNA.NA06986_CEU.chr1.bam CEU
RNA.NA06989_CEU.chr1.bam CEU
RNA.NA06994_CEU.chr1.bam CEU" > test_diff_intron.txt
[user@cn3144 ~]$ leafcutter_ds.R -p 4 \
 -e $LEAFCUTTER_HOME/leafcutter/data/gencode19_exons.txt.gz \
 testYRIvsEU_perind_numers.counts.gz \
 test_diff_intron.txt
...
[user@cn3144 ~]$ ds_plots.R -e $LEAFCUTTER_HOME/leafcutter/data/gencode19_exons.txt.gz \
 testYRIvsEU_perind_numers.counts.gz \
 test_diff_intron.txt \
 leafcutter_ds_cluster_significance.txt \
 -f 0.05
...
[user@cn3144 ~]$ exit
salloc.exe: Relinquishing job allocation 46116226
[user@biowulf ~]$

Batch job
Most jobs should be run as batch jobs.

Create a batch input file (e.g. leafcutter.sh). For example:

#!/bin/bash
module load leafcutter
leafcutter_cluster.py -j test_juncfiles.txt -m 50 -o testYRIvsEU -l 500000

Submit this job using the Slurm sbatch command.

sbatch [--cpus-per-task=#] [--mem=#] leafcutter.sh