-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsplicing_detection_02_LeafCutter.sh
executable file
·57 lines (40 loc) · 1.38 KB
/
splicing_detection_02_LeafCutter.sh
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#!/bin/bash
#===============================================================================
# Params to splicing detection with Leafcutter for one sample
#===============================================================================
fastq_R1=/path/fastq_R1.fastq
fastq_R2=/path/fastq_R2.fastq
outprefix=sample
#===============================================================================
# Run STAR
#===============================================================================
/code/STAR \
--genomeDir /code/refs/genome_SJ/ \
--genomeLoad NoSharedMemory \
--twopassMode Basic \
--outSAMstrandField intronMotif \
--readFilesCommand 'gzip -d -f -c' \
--readFilesIn $fastq_R1 $fastq_R2 \
--runThreadN 12 \
--outFileNamePrefix $outprefix"_" \
--outSAMtype BAM Unsorted
#===============================================================================
# Run Leafcutter
#===============================================================================
bamfile=$outprefix"_"Aligned.out.sorted.bam
junc_file=$outprefix"_"Aligned.out.bam.junc
# s needs to be chosen based on onput file
/code/regtools junctions extract \
-a 8 \
-m 50 \
-M 500000 \
${bamfile_sorted} \
-o ${junc_file} \
-s 1
echo ${junc_file} >> test_juncfiles.txt
python /code/leafcutter_cluster_regtools.py \
-j test_juncfiles.txt \
-m 50 \
-o $outprefix \
-l 500000 \
--checkchrom