forked from jmeinst/biom262-hw1
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtf_binding.sh
34 lines (26 loc) · 1.22 KB
/
tf_binding.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
#!/bin/bash
#PBS -q hotel
#PBS -N tf_binding.sh
#PBS -l nodes=10:ppn=2
#PBS -l walltime=:00:50:00
#PBS -o tf_binding.sh.o
#PBS -e tf_binding.sh.e
#PBS -V
#PBS -M <[email protected]>
#PBS -A jeinstei
cd ~/code/biom262-2016/weeks/week01/data
#Exercise 1
# Filter the tf.bed file for only the NFKB\n
awk '{if($4=="NFKB") print}' tf.bed > tf.nfkb.bed
#Exercise 2
# Filter only the rows of the gtf file that contain the features of type "transcript"\n
awk '{if($3=="transcript") print}' gencode.v19.annotation.chr22.gtf > gencode.v19.annotation.chr22.transcript.gtf
#Exercise 3
# Use bedtools to find promoters (2000 bases upstream of gene)\n
bedtools flank -i gencode.v19.annotation.chr22.transcript.gtf -g hg19.genome -l 2000 -r 0 -s > gencode.v19.annotation.chr22.transcript.promoter.gtf
echo "Hello I am a message in standard out (stout)"
#Exercise 4
bedtools intersect -a gencode.v19.annotation.chr22.transcript.promoter.gtf -b tf.nfkb.bed >gencode.v19.annotation.chr22.transcript.promoter.nfkb.gtf
#Exercise 5
bedtools getfasta -fi GRCh37.p13.chr22.fa -bed gencode.v19.annotation.chr22.transcript.promoter.nfkb.gtf -s -fo gencode.v19.annotation.chr22.transcript.promoter.nfkb.fasta
echo "Hello I am a message in standard error (stderr) >&2