annotate generate_custom_track/construct_custom_track.py @ 3:f46c581ca166 draft

Uploaded
author jackcurragh
date Fri, 23 Sep 2022 13:30:42 +0000
parents aedc582b98aa
children 686a1d619b96
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(
f46c581ca166 Uploaded
jackcurragh
parents: 0
diff changeset
7 f"""browser position {chromosome_position}
f46c581ca166 Uploaded
jackcurragh
parents: 0
diff changeset
8 track type={track_type} name="{sample_name}" description="{sample_description}" bigDataUrl={url}""")
0
aedc582b98aa Uploaded
jackcurragh
parents:
diff changeset
9
aedc582b98aa Uploaded
jackcurragh
parents:
diff changeset
10 if __name__ == "__main__":
aedc582b98aa Uploaded
jackcurragh
parents:
diff changeset
11 track_type = sys.argv[1]
aedc582b98aa Uploaded
jackcurragh
parents:
diff changeset
12 url = sys.argv[2]
aedc582b98aa Uploaded
jackcurragh
parents:
diff changeset
13 sample_name = sys.argv[3]
aedc582b98aa Uploaded
jackcurragh
parents:
diff changeset
14 sample_description = sys.argv[4]
aedc582b98aa Uploaded
jackcurragh
parents:
diff changeset
15 chromosome_position = sys.argv[5]
aedc582b98aa Uploaded
jackcurragh
parents:
diff changeset
16 outpath = sys.argv[6]
aedc582b98aa Uploaded
jackcurragh
parents:
diff changeset
17 main(track_type, url, sample_name, sample_description, chromosome_position, outpath)