Mercurial > repos > jackcurragh > ribogalaxy_generate_custom_track
comparison 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 |
comparison
equal
deleted
inserted
replaced
2:1fd87301a4fb | 3:f46c581ca166 |
---|---|
1 import sys | 1 import sys |
2 | 2 |
3 def main(track_type, url, sample_name, sample_description, chromosome_position, outpath): | 3 def main(track_type, url, sample_name, sample_description, chromosome_position, outpath): |
4 | 4 |
5 with open(outpath, 'w') as f: | 5 with open(outpath, 'w') as f: |
6 f. write(f""" | 6 f. write( |
7 browser position {chromosome_position} | 7 f"""browser position {chromosome_position} |
8 track type={track_type} name="{sample_name}" description="{sample_description}" bigDataUrl={url} | 8 track type={track_type} name="{sample_name}" description="{sample_description}" bigDataUrl={url}""") |
9 """) | |
10 | 9 |
11 if __name__ == "__main__": | 10 if __name__ == "__main__": |
12 track_type = sys.argv[1] | 11 track_type = sys.argv[1] |
13 url = sys.argv[2] | 12 url = sys.argv[2] |
14 sample_name = sys.argv[3] | 13 sample_name = sys.argv[3] |