view 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
line wrap: on
line source

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)