Mercurial > repos > yating-l > jbrowsearchivecreator
view jbrowse_hub.xml @ 0:804a93e87cc8 draft
planemo upload for repository https://github.com/Yating-L/jbrowse_hub commit f22711ea7a464bdaf4d5aaea07f2eacf967aa66e-dirty
author | yating-l |
---|---|
date | Wed, 12 Apr 2017 17:41:55 -0400 |
parents | |
children | ac83821b0e06 |
line wrap: on
line source
<tool id="jbrowse_hub" name="JBrowse Hub Creator" version="1.0"> <description> This Galaxy tool is used to prepare your files to be ready for displaying on JBrowse </description> <requirements> <requirement type="package" version="1.2">samtools</requirement> <requirement type="package" version="1.9">numpy</requirement> <requirement type="package" version="1.68">biopython</requirement> <requirement type="package" version="1.0">ucsc_tools_340</requirement> <requirement type="package" version="1.12.1">jbrowse_tools</requirement> </requirements> <stdio> </stdio> <command detect_errors="exit_code"><![CDATA[ python $__tool_directory__/jbrowse_hub.py --fasta '$reference' --genome_name '$genome_name' #set galaxy_url = str($GALAXY_URL) #set $jbrowse_url = galaxy_url.replace("8080", "80") --jbrowse_host '$jbrowse_url' ## json metadata recording from Remi's hub-archive-creator.xml #import json #set global data_parameter_dict = {} ## Function to retrieve the data of the inputs #def prepare_json($input_to_prepare, $extra_data_dict={}) #set false_path = str($input_to_prepare) #set name = $input_to_prepare.name #set data_dict = {"name": $name} #silent data_dict.update($extra_data_dict) #silent $data_parameter_dict.update({$false_path: $data_dict}) #end def #for $g in $group #for $f in $g.format #set track_label = str($f.formatChoice.label) #set group_name = str($g.group_name) #set extra_data_dict = {"label" : $track_label, "category" : $group_name} #if $f.formatChoice.format_select == 'bed' #set track_color = str($f.formatChoice.track_color) #silent extra_data_dict.update({"color" : $track_color}) #if $f.formatChoice.bedChoice.bed_select == 'bed_generic_option' --bed $f.formatChoice.bedChoice.BED_generic #silent $prepare_json($f.formatChoice.bedChoice.BED_generic, extra_data_dict) #elif $f.formatChoice.bedChoice.bed_select == 'bed_simple_repeats_option' --bedSimpleRepeats $f.formatChoice.bedChoice.BED_simple_repeats #silent $prepare_json($f.formatChoice.bedChoice.BED_simple_repeats, extra_data_dict) #elif $f.formatChoice.bedChoice.bed_select == 'bed_splice_junctions_option' --bedSpliceJunctions $f.formatChoice.bedChoice.BED_splice_junctions #silent $prepare_json($f.formatChoice.bedChoice.BED_splice_junctions, extra_data_dict) #end if #end if #if $f.formatChoice.format_select == 'bam' --bam $f.formatChoice.BAM #silent $prepare_json($f.formatChoice.BAM, extra_data_dict) #end if #if $f.formatChoice.format_select == 'gff3' #set track_color = str($f.formatChoice.track_color) #silent extra_data_dict.update({"color" : $track_color}) #if $f.formatChoice.gff3Choice.gff3_select == 'gff3_generic' --gff3 $f.formatChoice.gff3Choice.GFF3_generic #silent $prepare_json($f.formatChoice.gff3Choice.GFF3_generic, extra_data_dict) #elif $f.formatChoice.gff3Choice.gff3_select == 'gff3_transcript' --gff3_transcript $f.formatChoice.gff3Choice.GFF3_transcript #silent $prepare_json($f.formatChoice.gff3Choice.GFF3_transcript, extra_data_dict) #elif $f.formatChoice.gff3Choice.gff3_select == 'gff3_mrna' --gff3_mrna $f.formatChoice.gff3Choice.GFF3_mrna #silent $prepare_json($f.formatChoice.gff3Choice.GFF3_mrna, extra_data_dict) #end if #end if #if $f.formatChoice.format_select == 'blastxml' --blastxml $f.formatChoice.BlastXML #silent $prepare_json($f.formatChoice.BlastXML, extra_data_dict) #end if #if $f.formatChoice.format_select == 'gtf' --gtf $f.formatChoice.GTF #set track_color = str($f.formatChoice.track_color) #silent extra_data_dict.update({"color" : $track_color}) #silent $prepare_json($f.formatChoice.GTF, extra_data_dict) #end if #if $f.formatChoice.format_select == 'bigwig' --bigwig $f.formatChoice.BIGWIG #set pos_color = str($f.formatChoice.pos_color) #set neg_color = str($f.formatChoice.neg_color) #silent $extra_data_dict.update({"style" : {"pos_color" : $pos_color, "neg_color" : $neg_color}}) #silent $prepare_json($f.formatChoice.BIGWIG, extra_data_dict) #end if #end for #end for #set all_data_json = json.dumps($data_parameter_dict) -j '$all_data_json' -e '$output.extra_files_path' -o '$output' ]]></command> <inputs> <param name="GALAXY_URL" type="baseurl" value="" /> <param name="reference" type="data" format="fasta" label="Reference Genome" /> <param name="genome_name" type="text" size="30" value="unknown" label="Genome name" /> <repeat name="group" title="New group"> <param type="text" name="group_name" label="Group name" value="Default group"/> <repeat name="format" title="New track"> <conditional name="formatChoice"> <param name="format_select" type="select" label="Format"> <option value="bam" selected="true">BAM</option> <option value="bed">BED</option> <option value="blastxml">BLASTXML</option> <option value="bigwig">BIGWIG</option> <option value="gff3">GFF3</option> <option value="gtf">GTF</option> </param> <when value="bam"> <param format="bam" name="BAM" type="data" label="BAM File" /> <param name="label" type="text" size="30" value = "Sequence Alignment" label="Track name" /> </when> <when value="bed"> <conditional name="bedChoice"> <param name="bed_select" type="select" label="Bed Choice"> <option value="bed_generic_option">BED format</option> <option value="bed_simple_repeats_option">BED Simple repeat (bed4+12 / simpleRepeat.as)</option> <option value="bed_splice_junctions_option">BED Splice junctions (bed12+1 / spliceJunctions.as)</option> </param> <when value="bed_generic_option"> <param format="bed" name="BED_generic" type="data" label="Bed File" /> </when> <when value="bed_simple_repeats_option"> <param format="bed" name="BED_simple_repeats" type="data" label="Bed Simple Repeats (Bed4+12) File" /> </when> <when value="bed_splice_junctions_option"> <param format="bed" name="BED_splice_junctions" type="data" label="Bed Splice Junctions (Bed12+1) File" /> </when> </conditional> <param name="label" type="text" size="30" value="BED file" label="Track name" /> <param name="track_color" type="color" label="Track color" value="#daa520"> <sanitizer> <valid initial="string.letters,string.digits"> <add value="#"/> </valid> </sanitizer> </param> </when> <when value="blastxml"> <param format="blastxml" name="BlastXML" type="data" label="Blast Alignments File" /> <param name="label" type="text" size="30" value="Blast Alignment" label="Track name" /> </when> <when value="bigwig"> <param format="bigwig" name="BIGWIG" type="data" label="BIGWIG File" /> <param name="label" type="text" size="30" value="Sequence Coverage" label="Track name" /> <param name="pos_color" type="color" label="Positive Coverage Color" value="#FFA600"> <sanitizer> <valid initial="string.letters,string.digits"> <add value="#"/> </valid> </sanitizer> </param> <param name="neg_color" type="color" label="Negative Coverage Color" value="#005EFF"> <sanitizer> <valid initial="string.letters,string.digits"> <add value="#"/> </valid> </sanitizer> </param> </when> <when value="gff3"> <conditional name="gff3Choice"> <param name="gff3_select" type="select" label="gff3 type"> <option value="gff3_generic">GFF3 format</option> <option value="gff3_transcript">GFF3 format output from gene prediction tools (e.g. Augustus), structure: gene->transcription->CDS</option> <option value="gff3_mrna">GFF3 format output from gene prediction tools (e.g. SNAP), structure: gene->mRNA->CDS</option> </param> <when value="gff3_generic"> <param format="gff3" name="GFF3_generic" type="data" label="GFF3 File" /> </when> <when value="gff3_transcript"> <param format="gff3" name="GFF3_transcript" type="data" label="GFF3 File from gene prediction" /> </when> <when value="gff3_mrna"> <param format="gff3" name="GFF3_mrna" type="data" label="GFF3 File from gene prediction" /> </when> </conditional> <param name="label" type="text" size="30" value="Gene Prediction" label="Track name" /> <param name="track_color" type="color" label="Track color" value="#daa520"> <sanitizer> <valid initial="string.letters,string.digits"> <add value="#"/> </valid> </sanitizer> </param> </when> <when value="gtf"> <param format="gtf" name="GTF" type="data" label="GTF File" /> <param name="label" type="text" size="30" value="Assembled Transcripts" label="Track name" /> <param name="track_color" type="color" label="Track color" value="#daa520"> <sanitizer> <valid initial="string.letters,string.digits"> <add value="#"/> </valid> </sanitizer> </param> </when> </conditional> </repeat> </repeat> </inputs> <outputs> <data format="html" name="output" label="${tool.name}" /> </outputs> <tests> <test> <param name="reference" value="dbia3/raw/dbia3.fa" /> <param name="output" value="hubtest" /> <repeat name="group"> <param name="group_name" value="Default group"/> <repeat name="format"> <conditional name="formatChoice"> <param name="format_select" value="gff3_transcript"/> <param name="GFF3_transcript" value="dbia3/raw/Augustus_on_data_3__GTF_GFF.gff3" /> </conditional> </repeat> </repeat> <output name="output" file="hubtest" > </output> </test> </tests> <help> This Galaxy tool will create a tar file which including raw datasets and json datasets that can be used for JBrowse visualization. </help> <citations> </citations> </tool>