2 #$ -v PERL5LIB,PATH,PYTHONPATH,LD_LIBRARY_PATH
3 #$ -cwd -r y -l vf=3.2g,p=5
5 #$ -S /bin/bash -t 1-20
7 MY_HOST
=`/bin/hostname`
10 echo "================================================================"
11 echo JOB_NAME
=$JOB_NAME
13 echo SGE_TASK_ID
=$SGE_TASK_ID
14 echo SGE_TASK_FIRST
=$SGE_TASK_FIRST
15 echo SGE_TASK_LAST
=$SGE_TASK_LAST
18 echo SGE_CWD_PATH
=$SGE_CWD_PATH
20 echo SGE_STDIN_PATH
=$SGE_STDIN_PATH
21 echo SGE_STDOUT_PATH
=$SGE_STDOUT_PATH
22 echo SGE_STDERR_PATH
=$SGE_STDERR_PATH
23 echo SGE_O_HOST
=$SGE_O_HOST
24 echo SGE_O_PATH
=$SGE_O_PATH
25 echo "================================================================"
27 echo "Running job JOB_NAME=$JOB_NAME task SGE_TASK_ID=$SGE_TASK_ID on $MY_HOST at $MY_DATE"
28 echo "Running job JOB_NAME=$JOB_NAME task SGE_TASK_ID=$SGE_TASK_ID on $MY_HOST at $MY_DATE" >out
/p
/$MAIN.samlog
31 SEED
=$
(/bin
/sed -n -e "${SGE_TASK_ID} p" $SEEDFILE)
32 PATH
=$
(/bin
/sed -n -e "${SGE_TASK_ID} p" $SEEDFILE|
/bin
/awk -F"\t" '{print $1}')
33 MAIN
=$
(/bin
/sed -n -e "${SGE_TASK_ID} p" $SEEDFILE|
/bin
/awk -F"\t" '{print $2}')
34 /usr
/local
/bin
/bwa aln
-l 17 -q 10 -t 6 cat62
$PATH/$MAIN.1.fq.gz
>out
/p
/$MAIN.1.sai
2>>out
/p
/$MAIN.samlog
35 /bin
/date >> out
/p
/$MAIN.samlog
36 /usr
/local
/bin
/bwa aln
-l 17 -q 10 -t 6 cat62
$PATH/$MAIN.2.fq.gz
>out
/p
/$MAIN.2.sai
2>>out
/p
/$MAIN.samlog
37 /bin
/date >> out
/p
/$MAIN.samlog
38 /usr
/local
/bin
/bwa sampe
-a 800 cat62 out
/p
/$MAIN.1.sai out
/p
/$MAIN.2.sai
$PATH/$MAIN.1.fq.gz
$PATH/$MAIN.2.fq.gz
2>>out
/p
/$MAIN.samlog |
/bin
/gzip -9c >out
/p
/$MAIN.rawsam.gz
39 /bin
/date >> out
/p
/$MAIN.samlog
40 /usr
/bin
/perl ng
/pickR1orR2XTUreads.pl out
/p
/$MAIN.rawsam.gz out
/p
/$MAIN.sam.gz
41 /bin
/date >> out
/p
/$MAIN.samlog
42 /usr
/local
/bin
/samtools view
-bS out
/p
/$MAIN.sam.gz
>out
/p
/$MAIN.bam
2>>out
/p
/$MAIN.samlog
43 /usr
/local
/bin
/samtools
sort -m 3200000000 out
/p
/$MAIN.bam out
/p
/$MAIN.
sort
44 #/usr/local/bin/samtools rmdup out/p/$MAIN.sort.bam out/p/$MAIN.rmdup.bam
45 /bin
/date >> out
/p
/$MAIN.samlog