-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFreePSI.sh
60 lines (50 loc) · 1.59 KB
/
FreePSI.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
#!/bin/bash
set -e
# Provide the directory containing Jellyfish (usually named as 'bin')
Jellyfish=/usr/bin
# Provide the directory containing FreePSI
# E.g.
#FreePSI=../bin
FreePSI=../bin
if [ -z ${Jellyfish} ]; then
echo "Error: Please modify me to provide the directory containing Jellyfish"
exit;
fi
if [ -z ${FreePSI} ]; then
echo "Error: Please modify me to provide the directory containing FreePSI"
exit;
fi
GENOME_DIR=./genome
BND_FILE=./annotation/hg38_refGene_exonBoundary_chr21.bed
READS=RNA-seq
K=27
THREAD=4
set -x
# Count k-mers in RNA-seq reads using jellyfish
${Jellyfish}/jellyfish count -m ${K} -s 100M -t ${THREAD} -Q 5 ${READS}/reads_final.1.fastq -o ${READS}/reads.1.jf
${Jellyfish}/jellyfish dump ${READS}/reads.1.jf -o ${READS}/reads.1.fa
${Jellyfish}/jellyfish count -m ${K} -s 100M -t ${THREAD} -Q 5 ${READS}/reads_final.2.fastq -o ${READS}/reads.2.jf
${Jellyfish}/jellyfish dump ${READS}/reads.2.jf -o ${READS}/reads.2.fa
# Produce raw estimates of PSI values using FreePSI
#Build
${FreePSI}/freePSI build\
-k $K -p ${THREAD} \
-g ${GENOME_DIR} \
-a ${BND_FILE} \
-1 ${READS}/reads.1.fa \
-2 ${READS}/reads.2.fa \
-o ./hashtable.json
#Quant
${FreePSI}/freePSI quant\
-k $K -p ${THREAD} \
-i ./hashtable.json \
-o .
# Post-process the raw estimates of PSI values
python3 ${FreePSI}/postProc.py \
./psi_freePSI_raw.json \
./psi_freePSI.json
# Summarize the PSI values into a readable file
python3 ${FreePSI}/summary.py \
./annotation/hg38_refGene_exonBoundary_chr21.bed \
./psi_freePSI.json \
./psi_freePSI.summary