Next changeset 1:fb5e60d4d18a (2016-07-13) |
Commit message:
Uploaded |
added:
hubArchiveCreator.xml |
b |
diff -r 000000000000 -r 0f3bc17e5ede hubArchiveCreator.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/hubArchiveCreator.xml Wed Jul 13 13:22:54 2016 -0400 |
[ |
b'@@ -0,0 +1,227 @@\n+<tool id="hubArchiveCreator" name="Hub Archive Creator" version="2.0.2">\n+ <description>\n+ This Galaxy tool permits to prepare your files to be ready for\n+ Assembly Hub visualization.\n+ </description>\n+\n+ <requirements>\n+ <requirement type="package" version="312">ucsc_tools</requirement>\n+ <requirement type="package" version="0.0.1">gff3ToGenePred</requirement>\n+ <requirement type="package" version="0.0.1">gtfToGenePred</requirement>\n+ <requirement type="package" version="0.0.1">genePredToBed</requirement>\n+ <requirement type="package" version="1.2">samtools</requirement>\n+ <!-- Conda dependencies -->\n+ <requirement type="package" version="324">ucsc-gff3togenepred</requirement>\n+ <requirement type="package" version="324">ucsc-gtftogenepred</requirement>\n+ <requirement type="package" version="324">ucsc-genepredtobed</requirement>\n+ <requirement type="package" version="1.3.1">samtools</requirement>\n+ </requirements>\n+\n+ <stdio>\n+ <regex match="^pass1"\n+ source="stderr"\n+ level="log"\n+ description="bedToBigBed"/>\n+ <!-- TODO: Add the case pass1 and 0 chroms -->\n+ <!-- TODO: Add the case pass2 and 0 records or 0 fields -->\n+ </stdio>\n+\n+ <!-- Idea: python \\ -augustus [parameters] \\ -trfBig [parameters] -->\n+ <command detect_errors="exit_code"><![CDATA[\n+ mkdir -p $output.extra_files_path;\n+ python $__tool_directory__/hubArchiveCreator.py\n+\n+ #import json\n+\n+ #set global data_parameter_dict = {}\n+\n+ ## Function to retrieve the data of the inputs\n+ #def prepare_json($input_to_prepare, $order_index, $extra_data_dict={})\n+ #set false_path = str($input_to_prepare)\n+ #set name = $input_to_prepare.name\n+\n+ #set data_dict = {"name": $name}\n+ #silent data_dict.update($extra_data_dict)\n+\n+ ## Add the ordering by taking the tool form indexes\n+ #silent $data_dict.update({"order_index": $order_index + 1})\n+\n+ #silent $data_parameter_dict.update({$false_path: $data_dict})\n+\n+ #end def\n+\n+ #for $i, $f in enumerate( $format )\n+ #if $f.formatChoice.format_select == "bam"\n+ --bam $f.formatChoice.BAM\n+ #set bam_index = $f.formatChoice.BAM.metadata.bam_index\n+ #silent $prepare_json($f.formatChoice.BAM, $i, {"index": $bam_index})\n+ #end if\n+ #if $f.formatChoice.format_select == "bed"\n+ #if $f.formatChoice.bedChoice.bed_select == "bed"\n+ --bed $f.formatChoice.bedChoice.BED\n+ #silent $prepare_json($f.formatChoice.bedChoice.BED, $i)\n+ #end if\n+ #if $f.formatChoice.bedChoice.bed_select == "bed_simple_repeats_option"\n+ --bedSimpleRepeats $f.formatChoice.bedChoice.BED_simple_repeats\n+ #silent $prepare_json($f.formatChoice.bedChoice.BED_simple_repeats, $i)\n+ #end if\n+ #end if\n+ #if $f.formatChoice.format_select == "bigwig"\n+ --bigwig $f.formatChoice.BIGWIG\n+ #silent $prepare_json($f.formatChoice.BIGWIG, $i)\n+ #end if\n+ #if $f.formatChoice.format_select == "gff3"\n+ --gff3 $f.formatChoice.GFF3\n+ #silent $prepare_json($f.formatChoice.GFF3, $i)\n+ #end if\n+ #if $f.formatChoice.format_select == "gtf"\n+ ## Add also GTF from Agustus? See https://github.com/ENCODE-DCC/kentUtils/issues/8\n+ --gtf $f.formatChoice.GTF\n+ #silent $prepare_json($f.formatChoice.GTF, $i)\n+ #end if\n+ #end for\n+\n+ ## Dump the final json\n+ #set all_data_json = json.dumps($data_parameter_dict)\n+\n+ -f $Fasta_File\n+ --data_json \'$all_data_json\'\n+\n+ -d'..b' <param\n+ format="gtf"\n+ name="GTF"\n+ type="data"\n+ label="GTF File"\n+ />\n+ </when>\n+ <when value="bed">\n+ <conditional name="bedChoice">\n+ <param name="bed_select" type="select" label="Bed Choice">\n+ <option value="bed" selected="true">Generic BED</option>\n+ <option value="bed_simple_repeats_option">BED simple repeats</option>\n+ </param>\n+ <when value="bed">\n+ <param\n+ format="bed"\n+ name="BED"\n+ type="data"\n+ label="Generic Bed File Choice"\n+ />\n+ </when>\n+ <when value="bed_simple_repeats_option">\n+ <param\n+ format="bed"\n+ name="BED_simple_repeats"\n+ type="data"\n+ label="Bed Simple Repeats (Bed4+12) File"\n+ />\n+ </when>\n+ </conditional>\n+ </when>\n+ </conditional>\n+ </repeat>\n+ </inputs>\n+\n+ <outputs>\n+ <data format="trackhub" name="output"/>\n+ </outputs>\n+\n+ <tests>\n+ <!-- Can also use assert_command to test command -->\n+ <!-- Testing GFF3 input -->\n+ <test>\n+ <param name="Fasta_File" value="dbia3.fa"/>\n+ <repeat name="format">\n+ <conditional name="formatChoice">\n+ <param name="format_select" value="gff3"/>\n+ <param name="GFF3" value="augustusDbia3.gff3"/>\n+ </conditional>\n+ </repeat>\n+ <repeat name="format">\n+ <param name="BED_simple_repeats" value="dbia3_trfBig_unsorted.bed"/>\n+ <!-- TODO: Ask why the tests are not passing with this xml:\n+ Error creating a job for these tool inputs - Error executing tool: \'NoneType\' object has no attribute \'current_history\'\n+ <conditional name="formatChoice">\n+ <param name="format_select" value="bed"/>\n+ <conditional name="bedChoice">\n+ <param name="bed_select" value="bed_simple_repeats_option"/>\n+ <param name="BED_simple_repeats" value="dbia3_trfBig_unsorted.bed"/>\n+ </conditional>\n+ </conditional>\n+ -->\n+ </repeat>\n+\n+ <output name="output">\n+ <assert_contents>\n+ <has_text text="myHub"/>\n+ </assert_contents>\n+ <assert_contents>\n+ <has_text text="dbia3_trfBig.bb"/>\n+ </assert_contents>\n+ <assert_contents>\n+ <has_text text="SAODOAii qwwqod92921"/>\n+ </assert_contents>\n+ </output>\n+ </test>\n+ <test>\n+ <param name="Fasta_File" value="dbia3.fa"/>\n+ <param name="GFF3" value="augustusDbia3.gff3"/>\n+ <output name="output" file="augustusOutput.html" lines_diff="2">\n+ <extra_files type="directory" value="myHub"/>\n+ <extra_files type="file" name="myHub/dbia3/tracks/augustusDbia3.bb" value="augustusDbia3.bb"/>\n+ </output>\n+ </test>\n+ <!-- Testing Generic BED input -->\n+ <!-- Testing Bed Simple repeat input -->\n+ </tests>\n+\n+ <help>\n+ This Galaxy tool permits to prepare your files to be ready for\n+ Assembly Hub visualization.\n+ </help>\n+</tool>\n' |