forked from akahanaton/multiz
-
Notifications
You must be signed in to change notification settings - Fork 0
/
snake.eptFus2.eonSpe2.qsub.sh
executable file
·72 lines (63 loc) · 3.08 KB
/
snake.eptFus2.eonSpe2.qsub.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
#!/bin/bash
#--------------------------------------------------
# cd $PBS_O_WORKDIR
#--------------------------------------------------
#--------------------------------------------------
# for queryDir in `ls -d batsGenome/[[:lower:]]*[[:upper:]]*`
#--------------------------------------------------
for queryDir in `ls -d batsGenome/eptFus`
do
queryID="`basename $queryDir`2"
queryDone="$queryDone$queryID"
echo $queryDone
genomic=`basename $queryDir/*genomic.fa`
nibQueryDir="$queryDir/$queryID.nib2"
#--------------------------------------------------
# for targetDir in `ls -d batsGenome/[[:lower:]]*[[:upper:]]* ucsc/hg38`
#--------------------------------------------------
for targetDir in `ls -d batsGenome/eonSpe`
do
targetID=`basename $targetDir`
if [ $targetID != "hg38" ]; then
targetID=$targetID"2"
fi
if [[ $queryID == $targetID || $queryDone == *"$targetID"* ]]; then continue; fi
snakeDir="snake.$queryID.$targetID"
if [ -e $snakeDir ]; then
echo $snakeDir
for snake in ./$snakeDir/*.snake
do
chrID=`basename $snake .snake`
if [ -e $chainQueryDir/merge/$chrID.chain ]; then continue; fi
lavQueryDir="$queryDir/$queryID.$targetID.lav"
pslQueryDir="$queryDir/$queryID.$targetID.psl"
chainQueryDir="$queryDir/$queryID.$targetID.chain"
if [ ! -e $lavQueryDir ]; then mkdir $lavQueryDir; fi
if [ ! -e $pslQueryDir ]; then mkdir $pslQueryDir; fi
if [ ! -e $chainQueryDir ]; then mkdir $chainQueryDir; fi
if [ ! -e $lavQueryDir/$chrID ]; then mkdir $lavQueryDir/$chrID; fi
if [ ! -e $pslQueryDir/$chrID ]; then mkdir $pslQueryDir/$chrID; fi
if [ ! -e $chainQueryDir/$chrID ]; then mkdir $chainQueryDir/$chrID; fi
if [ ! -e $chainQueryDir/merge ]; then mkdir $chainQueryDir/merge; fi
if [ ! -e $chainQueryDir/sort ]; then mkdir $chainQueryDir/sort; fi
#--------------------------------------------------
# snakemake -q -j 40 --cluster "qsub -o /dev/null -j oe -d '/synology/Ming/reference_genomes2'" -s $snake
#--------------------------------------------------
snakemake -q -j 400 --cluster "qsub -o /dev/null -j y" -s $snake
#--------------------------------------------------
# cd $chainQueryDir/$chrID
# qsub -o /dev/null chainMergeSort *.chain > ../merge/$chrID.chain
# cd -
#--------------------------------------------------
find $lavQueryDir/$chrID -delete &
find $pslQueryDir/$chrID -delete &
find $chainQueryDir/$chrID -delete &
find ./.snakemake/code_tracking -type f -atime 0.05 -delete &
find ./.snakemake/input_tracking -type f -atime 0.05 -delete &
find ./.snakemake/params_tracking -type f -atime 0.05 -delete &
find ./.snakemake/rule_tracking -type f -atime 0.05 -delete &
find ./.snakemake/shellcmd_tracking -type f -atime 0.05 -delete &
done
fi
done
done