Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
JiamanZhang authored Nov 12, 2021
1 parent a1098d7 commit d0b60f8
Show file tree
Hide file tree
Showing 54 changed files with 16,659 additions and 0 deletions.
21 changes: 21 additions & 0 deletions Lab_Annotate_Enhancer_type/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2021 JiamanZhang

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
23 changes: 23 additions & 0 deletions Lab_Annotate_Enhancer_type/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Lab_Annotate_enhancer_type
# -- codes to fit Annotate_enhancer_type models

## 1. System requirements

- python 2.7

## 2. Installation guide

No installation needed. Directly run work.sh

## 3. Demo

### Input:
- chr20.H3K27ac.ROSE.test.txt
- chr20.PEI.Enhancer.data.test.txt

### Output:
- chr20.PEI.Enhancer.type.annotate.txt

## 4. Instructions for use

Change the hard-coded paths in the code to your own paths where you place the input and output files
79 changes: 79 additions & 0 deletions Lab_Annotate_Enhancer_type/codes/get.Enhancer.type.of.PEI.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
import sys
import os
def main():

inp = sys.argv[1]
f1 = open(inp,'r')
Ehancer_dict = {}
for line1 in f1:
info1 = line1.strip().split('\t')
if info1[0] == 'REGION_ID':
continue

chrname = info1[1].replace('chr','')
start = int(info1[2])
end = int(info1[3])

tname = info1[-1]
try:
Ehancer_dict[chrname].append([chrname,start,end,tname])
except KeyError as reason:
Ehancer_dict[chrname] = []
Ehancer_dict[chrname].append([chrname,start,end,tname])
f1.close()

oup = sys.argv[3]
out = open(oup,'w')

inp = sys.argv[2]
f1 = open(inp,'r')
for line1 in f1:
info1 = line1.strip().split('\t')
if info1[0] == 'chrname':
continue

chrname = info1[0]
Estart = int(info1[1])
Eend = Estart + 5000

RE='NA'
SE='NA'
for a_list in Ehancer_dict[chrname]:
start = a_list[1]
end = a_list[2]
tname = a_list[3]

ovlap = min(Eend,end) - max(start,Estart)
if ovlap <= 0:
continue

if tname == '0':
if ovlap >= 1:
RE='RE'
REinfo = '_'.join([str(i) for i in a_list])
elif tname == '1':
if ovlap >=2500:
SE='SE'
SEinfo = '_'.join([str(i) for i in a_list])
else:
print 'wrong'
sys.exit(0)

if SE =='SE':
Ehancer_name = 'SE'
posinfo = SEinfo
elif RE == 'RE':
Ehancer_name = 'RE'
posinfo = REinfo
else:
Ehancer_name = 'inactive'
posinfo = 'NA'

info_list = info1+[posinfo,Ehancer_name]
out.write('{0}\n'.format('\t'.join(map(str,info_list))))
f1.close()
out.close()


if __name__ == '__main__':
main()
1 change: 1 addition & 0 deletions Lab_Annotate_Enhancer_type/codes/work.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
python get.Enhancer.type.of.PEI.py chr20.H3K27ac.ROSE.test.txt chr20.PEI.Enhancer.data.test.txt chr20.PEI.Enhancer.type.annotate.txt

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,242 @@
chrname Enhancer_start Promoter_start gene_ID
20 9865000 10030000 ENSGALG00000006267
20 9920000 10030000 ENSGALG00000006267
20 9985000 10105000 ENSGALG00000006522
20 9990000 10220000 ENSGALG00000041732
20 10000000 10240000 ENSGALG00000006630
20 10015000 10035000 ENSGALG00000006211
20 10015000 10105000 ENSGALG00000006522
20 10045000 10240000 ENSGALG00000006630
20 10050000 10065000 ENSGALG00000030291
20 10050000 10220000 ENSGALG00000041732
20 10050000 10065000 ENSGALG00000043015
20 10075000 10220000 ENSGALG00000041732
20 10120000 10220000 ENSGALG00000041732
20 10125000 10145000 ENSGALG00000006604
20 10130000 10110000 ENSGALG00000006568
20 10145000 10220000 ENSGALG00000041732
20 10150000 10240000 ENSGALG00000006630
20 10160000 10240000 ENSGALG00000006630
20 10165000 10075000 ENSGALG00000006460
20 10165000 10075000 ENSGALG00000021017
20 10175000 10250000 ENSGALG00000041461
20 10195000 10155000 ENSGALG00000006612
20 10205000 10095000 ENSGALG00000006479
20 10205000 10220000 ENSGALG00000041732
20 10210000 10075000 ENSGALG00000006460
20 10210000 10110000 ENSGALG00000006568
20 10210000 10075000 ENSGALG00000021017
20 10215000 10030000 ENSGALG00000006267
20 10215000 10340000 ENSGALG00000006738
20 10220000 10075000 ENSGALG00000006460
20 10220000 10145000 ENSGALG00000006604
20 10220000 10240000 ENSGALG00000006630
20 10220000 10525000 ENSGALG00000006854
20 10220000 10525000 ENSGALG00000006876
20 10220000 10310000 ENSGALG00000020982
20 10220000 10075000 ENSGALG00000021017
20 10240000 10045000 ENSGALG00000006273
20 10240000 10220000 ENSGALG00000041732
20 10245000 10510000 ENSGALG00000006835
20 10260000 10350000 ENSGALG00000006756
20 10260000 10350000 ENSGALG00000047290
20 10265000 10035000 ENSGALG00000006211
20 10275000 10365000 ENSGALG00000006775
20 10275000 10500000 ENSGALG00000051275
20 10280000 10420000 ENSGALG00000006792
20 10285000 10365000 ENSGALG00000006775
20 10285000 10310000 ENSGALG00000020982
20 10290000 10340000 ENSGALG00000006738
20 10290000 10420000 ENSGALG00000006792
20 10300000 10365000 ENSGALG00000006775
20 10305000 10320000 ENSGALG00000006693
20 10310000 10285000 ENSGALG00000006662
20 10310000 10220000 ENSGALG00000041732
20 10315000 10300000 ENSGALG00000006666
20 10315000 10470000 ENSGALG00000006817
20 10325000 10310000 ENSGALG00000020982
20 10345000 10220000 ENSGALG00000041732
20 10350000 10260000 ENSGALG00000006657
20 10350000 10300000 ENSGALG00000006666
20 10365000 10300000 ENSGALG00000006666
20 10365000 10500000 ENSGALG00000051275
20 10385000 10300000 ENSGALG00000006666
20 10385000 10340000 ENSGALG00000006738
20 10385000 10365000 ENSGALG00000006775
20 10400000 10485000 ENSGALG00000054868
20 10405000 10365000 ENSGALG00000006775
20 10415000 10510000 ENSGALG00000006835
20 10420000 10480000 ENSGALG00000031164
20 10425000 10395000 ENSGALG00000006791
20 10445000 10395000 ENSGALG00000006791
20 10450000 10285000 ENSGALG00000006662
20 10460000 10300000 ENSGALG00000006666
20 10460000 10395000 ENSGALG00000006791
20 10475000 10420000 ENSGALG00000006792
20 10480000 10420000 ENSGALG00000006792
20 10480000 10565000 ENSGALG00000041370
20 10485000 10400000 ENSGALG00000006788
20 10490000 10535000 ENSGALG00000023547
20 10490000 10535000 ENSGALG00000036686
20 10495000 10470000 ENSGALG00000006817
20 10495000 10515000 ENSGALG00000006836
20 10495000 10515000 ENSGALG00000006842
20 10495000 10515000 ENSGALG00000006848
20 10500000 10365000 ENSGALG00000006775
20 10515000 10535000 ENSGALG00000023547
20 10515000 10535000 ENSGALG00000036686
20 10520000 10535000 ENSGALG00000023547
20 10520000 10535000 ENSGALG00000036686
20 10525000 10220000 ENSGALG00000041732
20 10535000 10520000 ENSGALG00000052682
20 10540000 10525000 ENSGALG00000006854
20 10540000 10525000 ENSGALG00000006876
20 10545000 10565000 ENSGALG00000041370
20 10550000 10520000 ENSGALG00000052682
20 10555000 10525000 ENSGALG00000006854
20 10555000 10525000 ENSGALG00000006876
20 10560000 10535000 ENSGALG00000023547
20 10560000 10535000 ENSGALG00000036686
20 10565000 10480000 ENSGALG00000031164
20 10580000 10515000 ENSGALG00000006836
20 10580000 10515000 ENSGALG00000006842
20 10580000 10515000 ENSGALG00000006848
20 10580000 10535000 ENSGALG00000023547
20 10580000 10535000 ENSGALG00000036686
20 10600000 10565000 ENSGALG00000041370
20 10600000 10575000 ENSGALG00000042199
20 10625000 10865000 ENSGALG00000007439
20 10635000 10760000 ENSGALG00000006974
20 10635000 10680000 ENSGALG00000007211
20 10635000 10535000 ENSGALG00000023547
20 10635000 10535000 ENSGALG00000036686
20 10650000 10680000 ENSGALG00000007211
20 10655000 10680000 ENSGALG00000007211
20 10655000 10890000 ENSGALG00000007447
20 10655000 10890000 ENSGALG00000007462
20 10665000 10680000 ENSGALG00000007211
20 10685000 10730000 ENSGALG00000020939
20 10700000 10620000 ENSGALG00000007009
20 10700000 10620000 ENSGALG00000007015
20 10705000 10575000 ENSGALG00000042199
20 10710000 10620000 ENSGALG00000007009
20 10710000 10620000 ENSGALG00000007015
20 10725000 10620000 ENSGALG00000007009
20 10725000 10620000 ENSGALG00000007015
20 10740000 10865000 ENSGALG00000007439
20 10760000 10865000 ENSGALG00000007439
20 10765000 10865000 ENSGALG00000007439
20 10765000 10855000 ENSGALG00000049068
20 10770000 10885000 ENSGALG00000051266
20 10775000 10760000 ENSGALG00000006974
20 10775000 10865000 ENSGALG00000007439
20 10775000 10885000 ENSGALG00000051266
20 10780000 10815000 ENSGALG00000040880
20 10785000 10815000 ENSGALG00000040880
20 10785000 10885000 ENSGALG00000051266
20 10795000 10855000 ENSGALG00000049068
20 10845000 10750000 ENSGALG00000049958
20 10850000 10760000 ENSGALG00000006974
20 10850000 10815000 ENSGALG00000040880
20 10865000 10760000 ENSGALG00000006974
20 10870000 10750000 ENSGALG00000049958
20 10890000 11045000 ENSGALG00000030859
20 10950000 11045000 ENSGALG00000030859
20 11035000 10910000 ENSGALG00000007477
20 11045000 10890000 ENSGALG00000007447
20 11045000 10890000 ENSGALG00000007462
20 11070000 11045000 ENSGALG00000030859
20 11085000 11155000 ENSGALG00000007543
20 11085000 11230000 ENSGALG00000007554
20 11090000 11155000 ENSGALG00000007543
20 11090000 11230000 ENSGALG00000007554
20 11110000 11155000 ENSGALG00000007543
20 11125000 11225000 ENSGALG00000007575
20 11130000 11155000 ENSGALG00000007543
20 11140000 11045000 ENSGALG00000030859
20 11155000 11085000 ENSGALG00000007541
20 11155000 11210000 ENSGALG00000007549
20 11160000 11085000 ENSGALG00000007541
20 11175000 11045000 ENSGALG00000030859
20 11180000 11085000 ENSGALG00000007541
20 11185000 11085000 ENSGALG00000007541
20 11210000 11155000 ENSGALG00000007543
20 11230000 11085000 ENSGALG00000007541
20 11280000 11560000 ENSGALG00000007636
20 11300000 11495000 ENSGALG00000037780
20 11330000 11300000 ENSGALG00000027484
20 11345000 11300000 ENSGALG00000027484
20 11345000 11495000 ENSGALG00000037780
20 11350000 11300000 ENSGALG00000027484
20 11360000 11300000 ENSGALG00000027484
20 11360000 11495000 ENSGALG00000037780
20 11370000 11560000 ENSGALG00000007636
20 11375000 11495000 ENSGALG00000037780
20 11380000 11495000 ENSGALG00000037780
20 11385000 11495000 ENSGALG00000037780
20 11390000 11300000 ENSGALG00000027484
20 11390000 11495000 ENSGALG00000037780
20 11430000 11560000 ENSGALG00000007636
20 11435000 11300000 ENSGALG00000027484
20 11440000 11560000 ENSGALG00000007636
20 11440000 11300000 ENSGALG00000027484
20 11450000 11560000 ENSGALG00000007636
20 11490000 11300000 ENSGALG00000027484
20 11495000 11300000 ENSGALG00000027484
20 11510000 11560000 ENSGALG00000007636
20 11550000 11300000 ENSGALG00000027484
20 11565000 11300000 ENSGALG00000027484
20 11605000 11625000 ENSGALG00000026081
20 11665000 11680000 ENSGALG00000007668
20 11735000 11645000 ENSGALG00000007653
20 11735000 11680000 ENSGALG00000007668
20 11785000 11945000 ENSGALG00000007690
20 12005000 11990000 ENSGALG00000007709
20 12035000 12065000 ENSGALG00000027260
20 12105000 12285000 ENSGALG00000007786
20 12240000 12065000 ENSGALG00000027260
20 12285000 12105000 ENSGALG00000030821
20 12295000 12380000 ENSGALG00000007796
20 12350000 12335000 ENSGALG00000007792
20 12355000 12335000 ENSGALG00000007792
20 12365000 12520000 ENSGALG00000040546
20 12385000 12530000 ENSGALG00000040886
20 12405000 12520000 ENSGALG00000040546
20 12420000 12520000 ENSGALG00000040546
20 12425000 12520000 ENSGALG00000040546
20 12435000 12520000 ENSGALG00000040546
20 12545000 12760000 ENSGALG00000007809
20 12715000 12555000 ENSGALG00000032352
20 12725000 12760000 ENSGALG00000007809
20 12750000 12555000 ENSGALG00000032352
20 12820000 12760000 ENSGALG00000007809
20 12955000 12530000 ENSGALG00000040886
20 12970000 12555000 ENSGALG00000032352
20 12980000 12760000 ENSGALG00000007809
20 12980000 12520000 ENSGALG00000040546
20 13000000 13085000 ENSGALG00000041365
20 13055000 13085000 ENSGALG00000041365
20 13070000 12990000 ENSGALG00000038858
20 13070000 13085000 ENSGALG00000041365
20 13200000 13170000 ENSGALG00000007963
20 13245000 13170000 ENSGALG00000007963
20 13265000 13360000 ENSGALG00000007980
20 13275000 13400000 ENSGALG00000007989
20 13290000 13360000 ENSGALG00000007980
20 13305000 13360000 ENSGALG00000007980
20 13580000 13735000 ENSGALG00000008015
20 13590000 13710000 ENSGALG00000008014
20 13590000 13710000 ENSGALG00000026906
20 13595000 13710000 ENSGALG00000008014
20 13595000 13710000 ENSGALG00000026906
20 13605000 13710000 ENSGALG00000008014
20 13605000 13710000 ENSGALG00000026906
20 13660000 13575000 ENSGALG00000008010
20 13725000 13575000 ENSGALG00000008010
20 13735000 13800000 ENSGALG00000008021
20 13760000 13795000 ENSGALG00000008018
20 13760000 13795000 ENSGALG00000008026
20 13765000 13795000 ENSGALG00000008018
20 13765000 13795000 ENSGALG00000008026
20 13800000 13735000 ENSGALG00000008015
20 13870000 13735000 ENSGALG00000008015
Binary file not shown.
Loading

0 comments on commit d0b60f8

Please sign in to comment.