-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmergebed_Es_YS.txt
293 lines (233 loc) · 10.5 KB
/
mergebed_Es_YS.txt
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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
# Es data only
# 03.30.2020- goal is to combine files together (DAP-Seq)
# by Ying Sun
Bedtools: Keep if it occurs in 2 or more files-- save peaks
Venn diagram to check: checked and the more files, the more peaks you can find
# Es-Shoot_ABF1
module load bedtools/2.26.0
# This will chop each peak to 8bp
# Then also sorting
for f in *.narrowPeak; do
awk -v OFS='\t' '{$2=$2+97} {$3=$3-97} {print $0}' $f | awk -v OFS="\t" '{ if ($2<0) {$2=0}} {print $0}' | sort -k1,1 -k2,2n > ${f}_7bp
done
for f in *.narrowPeak_7bp; do
wc -l "$f"
done
########################
902 sorted_EsJ-EsABF150y-Esshoot50PCWGY-Q-04-00-2017-XXCACTTT_S1_out_GEM_events.narrowPeak_7bp
4969 sorted_EsJ-EsABF1a-Esshoot-QR1-10-24-2016-GCCAAT_S1_out_GEM_events.narrowPeak_7bp
7924 sorted_EsJ-EsJABF1c-EsJshoot-Q-11-30-2018-CATCGA_S1_out_GEM_events.narrowPeak_7bp
8096 sorted_EsJ-EsJABF1d-EsJshoot-Q-11-30-2018-GTTGCA_S1_out_GEM_events.narrowPeak_7bp
9738 sorted_EsJ-EsJABF1e-EsJshoot-Q-11-30-2018-AGACTC_S1_out_GEM_events.narrowPeak_7bp
########################
cat *.narrowPeak_7bp | sort -k1,1 -k2,2n > ${PWD##*/}.bed
bedtools merge -c 1 -o count -i ${PWD##*/}.bed > ${PWD##*/}.merged.bed
awk -v OFS="\t" -v t=$t '$4>=2 {print $0}' ${PWD##*/}.merged.bed > ${PWD##*/}.mergedfiltered.bed
for f in *.bed; do
wc -l "$f"
done
# All peaks, merged peaks, final peaks
########################
31629 Es_Shoot_EsABF1.bed
13854 Es_Shoot_EsABF1.merged.bed
8123 Es_Shoot_EsABF1.mergedfiltered.bed
########################
# Es-Shoot_ABF2
module load bedtools/2.26.0
# This will chop each peak to 8bp
# Then also sorting
for f in *.narrowPeak; do
awk -v OFS='\t' '{$2=$2+97} {$3=$3-97} {print $0}' $f | awk -v OFS="\t" '{ if ($2<0) {$2=0}} {print $0}' | sort -k1,1 -k2,2n > ${f}_7bp
done
for f in *.narrowPeak_7bp; do
wc -l "$f"
done
########################
818 sorted_EsJ-EsABF250y-Esshoot50PCWGY-Q-04-00-2017-XXCACCGG_S1_out_GEM_events.narrowPeak_7bp
736 sorted_EsJ-EsABF250z-Esshoot50PCWGA-Q-04-00-2017-XXGGAACT_S1_out_GEM_events.narrowPeak_7bp
4506 sorted_EsJ-EsABF2a-Esshoot-QR1-10-24-2016-CAGATC_S1_out_GEM_events.narrowPeak_7bp
12535 sorted_EsJ-EsABF2b-Esshoot-QR2-1-27-2017-CAACGT_S1_out_GEM_events.narrowPeak_7bp
10657 sorted_EsJ-EsJABF2c-EsJshoot-Q-11-30-2018-TAGACC_S1_out_GEM_events.narrowPeak_7bp
10053 sorted_EsJ-EsJABF2d-EsJshoot-Q-11-30-2018-CAAGCT_S1_out_GEM_events.narrowPeak_7bp
11535 sorted_EsJ-EsJABF2e-EsJshoot-Q-11-30-2018-TGTGAC_S1_out_GEM_events.narrowPeak_7bp
########################
cat *.narrowPeak_7bp | sort -k1,1 -k2,2n > ${PWD##*/}.bed
bedtools merge -c 1 -o count -i ${PWD##*/}.bed > ${PWD##*/}.merged.bed
awk -v OFS="\t" -v t=$t '$4>=2 {print $0}' ${PWD##*/}.merged.bed > ${PWD##*/}.mergedfiltered.bed
for f in *.bed; do
wc -l "$f"
done
# All peaks, merged peaks, final peaks
########################
50840 Es_Shoot_EsABF2.bed
21880 Es_Shoot_EsABF2.merged.bed
11447 Es_Shoot_EsABF2.mergedfiltered.bed
########################
# Es-Shoot_ABF3
module load bedtools/2.26.0
# This will chop each peak to 8bp
# Then also sorting
for f in *.narrowPeak; do
awk -v OFS='\t' '{$2=$2+97} {$3=$3-97} {print $0}' $f | awk -v OFS="\t" '{ if ($2<0) {$2=0}} {print $0}' | sort -k1,1 -k2,2n > ${f}_7bp
done
for f in *.narrowPeak_7bp; do
wc -l "$f"
done
########################
8175 sorted_EsJ-EsABF3a-Esshoot-QR1-10-24-2016-ACTTGA_S1_out_GEM_events.narrowPeak_7bp
10803 sorted_EsJ-EsABF3b-Esshoot-QR2-1-27-2017-TTCAGG_S1_out_GEM_events.narrowPeak_7bp
12095 sorted_EsJ-EsJABF3c-EsJshoot-Q-11-30-2018-GATCCA_S1_out_GEM_events.narrowPeak_7bp
12779 sorted_EsJ-EsJABF3d-EsJshoot-Q-11-30-2018-TGACAC_S1_out_GEM_events.narrowPeak_7bp
13556 sorted_EsJ-EsJABF3e-EsJshoot-Q-11-30-2018-GTACCA_S1_out_GEM_events.narrowPeak_7bp
########################
cat *.narrowPeak_7bp | sort -k1,1 -k2,2n > ${PWD##*/}.bed
bedtools merge -c 1 -o count -i ${PWD##*/}.bed > ${PWD##*/}.merged.bed
awk -v OFS="\t" -v t=$t '$4>=2 {print $0}' ${PWD##*/}.merged.bed > ${PWD##*/}.mergedfiltered.bed
for f in *.bed; do
wc -l "$f"
done
# All peaks, merged peaks, final peaks
########################
57408 Es_Shoot_EsABF3.bed
21912 Es_Shoot_EsABF3.merged.bed
12747 Es_Shoot_EsABF3.mergedfiltered.bed
########################
# Es-Shoot_ABF4
module load bedtools/2.26.0
# This will chop each peak to 8bp
# Then also sorting
for f in *.narrowPeak; do
awk -v OFS='\t' '{$2=$2+97} {$3=$3-97} {print $0}' $f | awk -v OFS="\t" '{ if ($2<0) {$2=0}} {print $0}' | sort -k1,1 -k2,2n > ${f}_7bp
done
for f in *.narrowPeak_7bp; do
wc -l "$f"
done
########################
869 sorted_EsJ-EsABF450y-Esshoot50PCWGY-Q-04-00-2017-XXGCATGC_S1_out_GEM_events.narrowPeak_7bp
884 sorted_EsJ-EsABF450z-Esshoot50PCWGA-Q-04-00-2017-XXGGACGG_S1_out_GEM_events.narrowPeak_7bp
6271 sorted_EsJ-EsABF4a-Esshoot-QR1-10-24-2016-GATCAG_S1_out_GEM_events.narrowPeak_7bp
7934 sorted_EsJ-EsABF4b-Esshoot-QR2-1-27-2017-GTTGCA_S1_out_GEM_events.narrowPeak_7bp
18547 sorted_EsJ-EsJABF4c-EsJshoot-Q-11-30-2018-CTAGCA_S1_out_GEM_events.narrowPeak_7bp
20343 sorted_EsJ-EsJABF4d-EsJshoot-Q-11-30-2018-GTTCGA_S1_out_GEM_events.narrowPeak_7bp
20699 sorted_EsJ-EsJABF4e-EsJshoot-Q-11-30-2018-ATCAGC_S1_out_GEM_events.narrowPeak_7bp
########################
cat *.narrowPeak_7bp | sort -k1,1 -k2,2n > ${PWD##*/}.bed
bedtools merge -c 1 -o count -i ${PWD##*/}.bed > ${PWD##*/}.merged.bed
awk -v OFS="\t" -v t=$t '$4>=2 {print $0}' ${PWD##*/}.merged.bed > ${PWD##*/}.mergedfiltered.bed
for f in *.bed; do
wc -l "$f"
done
# All peaks, merged peaks, final peaks
########################
75547 Es_Shoot_EsABF4.bed
33326 Es_Shoot_EsABF4.merged.bed
17790 Es_Shoot_EsABF4.mergedfiltered.bed
########################
################ short files ####################
#### ABF1 ########################
module load bedtools/2.26.0
# This will chop each peak to 8bp
# Then also sorting
for f in *.narrowPeak; do
awk -v OFS='\t' '{$2=$2+97} {$3=$3-97} {print $0}' $f | awk -v OFS="\t" '{ if ($2<0) {$2=0}} {print $0}' | sort -k1,1 -k2,2n > ${f}_7bp
done
for f in *.narrowPeak_7bp; do
wc -l "$f"
done
########################
7924 sorted_EsJ-EsJABF1c-EsJshoot-Q-11-30-2018-CATCGA_S1_out_GEM_events.narrowPeak_7bp
8096 sorted_EsJ-EsJABF1d-EsJshoot-Q-11-30-2018-GTTGCA_S1_out_GEM_events.narrowPeak_7bp
9738 sorted_EsJ-EsJABF1e-EsJshoot-Q-11-30-2018-AGACTC_S1_out_GEM_events.narrowPeak_7bp
########################
cat *.narrowPeak_7bp | sort -k1,1 -k2,2n > ${PWD##*/}.bed
bedtools merge -c 1 -o count -i ${PWD##*/}.bed > ${PWD##*/}.merged.bed
awk -v OFS="\t" -v t=$t '$4>=2 {print $0}' ${PWD##*/}.merged.bed > ${PWD##*/}.mergedfiltered.bed
for f in *.bed; do
wc -l "$f"
done
# All peaks, merged peaks, final peaks
########################
25758 short.bed
12514 short.merged.bed
7630 short.mergedfiltered.bed
########################
#### ABF2 ########################
module load bedtools/2.26.0
# This will chop each peak to 8bp
# Then also sorting
for f in *.narrowPeak; do
awk -v OFS='\t' '{$2=$2+97} {$3=$3-97} {print $0}' $f | awk -v OFS="\t" '{ if ($2<0) {$2=0}} {print $0}' | sort -k1,1 -k2,2n > ${f}_7bp
done
for f in *.narrowPeak_7bp; do
wc -l "$f"
done
########################
10657 sorted_EsJ-EsJABF2c-EsJshoot-Q-11-30-2018-TAGACC_S1_out_GEM_events.narrowPeak_7bp
10053 sorted_EsJ-EsJABF2d-EsJshoot-Q-11-30-2018-CAAGCT_S1_out_GEM_events.narrowPeak_7bp
11535 sorted_EsJ-EsJABF2e-EsJshoot-Q-11-30-2018-TGTGAC_S1_out_GEM_events.narrowPeak_7bp
########################
cat *.narrowPeak_7bp | sort -k1,1 -k2,2n > ${PWD##*/}.bed
bedtools merge -c 1 -o count -i ${PWD##*/}.bed > ${PWD##*/}.merged.bed
awk -v OFS="\t" -v t=$t '$4>=2 {print $0}' ${PWD##*/}.merged.bed > ${PWD##*/}.mergedfiltered.bed
for f in *.bed; do
wc -l "$f"
done
# All peaks, merged peaks, final peaks
########################
32245 short.bed
17674 short.merged.bed
9056 short.mergedfiltered.bed
######################## #### ABF3 ########################
module load bedtools/2.26.0
# This will chop each peak to 8bp
# Then also sorting
for f in *.narrowPeak; do
awk -v OFS='\t' '{$2=$2+97} {$3=$3-97} {print $0}' $f | awk -v OFS="\t" '{ if ($2<0) {$2=0}} {print $0}' | sort -k1,1 -k2,2n > ${f}_7bp
done
for f in *.narrowPeak_7bp; do
wc -l "$f"
done
########################
12095 sorted_EsJ-EsJABF3c-EsJshoot-Q-11-30-2018-GATCCA_S1_out_GEM_events.narrowPeak_7bp
12779 sorted_EsJ-EsJABF3d-EsJshoot-Q-11-30-2018-TGACAC_S1_out_GEM_events.narrowPeak_7bp
13556 sorted_EsJ-EsJABF3e-EsJshoot-Q-11-30-2018-GTACCA_S1_out_GEM_events.narrowPeak_7bp
########################
cat *.narrowPeak_7bp | sort -k1,1 -k2,2n > ${PWD##*/}.bed
bedtools merge -c 1 -o count -i ${PWD##*/}.bed > ${PWD##*/}.merged.bed
awk -v OFS="\t" -v t=$t '$4>=2 {print $0}' ${PWD##*/}.merged.bed > ${PWD##*/}.mergedfiltered.bed
for f in *.bed; do
wc -l "$f"
done
# All peaks, merged peaks, final peaks
########################
38430 short.bed
19428 short.merged.bed
11011 short.mergedfiltered.bed
########################
#### ABF4 ########################
module load bedtools/2.26.0
# This will chop each peak to 8bp
# Then also sorting
for f in *.narrowPeak; do
awk -v OFS='\t' '{$2=$2+97} {$3=$3-97} {print $0}' $f | awk -v OFS="\t" '{ if ($2<0) {$2=0}} {print $0}' | sort -k1,1 -k2,2n > ${f}_7bp
done
for f in *.narrowPeak_7bp; do
wc -l "$f"
done
########################
18547 sorted_EsJ-EsJABF4c-EsJshoot-Q-11-30-2018-CTAGCA_S1_out_GEM_events.narrowPeak_7bp
20343 sorted_EsJ-EsJABF4d-EsJshoot-Q-11-30-2018-GTTCGA_S1_out_GEM_events.narrowPeak_7bp
20699 sorted_EsJ-EsJABF4e-EsJshoot-Q-11-30-2018-ATCAGC_S1_out_GEM_events.narrowPeak_7bp
########################
cat *.narrowPeak_7bp | sort -k1,1 -k2,2n > ${PWD##*/}.bed
bedtools merge -c 1 -o count -i ${PWD##*/}.bed > ${PWD##*/}.merged.bed
awk -v OFS="\t" -v t=$t '$4>=2 {print $0}' ${PWD##*/}.merged.bed > ${PWD##*/}.mergedfiltered.bed
for f in *.bed; do
wc -l "$f"
done
# All peaks, merged peaks, final peaks
########################
59589 short.bed
31493 short.merged.bed
16669 short.mergedfiltered.bed
########################