annotate abslen_bed/abslen_bed.python.txt @ 1:0183cad9d13b draft

planemo upload
author fubar
date Thu, 22 Feb 2024 10:48:01 +0000
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1
0183cad9d13b planemo upload
fubar
parents:
diff changeset
1 #raw
0183cad9d13b planemo upload
fubar
parents:
diff changeset
2 import sys
0183cad9d13b planemo upload
fubar
parents:
diff changeset
3 inp = []
0183cad9d13b planemo upload
fubar
parents:
diff changeset
4 for line in sys.stdin:
0183cad9d13b planemo upload
fubar
parents:
diff changeset
5 if line.strip() > '':
0183cad9d13b planemo upload
fubar
parents:
diff changeset
6 ls = line.split()
0183cad9d13b planemo upload
fubar
parents:
diff changeset
7 if len(ls) > 2:
0183cad9d13b planemo upload
fubar
parents:
diff changeset
8 x = abs(int(ls[2]) - int(ls[1]))
0183cad9d13b planemo upload
fubar
parents:
diff changeset
9 ls.append((str(x)))
0183cad9d13b planemo upload
fubar
parents:
diff changeset
10 inp.append('\t'.join(ls))
0183cad9d13b planemo upload
fubar
parents:
diff changeset
11 else:
0183cad9d13b planemo upload
fubar
parents:
diff changeset
12 break
0183cad9d13b planemo upload
fubar
parents:
diff changeset
13 sys.stdout.write('\n'.join(inp))
0183cad9d13b planemo upload
fubar
parents:
diff changeset
14 #end raw