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

planemo upload
author fubar
date Thu, 22 Feb 2024 10:48:01 +0000
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/abslen_bed/abslen_bed.python.txt	Thu Feb 22 10:48:01 2024 +0000
@@ -0,0 +1,14 @@
+#raw
+import sys
+inp = []
+for line in sys.stdin:
+    if line.strip() > '':
+        ls = line.split()
+        if len(ls) > 2:
+            x = abs(int(ls[2]) - int(ls[1]))
+            ls.append((str(x)))
+            inp.append('\t'.join(ls))
+    else:
+        break
+sys.stdout.write('\n'.join(inp))
+#end raw