-
Notifications
You must be signed in to change notification settings - Fork 1
/
GO.step07.add_non_normalized_scores
75 lines (65 loc) · 4.68 KB
/
GO.step07.add_non_normalized_scores
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
73
74
75
# ################################################################################################################################################################################################################
# GO.step07.add_non_normalized_scores
#
# CC-BY Lee Edsall
# email: le49@duke.edu
# Twitter: @LeeEdsall
#
# This script was used to analyze data for Edsall et al. 2019 which compared DNase-seq data from 5 primates (human, chimpanzee, gorilla, orangutan, macaque)
# ################################################################################################################################################################################################################
echo ""
echo "==============================================================================================================================================="
echo "STARTED"
date
echo "==============================================================================================================================================="
echo ""
echo ""
echo "==============================================================================================================================================="
echo "Add non-normalized scores to the DHS sites"
echo "==============================================================================================================================================="
echo ""
# ----------------------------------------------------------------------------------------------------------------------------------------------------
# human
# ----------------------------------------------------------------------------------------------------------------------------------------------------
echo "Adding human scores"
bedtools intersect -c -wa -a all_DHS_sites.passed_coverage_filter.bed -b human_b1t2.hg19.bed \
| bedtools intersect -c -wa -a stdin -b human_b2t1.hg19.bed \
| bedtools intersect -c -wa -a stdin -b human_b3t1.hg19.bed >! temp_scores_1.txt
# ----------------------------------------------------------------------------------------------------------------------------------------------------
# chimp
# ----------------------------------------------------------------------------------------------------------------------------------------------------
echo "Adding chimp scores"
bedtools intersect -c -wa -a temp_scores_1.txt -b chimp_b1t2.hg19.bed \
| bedtools intersect -c -wa -a stdin -b chimp_b2t2.hg19.bed \
| bedtools intersect -c -wa -a stdin -b chimp_b3t1.hg19.bed >! temp_scores_2.txt
# ----------------------------------------------------------------------------------------------------------------------------------------------------
# gorilla
# ----------------------------------------------------------------------------------------------------------------------------------------------------
echo "Adding gorilla scores"
bedtools intersect -c -wa -a temp_scores_2.txt -b gorilla_b1t1.hg19.bed \
| bedtools intersect -c -wa -a stdin -b gorilla_b2t1.hg19.bed \
| bedtools intersect -c -wa -a stdin -b gorilla_b3t1.hg19.bed >! temp_scores_3.txt
# ----------------------------------------------------------------------------------------------------------------------------------------------------
# orangutan
# ----------------------------------------------------------------------------------------------------------------------------------------------------
echo "Adding orangutan scores"
bedtools intersect -c -wa -a temp_scores_3.txt -b orangutan_b1t1.hg19.bed \
| bedtools intersect -c -wa -a stdin -b orangutan_b2t1.hg19.bed \
| bedtools intersect -c -wa -a stdin -b orangutan_b3t1.hg19.bed >! temp_scores_4.txt
# ----------------------------------------------------------------------------------------------------------------------------------------------------
# macaque
# ----------------------------------------------------------------------------------------------------------------------------------------------------
echo "Adding macaque scores"
bedtools intersect -c -wa -a temp_scores_4.txt -b macaque_b1ta.hg19.bed \
| bedtools intersect -c -wa -a stdin -b macaque_b2ta.hg19.bed \
| bedtools intersect -c -wa -a stdin -b macaque_b3t1.hg19.bed \
| sort -k1,1 -k2,2n >! all_DHS_sites.passed_coverage_filter.with_non_normalized_scores.not_zero_count_filtered.txt
echo ""
echo ""
echo "Output is located in all_DHS_sites.passed_coverage_filter.with_non_normalized_scores.not_zero_count_filtered.txt"
echo ""
echo "==============================================================================================================================================="
echo "FINISHED"
date
echo "==============================================================================================================================================="
echo ""