diff scatter-from-wiggle.py @ 2:014a21767ac4 draft

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/circos commit 076837a2e9c2b6ececcea4aa286ea7a412387a96"
author iuc
date Tue, 17 Sep 2019 16:54:57 -0400
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/scatter-from-wiggle.py	Tue Sep 17 16:54:57 2019 -0400
@@ -0,0 +1,14 @@
+#!/usr/bin/env python
+import logging
+import sys
+
+import pyBigWig
+
+logging.basicConfig(level=logging.INFO)
+log = logging.getLogger()
+
+if __name__ == "__main__":
+    bw = pyBigWig.open(sys.argv[1])
+    for chrom in sorted(bw.chroms().keys()):
+        for (start, end, value) in bw.intervals(chrom):
+            sys.stdout.write("%s\t%s\t%s\t%s\n" % (chrom, start, end, value))