File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change 5
5
if __name__ == "__main__" :
6
6
filetype = "?"
7
7
chrom = "?"
8
- seq = defaultdict (lambda : set ("ATGC" ))
9
8
for line in open (argv [2 ]):
10
9
data = line .strip ().split ()
11
10
try :
16
15
if filetype == "?" :
17
16
if len (data ) == 10 :
18
17
filetype = "kircher"
18
+ seq = defaultdict (lambda : set ("N" ))
19
19
elif len (data ) == 5 :
20
20
filetype = "patwardhan"
21
+ seq = defaultdict (lambda : set ("ATGC" ))
21
22
22
23
if filetype == "kircher" :
23
24
if data [9 ] == argv [1 ]:
33
34
34
35
min = min (seq .keys ())
35
36
max = max (seq .keys ())
36
- seq = wrap ("" .join (seq [i ].pop () for i in sorted (seq .keys ())))
37
+ # We know that TCF7L2 has a missing base in the data file, so I'm going to
38
+ # use range instead of just looping over the bases.
39
+ seq = wrap ("" .join (seq [i ].pop () for i in range (min , max + 1 )))
37
40
print (f">Homo_sapiens chr{ chrom } :{ min } -{ max } 100.0" , * seq , sep = "\n " )
You can’t perform that action at this time.
0 commit comments