-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathGTeX_eQTL_process.qsub
26 lines (15 loc) · 1.14 KB
/
GTeX_eQTL_process.qsub
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/bash -l
# we are going to set these paramenters through cmdline (but you can always hardcoded the parameters if they are going to be fixed.:
# Now let's keep track of some information just in case anything goes wrong
echo "=========================================================="
echo "Starting on : $(date)"
echo "Running on node : $(hostname)"
echo "Current directory : $(pwd)"
echo "Current job ID : $JOB_ID"
echo "Current job name : $JOB_NAME"
echo "Task index number : $SGE_TASK_ID"
echo "=========================================================="
INFILE=`find /restricted/projectnb/chengcancer/Simon/project/T2D/bulk_RNA-seq/merge_170415_NB501164_170506_NB501164/2mapping/QT/GTeX_eQTL/*.v6p.all_snpgene_pairs.txt.gz | head -${SGE_TASK_ID} |tail -1`
echo "NOW in TASK ${SGE_TASK_ID} : PROCESSING $INFILE ..."
zcat ${INFILE} | awk '{print $2, " ", $4}' | gzip > $(basename ${INFILE} .v6p.all_snpgene_pairs.txt.gz).txt.gz
zcat $(basename ${INFILE} .v6p.all_snpgene_pairs.txt.gz).txt.gz | awk -F_ '{print $1," ",$2, " ", $5}' | awk '{print $1":"$2, " ", $4}'| gzip > $(basename ${INFILE} .v6p.all_snpgene_pairs.txt.gz)_chrpos_pval.txt.gz