-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathslurm_star_dcc_mates.sh
executable file
·68 lines (57 loc) · 1.8 KB
/
slurm_star_dcc_mates.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
56
57
58
59
60
61
62
63
64
65
66
67
68
#!/bin/bash
# @Author: Tobias Jakobi <tjakobi>
# @Date: Friday, May 6, 2016 4:10 PM
# @Email: tobias.jakobi@med.uni-heidelberg.de
# @Project: University Hospital Heidelberg, Section of Bioinformatics and Systems Cardiology
# @Last modified by: tjakobi
# @Last modified time: Friday, May 6, 2016 4:22 PM
# @License: CC BY-NC-SA
#SBATCH -n 1
#SBATCH -N 1
#SBATCH -c 5
#SBATCH --mem=200G
#SBATCH -J "STAR genome alignment"
module load star
# check if we have 5 arguments
if [ ! $# == 5 ]; then
echo "Usage: $0 [STAR index] [Read file] [target dir e.g. /tmp/] [GTF file] [Mate ID e.g. 1]"
exit
fi
# $1 -> Genome index
# $2 -> Read 1
# $3 -> Read 2
target=`expr ${2/$5/} : '\(.*\)\..*\.'`
# create the target directory, STAR will not do that for us
folder=$3/${target}_mate$5
echo $folder
mkdir -pv $folder
STAR --readFilesCommand zcat\
--runThreadN 5\
--genomeDir $1\
--outSAMtype BAM Unsorted SortedByCoordinate\
--readFilesIn $2\
--outFileNamePrefix $folder/\
--outReadsUnmapped Fastx \
--quantMode GeneCounts\
--genomeLoad NoSharedMemory\
--outWigType bedGraph\
--outReadsUnmapped Fastx\
--outSJfilterOverhangMin 15 15 15 15\
--alignSJoverhangMin 15\
--alignSJDBoverhangMin 10\
--outFilterMultimapNmax 20\
--outFilterScoreMin 1\
--outFilterMismatchNmax 999\
--outFilterMismatchNoverLmax 0.05\
--outFilterMatchNminOverLread 0.7\
--alignIntronMin 20\
--alignIntronMax 1000000\
--alignMatesGapMax 1000000\
--chimSegmentMin 15\
--chimScoreMin 15\
--chimScoreSeparation 10\
--chimJunctionOverhangMin 15\
--twopassMode Basic\
--alignSoftClipAtReferenceEnds No\
--outSAMattributes NH HI AS nM NM MD jM jI XS\
--sjdbGTFfile $4