Mercurial > repos > jackcurragh > ribogalaxy_generate_custom_track
changeset 0:aedc582b98aa draft
Uploaded
author | jackcurragh |
---|---|
date | Fri, 23 Sep 2022 13:11:37 +0000 |
parents | |
children | 02ba4bc97345 |
files | generate_custom_track/construct_custom_track.py generate_custom_track/generate_custom_track.xml |
diffstat | 2 files changed, 53 insertions(+), 0 deletions(-) [+] |
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)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/generate_custom_track/generate_custom_track.xml Fri Sep 23 13:11:37 2022 +0000 @@ -0,0 +1,35 @@ +<tool id="generate-custom_track" name="Generate Custom Track" version="0.1"> + <description>Generates a Custom Track File for GWIPS-viz.</description> + <command> + python construct_custom_track.py $input1 $input2 "$input3" "$input4" + </command> + + <inputs> + <param name="input1" type="select" label="File Type"> + <option value="bigWig" selected="True">bigWig</option> + <option value="bigBed">bigBed</option> + </param> + <param name="input2" type="text" label="URL of File (copy link from history)" /> + <param name="input3" type="text" label="Name of this sample" /> + <param name="input4" type="text" label="Description of this sample" /> + <param name="input5" type="text" label="chromosome position" help="Get this from Gwips.ucc.ie. Hg38 example = chr9:136,848,259-136,851,600"/> + </inputs> + <outputs> + <data name="output1" format="text"/> + </outputs> + <tests> + <test> + <param name="input1" value="test.fasta" ftype="fasta" /> + <param name="input2" value="chr"/> + <output name="output1" file="test.fasta.sizes" ftype="tabular" lines_diff="4" /> + </test> + </tests> + <help> +**What it does** + +Generates a custom track file for GWIPS-viz. + +This is facilitates easy exploration of data processed on RiboGalaxy at a Genome wide scale. + </help> + <citations/> +</tool> \ No newline at end of file