-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhg38_location.sh
34 lines (26 loc) · 1.3 KB
/
hg38_location.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
#this does not work!!!!!!!
# script to show the distribution of editing sites in various parts of the mRNA
# utilizes bed files listing the coordinates of cds, 3]-UTR, 5-UTR etc. in /Users/kate/scripts
#input is final bedgraph file listing all those editing sites in experimental that are not in control (output of subtract_enzyme_only_sites.sh)
infile1=$1
prefix1=${1%*.13*}
#overlap final bed file with each of the components of the mRNA
bedtools intersect -a $infile1 -b /Users/kate/scripts/hg38_ncbirefseq_3-UTR.bed -f 0.9 > "$prefix1"_3utr.bed""
bedtools intersect -a $infile1 -b /Users/kate/scripts/hg38_ncbirefseq_5-UTR.bed -f 0.9 > "$prefix1"_5utr.bed""
bedtools intersect -a $infile1 -b /Users/kate/scripts/hg38_ncbirefseq_cds.bed -f 0.9 > "$prefix1"_cds.bed""
three_utr_sites= wc -l "$prefix1"_3utr.bed""
#three_utr_sites= sed -n '$=' "$prefix1"_3utr.bed""
#echo $three_utr_sites
five_utr_sites= wc -l "$prefix1"_5utr.bed""
#five_utr_sites= sed -n '$=' "$prefix1"_5utr.bed""
cds_sites= wc -l "$prefix1"_cds.bed""
#cds_sites= sed -n '$=' "$prefix1"_cds.bed""
#echo $cds_sites
#total=$(three_utr_sites + five_utr_sites + cds_sites)
#echo $total
#five= 'expr $five_utr_sites / $total'
#echo $five
#three= (expr ($three_utr_sites / $total))
#echo $three"=3'UTR"
#cds=(expr ($cds_utr_sites / $total))
#echo $cds