-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathUnmappedSTAR.sh
46 lines (41 loc) · 1.32 KB
/
UnmappedSTAR.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
#!/bin/bash
# Daniel Osorio
# Cai Lab | Department of Veterinary Integrative Biosciences
# Texas A&M University, College Station, TX.
# Verify the installation
if ! [ -x "$(command -v STAR)" ]; then
wget -nc https://github.com/alexdobin/STAR/archive/2.5.3a.tar.gz
tar -xzf 2.5.3a.tar.gz
cd STAR-2.5.3a/
if [[ "$OSTYPE" == "linux-gnu" ]]; then
export PATH=$(pwd)/bin/Linux_x86_64/:${PATH}
fi
if [[ "$OSTYPE" == "darwin"* ]]; then
export PATH=$(pwd)/bin/MacOSX_x86_64/:${PATH}
fi
cd ../
fi
# Download the genome data
wget -nc ftp://ftp.sanger.ac.uk/pub/gencode/Gencode_human/release_27/GRCh38.p10.genome.fa.gz
gunzip -k GRCh38.p10.genome.fa.gz
# Download the annotation data
wget -nc ftp://ftp.sanger.ac.uk/pub/gencode/Gencode_human/release_27/gencode.v27.annotation.gtf.gz
gunzip -k gencode.v27.annotation.gtf.gz
# STAR index
mkdir genomeDir
STAR --runThreadN 20 \
--runMode genomeGenerate \
--genomeDir genomeDir \
--genomeFastaFiles GRCh38.p10.genome.fa \
--sjdbGTFfile gencode.v27.annotation.gtf \
--sjdbOverhang 99
# STAR mapping
for eachFile in `ls $1`
do
STAR --runThreadN 20 \
--runMode alignReads \
--genomeDir genomeDir \
--readFilesIn $eachFile \
--sjdbGTFfile gencode.v27.annotation.gtf \
--outReadsUnmapped Fastx
done