diff generate_custom_track/construct_custom_track.py @ 0:aedc582b98aa draft

Uploaded
author jackcurragh
date Fri, 23 Sep 2022 13:11:37 +0000
parents
children f46c581ca166
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/generate_custom_track/construct_custom_track.py	Fri Sep 23 13:11:37 2022 +0000
@@ -0,0 +1,18 @@
+import sys
+
+def main(track_type, url, sample_name, sample_description, chromosome_position, outpath):
+    
+    with open(outpath, 'w') as f:
+        f. write(f"""
+        browser position {chromosome_position}
+        track type={track_type} name="{sample_name}" description="{sample_description}" bigDataUrl={url}
+        """)
+
+if __name__ == "__main__":
+    track_type = sys.argv[1]
+    url = sys.argv[2]
+    sample_name = sys.argv[3]
+    sample_description = sys.argv[4]
+    chromosome_position = sys.argv[5]
+    outpath = sys.argv[6]
+    main(track_type, url, sample_name, sample_description, chromosome_position, outpath)