-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSIPcmd.sh
110 lines (110 loc) · 2.96 KB
/
SIPcmd.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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
#!/bin/bash
source ~/miniconda3/etc/profile.d/conda.sh
binPath=YOUR_BINARY_PATH
case $1 in
"mkdir")
mkdir configs raw ft sip fasta
${binPath}/configGenerator -i C13.cfg -o configs -e C
;;
"mkdb")
conda activate r
Rscript ${binPath}/makeDBforLabelSearch.R \
-pro YOUR_PATH/*.pro.txt \
-faa YOUR_PATH/db.fasta \
-o fasta/db.faa
;;
"convert")
source ~/miniconda3/etc/profile.d/conda.sh
conda activate mono
mono ${binPath}/Raxport.exe -i raw -o ft
;;
"clean")
rm -r sip/* configs/*
;;
"run")
echo "Search database"
conda activate mpi
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${CONDA_PREFIX}/lib
export OMP_NUM_THREADS=10
time mpirun -np 16 $binPath/SiprosV3mpi \
-g configs \
-w ft \
-o sip
echo "Filter PSM"
conda activate py2
time python ${binPath}/scripts/sipros_peptides_filtering.py \
-c C13.cfg \
-w sip
wait
python ${binPath}/scripts/sipros_peptides_assembling.py \
-c C13.cfg \
-w sip
wait
python ${binPath}/scripts/ClusterSip.py \
-c C13.cfg \
-w sip
wait
Rscript ${binPath}/refineProteinFDR.R \
-pro sip/*.pro.txt \
-psm sip/*.psm.txt \
-fdr 0.01 \
-o sip/YOUR_FILE_NAME
wait
Rscript ${binPath}/getLabelPCTinEachFT.R \
-pro sip/YOUR_FILE_NAME.proRefineFDR.txt \
-psm sip/*.psm.txt \
-thr 5 \
-o sip/YOUR_FILE_NAME
filter() {
mkdir $1
cp sip/*$1*.sip $1
python ${binPath}/scripts/sipros_peptides_filtering.py \
-c C13.cfg \
-w $1
wait
python ${binPath}/scripts/sipros_peptides_assembling.py \
-c C13.cfg \
-w $1
wait
python ${binPath}/scripts/ClusterSip.py \
-c C13.cfg \
-w $1
wait
}
files=(ft/*.FT2)
files=($(echo "${files[@]}" | tr ' ' '\n' | cut -d '/' -f2 | tr '\n' ' '))
files=($(echo "${files[@]}" | tr ' ' '\n' | cut -d '.' -f1 | tr '\n' ' '))
files=($(echo "${files[@]}" | tr ' ' '\n' | sort -u | tr '\n' ' '))
for folder in ${files[@]}; do
filter "$folder" &
done
wait
;;
"filter")
conda activate python2
filter() {
mkdir $1
cp sip/*$1*.sip $1
python ${binPath}/scripts/sipros_peptides_filtering.py \
-c C13.cfg \
-w $1
python ${binPath}/scripts/sipros_peptides_assembling.py \
-c C13.cfg \
-w $1
python ${binPath}/scripts/ClusterSip.py \
-c C13.cfg \
-w $1
}
files=(raw/*.raw)
files=($(echo "${files[@]}" | tr ' ' '\n' | cut -d '/' -f2 | tr '\n' ' '))
files=($(echo "${files[@]}" | tr ' ' '\n' | cut -d '.' -f1 | tr '\n' ' '))
files=($(echo "${files[@]}" | tr ' ' '\n' | sort -u | tr '\n' ' '))
for folder in ${files[@]}; do
filter "$folder" &
done
wait
;;
*)
./SIPcmd.sh "run"
;;
esac