annotate generate_custom_track/construct_custom_track.py @ 4:686a1d619b96 draft default tip

Uploaded
author jackcurragh
date Fri, 23 Sep 2022 13:37:43 +0000
parents f46c581ca166
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
aedc582b98aa Uploaded
jackcurragh
parents:
diff changeset
1 import sys
aedc582b98aa Uploaded
jackcurragh
parents:
diff changeset
2
aedc582b98aa Uploaded
jackcurragh
parents:
diff changeset
3 def main(track_type, url, sample_name, sample_description, chromosome_position, outpath):
3
f46c581ca166 Uploaded
jackcurragh
parents: 0
diff changeset
4
0
aedc582b98aa Uploaded
jackcurragh
parents:
diff changeset
5 with open(outpath, 'w') as f:
3
f46c581ca166 Uploaded
jackcurragh
parents: 0
diff changeset
6 f. write(
4
686a1d619b96 Uploaded
jackcurragh
parents: 3
diff changeset
7 f"""# copy this text into the dialog box at https://https://gwips.ucc.ie/cgi-bin/hgCustom
686a1d619b96 Uploaded
jackcurragh
parents: 3
diff changeset
8 # or download the file and uplaod to GWIPS on the same page
686a1d619b96 Uploaded
jackcurragh
parents: 3
diff changeset
9 browser position {chromosome_position}
3
f46c581ca166 Uploaded
jackcurragh
parents: 0
diff changeset
10 track type={track_type} name="{sample_name}" description="{sample_description}" bigDataUrl={url}""")
0
aedc582b98aa Uploaded
jackcurragh
parents:
diff changeset
11
aedc582b98aa Uploaded
jackcurragh
parents:
diff changeset
12 if __name__ == "__main__":
aedc582b98aa Uploaded
jackcurragh
parents:
diff changeset
13 track_type = sys.argv[1]
aedc582b98aa Uploaded
jackcurragh
parents:
diff changeset
14 url = sys.argv[2]
aedc582b98aa Uploaded
jackcurragh
parents:
diff changeset
15 sample_name = sys.argv[3]
aedc582b98aa Uploaded
jackcurragh
parents:
diff changeset
16 sample_description = sys.argv[4]
aedc582b98aa Uploaded
jackcurragh
parents:
diff changeset
17 chromosome_position = sys.argv[5]
aedc582b98aa Uploaded
jackcurragh
parents:
diff changeset
18 outpath = sys.argv[6]
aedc582b98aa Uploaded
jackcurragh
parents:
diff changeset
19 main(track_type, url, sample_name, sample_description, chromosome_position, outpath)