Skip to content

Commit 123ffac

Browse files
polishing leafcutter documentation
1 parent 8a9df86 commit 123ffac

1 file changed

Lines changed: 32 additions & 15 deletions

File tree

docs/LEAFCUTTER/run.md

Lines changed: 32 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
### Run STAR:
1+
# leafcutter workflow
2+
3+
## Run STAR:
24

35
Align your samples in twopassMode for more accurate junction calling:
46

@@ -36,7 +38,7 @@ samtools index -@ 64 -M ${sample}_Aligned.sorted.bam
3638
```
3739

3840

39-
### Run regtools
41+
## Run regtools
4042

4143

4244
```bash
@@ -48,14 +50,19 @@ done
4850

4951
Repeat alignment for all samples. Leafcutter documentation recommends 4 samples per group mimimum.
5052

51-
### Download and Run leafcutter container
53+
## Download and Run leafcutter container
54+
55+
### Set cache dir and download container
5256

5357
```bash
5458
export SINGULARITY_CACHEDIR=$PWD/.singularity
5559
singularity pull --dir ./ leafcutter.sif docker://wilfriedguiblet/leafcutter:v0.1
5660
```
5761

58-
Create a juncfiles.txt. Example:
62+
### Create a juncfiles.txt
63+
64+
Example:
65+
5966
```
6067
Sample1_Aligned.sorted.bam.junc
6168
Sample2_Aligned.sorted.bam.junc
@@ -67,28 +74,35 @@ Sample7_Aligned.sorted.bam.junc
6774
Sample8_Aligned.sorted.bam.junc
6875
```
6976

70-
Download custom leafcutter:
77+
### Download custom leafcutter repository
7178

7279
git clone https://github.com/wilfriedguiblet/leafcutter.git
7380

7481

75-
Enter the container
82+
### Enter the container
83+
7684
```bash
77-
singularity shell -B $(pwd)/:/data2/,/data/RBL_NCI/:/data/RBL_NCI/ leafcutter.sif
85+
singularity shell -B $(pwd)/:/data2/ leafcutter.sif
86+
cd /data2/
7887
```
7988

80-
Cluster juncfiles
89+
### Cluster juncfiles
90+
8191
```bash
8292
python leafcutter/clustering/leafcutter_cluster_regtools.py -j juncfiles.txt -m 50 -o Experiment -l 500000
8393
```
8494

85-
Prep annotation for leafcutter
95+
### Prep annotation for leafcutter
96+
8697
```bash
8798
leafcutter/leafviz/gtf2leafcutter.pl -o gencode.v44 gencode.v44.annotation.gtf
8899
```
89100

90101

91-
Create groups_file.txt. Example:
102+
### Create groups_file.txt
103+
104+
Example:
105+
92106
```
93107
Sample1_Aligned.sorted.bam WT
94108
Sample2_Aligned.sorted.bam WT
@@ -100,27 +114,30 @@ Sample7_Aligned.sorted.bam KO
100114
Sample8_Aligned.sorted.bam KO
101115
```
102116

103-
Run leafcutter:
117+
### Run leafcutter
118+
104119
```bash
105120
Rscript leafcutter/scripts/leafcutter_ds.R --num_threads 64 Experiment_perind_numers.counts.gz groups_file.txt --min_samples_per_intron 4 --min_samples_per_group 4 -o Experiment
106121
```
107122

108-
Create RData file for leafviz:
123+
### Create RData file for leafviz
124+
109125
```bash
110-
Rscript ../../leafcutter/leafviz/prepare_results.R --meta_data_file groups_file.txt \
126+
Rscript leafcutter/leafviz/prepare_results.R --meta_data_file groups_file.txt \
111127
--code leafcutter Experiment_perind_numers.counts.gz \
112128
Experiment_cluster_significance.txt \
113129
Experiment_effect_sizes.txt \
114130
annotation_codes/gencode_v44/gencode.v44 \
115131
-o Experiment.RData
116132
```
117133

118-
Exit container. Run leafviz locally (for instance with RStudio)
134+
### Exit container. Run leafviz locally (for instance with RStudio)
135+
119136
```r
120137
options(shiny.host = "0.0.0.0")
121138
options(shiny.port = 3838)
122139
library(leafviz)
123-
leafviz("~/Lab_Work/CCRRBL-5/leafviz/Experiment.RData")
140+
leafviz("Experiment.RData")
124141
```
125142

126143

0 commit comments

Comments
 (0)