Mercurial > repos > fubar > jbrowse2
diff jbrowse2.xml @ 46:4181e97c70a7 draft
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 3a43e9e0ffce0966101203102e769d1ced28618a
author | fubar |
---|---|
date | Mon, 04 Mar 2024 09:47:19 +0000 |
parents | 0ec526d2d8c1 |
children | 460d5b6c5d98 |
line wrap: on
line diff
--- a/jbrowse2.xml Fri Mar 01 05:15:41 2024 +0000 +++ b/jbrowse2.xml Mon Mar 04 09:47:19 2024 +0000 @@ -1,4 +1,4 @@ - <tool id="jbrowse2" name="jbrowse2" version="@TOOL_VERSION@+@WRAPPER_VERSION@_5" profile="22.05"> + <tool id="jbrowse2" name="jbrowse2" version="@TOOL_VERSION@+@WRAPPER_VERSION@_6" profile="22.05"> <description>genome browser</description> <macros> <import>macros.xml</import> @@ -17,35 +17,75 @@ export JBROWSE2_PATH=\$(dirname \$(which jbrowse))/../opt/jbrowse2 && -## Once that's done, we run the python script to handle the real work -python '$__tool_directory__/jbrowse2.py' ---jbrowse2path \${JBROWSE2_PATH} ---outdir '$output.files_path' ---xml '$trackxml' && -#if $jbgen.zipOut == "true": - (cd '$output.files_path' && zip -r - . ) > '$output' -#else - cp '$output.files_path/index.html' '$output' -#end if -## Ugly testing hack since I cannot get <extra_files> to test the files I want to test. Hmph. -#if str($uglyTestingHack) == "enabled": - && cp '$trackxml' '$output' +#if $jbgen.ucol.formcoll=="collect": + python '$__tool_directory__/autogenJB2.py' + #for $key in $autoCollection.keys(): + #if $autoCollection[$key].is_collection: + #set subCol=$autoCollection[$key] + #set pafs=[($subCol[x],$subcol[x].ext,x) for x in $subCol.keys() if $subCol[x].ext == 'paf'] + #if len($pafs) > 0: + --pafmeta '$pafs[0]' + #set refs = [($pafs[0][2],$subCol[x],x) for x in $subCol.keys() if $subCol[x].ext == 'fasta'] + #for $ref in $refs: + --pafreferencemeta '$ref' + #end for + #end if + #else if $autoCollection[$key].ext == 'fasta': + --referencemeta '$autoCollection[$key],$autoCollection[$key].ext,$key' + #else if $autoCollection[$key].ext in ['bed', 'bigwig', 'cool', 'gff', 'gff3', 'hic', 'maf', 'mcool', 'scool', 'vcf'] + --trackmeta '$autoCollection[$key],$autoCollection[$key].ext,$key' + #else if $autoCollection[$key].ext in ['bam',] + --trackmeta '$autoCollection[$key],$autoCollection[$key].ext,$key,$autoCollection[$key].metadata.bam_index' + #else if $autoCollection[$key].ext in ['cram',] + --trackmeta '$autoCollection[$key],$autoCollection[$key].ext,$key,$autoCollection[$key].metadata.cram_index' + #end if + #end for + --outdir '$output.files_path' + --jbrowse2path \${JBROWSE2_PATH} + --sessName "Autogen JBrowse" && + #if $jbgen.zipOut == "true": + (cd '$output.files_path' && zip -r - . ) > '$output' + #else + cp '$output.files_path/index.html' '$output' + #end if +#else: + python '$__tool_directory__/jbrowse2.py' + --jbrowse2path \${JBROWSE2_PATH} + --outdir '$output.files_path' + --xml '$trackxml' && + #if $jbgen.zipOut == "true": + (cd '$output.files_path' && zip -r - . ) > '$output' + #else + cp '$output.files_path/index.html' '$output' + #end if + ## Ugly testing hack since I cannot get <extra_files> to test the files I want to test. Hmph. + #if str($uglyTestingHack) == "enabled": + && cp '$trackxml' '$output' + #end if #end if ]]></command> <configfiles> <configfile name="trackxml"><![CDATA[<?xml version="1.0"?> +#if $jbgen.ucol.formcoll=="form": <root> <metadata> <genomes> - #if str($reference_genome.genome_type_select) == "indexed": - <genome path="${reference_genome.genome.fields.path}" label="${reference_genome.genome.fields.name}"> + #if str($reference_genome.genome_type_select) == "uri": + <genome path="${reference_genome.uri}" label="${reference_genome.refname}" useuri="yes"> <metadata> <dataset - dname = "${reference_genome.genome.name}" /> + dname = "${reference_genome.refname}" /> + </metadata> + </genome> + #else if str($reference_genome.genome_type_select) == "indexed": + <genome path="${reference_genome.genome.fields.path}" label="${reference_genome.genome.fields.name}" useuri="no"> + <metadata> + <dataset + dname = "${reference_genome.genome.refname}" /> </metadata> </genome> #else - <genome path="$reference_genome.genome" label="${reference_genome.genome.name}"> + <genome path="$reference_genome.genome" label="${reference_genome.genome.name}" useuri="no"> <metadata> <dataset id="${__app__.security.encode_id($reference_genome.genome.id)}" hid="${reference_genome.genome.hid}" size="${reference_genome.genome.get_size(nice_size=True)}" @@ -98,13 +138,14 @@ <tracks> #for $tg in $track_groups: #for $track in $tg.data_tracks: - <track cat="${tg.category}" format="${track.data_format.data_format_select}" visibility="${track.data_format.track_visibility}"> - #if $track.data_format.data_format_select != "sparql": + #if $track.data_format.useuri.insource == "history": + #if $track.data_format.useuri.annotation: + <track cat="${tg.category}" format="${track.data_format.data_format_select}" visibility="${track.data_format.track_visibility}"> <files> - #for $dataset in $track.data_format.annotation: - #if $dataset: - <trackFile path="${dataset}" ext="${dataset.ext}" label="${dataset.name}"> + #for $dataset in $track.data_format.useuri.annotation: + <trackFile path="${dataset}" ext="${dataset.ext}" label="${dataset.name}" useuri="no"> <metadata> + <dataset id="${__app__.security.encode_id($dataset.id)}" hid="${dataset.hid}" size="${dataset.get_size(nice_size=True)}" edam_format="${dataset.datatype.edam_format}" @@ -119,6 +160,7 @@ user_id="-1" display_name="Unnamed History"/> #end if + <metadata #for (key, value) in $dataset.get_metadata().items(): #if "_types" not in $key and $value is not None and len(str($value)) < 5000: @@ -137,25 +179,20 @@ /> </metadata> </trackFile> - #end if - - #end for + #end for </files> - #else - <track cat="${tg.category}" format="sparql" visibility="off"> - #end if <options> #if str($track.data_format.data_format_select) == "bam": <bam> - #for $dataset in $track.data_format.annotation: + #for $dataset in $track.data_format.useuri.annotation: <bam_index>${dataset.metadata.bam_index}</bam_index> #end for </bam> #else if str($track.data_format.data_format_select) == "cram": <cram> - #for $dataset in $track.data_format.annotation: + #for $dataset in $track.data_format.useuri.annotation: <cram_index>${dataset.metadata.cram_index}</cram_index> #end for </cram> @@ -201,11 +238,25 @@ </sparql> #end if </options> + </track> + #end if + #else if track.data_format.useuri.annouri: + <track cat="${tg.category}" format="${track.data_format.data_format_select}" visibility="${track.data_format.track_visibility}"> + <files> + <trackFile path="${track.data_format.useuri.annouri}" ext="${track.data_format.data_format_select}" label="${track.data_format.useuri.annoname}" useuri="yes"> + <metadata> + <dataset id = "${track.data_format.useuri.annouri}" /> + </metadata> + </trackFile> + </files> + <options/> </track> - #end for - #end for + #end if + #end for + #end for </tracks> </root> +#end if ]]></configfile> </configfiles> @@ -214,6 +265,7 @@ <param help="Built-in references" label="Reference genome to display" name="genome_type_select" type="select"> <option selected="True" value="indexed">Use a built-in genome</option> <option value="history">Use a genome from history</option> + <option value="uri">URI for a reference in tabix .gz format </option> </param> <when value="indexed"> <param @@ -236,6 +288,18 @@ type="data"> </param> </when> + <when value="uri"> + <param + label="URI pointing to tabix compressed fasta" + name="uri" + type="text"> + </param> + <param + label="Reference key - dbkey equivalent" + name="refname" + type="text"> + </param> + </when> </conditional> <repeat name="track_groups" title="Track Group"> @@ -348,7 +412,7 @@ <param type="hidden" name="uglyTestingHack" value="" /> </inputs> <outputs> - <data format="html" name="output" label="JBrowse2 on $reference_genome.genome.name"> + <data format="html" name="output" label="JBrowse2"> <change_format> <when input="zipOut" value="true" format="zip" /> </change_format> @@ -363,7 +427,10 @@ <repeat name="data_tracks"> <conditional name="data_format"> <param name="data_format_select" value="bigwig"/> - <param name="annotation" value="bw/merlin.bw"/> + <conditional name="useuri"> + <param name="annotation" value="bw/merlin.bw"/> + <param name="insource" value="history"/> + </conditional> </conditional> </repeat> </repeat> @@ -389,7 +456,10 @@ <repeat name="data_tracks"> <conditional name="data_format"> <param name="data_format_select" value="vcf"/> - <param name="annotation" value="vcf/merlin.vcf"/> + <conditional name="useuri"> + <param name="insource" value="history"/> + <param name="annotation" value="vcf/merlin.vcf"/> + </conditional> </conditional> </repeat> </repeat> @@ -428,7 +498,10 @@ <repeat name="data_tracks"> <conditional name="data_format"> <param name="data_format_select" value="gene_calls"/> - <param name="annotation" value="bed/test-3.bed"/> + <conditional name="useuri"> + <param name="insource" value="history"/> + <param name="annotation" value="bed/test-3.bed"/> + </conditional> </conditional> </repeat> </repeat> @@ -453,7 +526,10 @@ <repeat name="data_tracks"> <conditional name="data_format"> <param name="data_format_select" value="gene_calls"/> - <param name="annotation" value="gff3/A.gff"/> + <conditional name="useuri"> + <param name="insource" value="history"/> + <param name="annotation" value="gff3/A.gff"/> + </conditional> <conditional name="match_part"> <param name="match_part_select" value="false"/> </conditional> @@ -474,7 +550,10 @@ <repeat name="data_tracks"> <conditional name="data_format"> <param name="data_format_select" value="gene_calls"/> + <conditional name="useuri"> + <param name="insource" value="history"/> <param name="annotation" value="gff3/1.gff"/> + </conditional> <conditional name="match_part"> <param name="match_part_select" value="false"/> </conditional> @@ -496,7 +575,10 @@ <repeat name="data_tracks"> <conditional name="data_format"> <param name="data_format_select" value="gene_calls"/> - <param name="annotation" value="gff3/C.gff"/> + <conditional name="useuri"> + <param name="insource" value= "history"/> + <param name="annotation" value="gff3/C.gff"/> + </conditional> <conditional name="match_part"> <param name="match_part_select" value="false"/> </conditional> @@ -520,8 +602,11 @@ <repeat name="data_tracks"> <conditional name="data_format"> <param name="data_format_select" value="gene_calls"/> - <param name="annotation" value="gff3/B.gff"/> - <conditional name="match_part"> + <conditional name="useuri"> + <param name="annotation" value="gff3/B.gff"/> + <param name="insource" value= "history"/> + </conditional> + <conditional name="match_part"> <param name="match_part_select" value="false"/> </conditional> <section name="jbcolor_scale"> @@ -545,7 +630,10 @@ <repeat name="data_tracks"> <conditional name="data_format"> <param name="data_format_select" value="gene_calls"/> - <param name="annotation" value="gff3/A.gff"/> + <conditional name="useuri"> + <param name="annotation" value="gff3/A.gff"/> + <param name="insource" value= "history"/> + </conditional> <conditional name="match_part"> <param name="match_part_select" value="false"/> </conditional> @@ -571,7 +659,10 @@ <repeat name="data_tracks"> <conditional name="data_format"> <param name="data_format_select" value="gene_calls"/> - <param name="annotation" value="gff3/1.gff"/> + <conditional name="useuri"> + <param name="annotation" value="gff3/1.gff"/> + <param name="insource" value= "history"/> + </conditional> <conditional name="match_part"> <param name="match_part_select" value="false"/> </conditional> @@ -602,7 +693,10 @@ <repeat name="data_tracks"> <conditional name="data_format"> <param name="data_format_select" value="gene_calls"/> - <param name="annotation" value="gff3/interpro.gff"/> + <conditional name="useuri"> + <param name="annotation" value="gff3/interpro.gff"/> + <param name="insource" value= "history"/> + </conditional> <conditional name="match_part"> <param name="match_part_select" value="false"/> </conditional> @@ -619,7 +713,10 @@ <repeat name="data_tracks"> <conditional name="data_format"> <param name="data_format_select" value="gene_calls"/> - <param name="annotation" value="gff3/2.gff"/> + <conditional name="useuri"> + <param name="annotation" value="gff3/2.gff"/> + <param name="insource" value= "history"/> + </conditional> <conditional name="match_part"> <param name="match_part_select" value="true"/> <param name="name" value="cDNA_match"/> @@ -659,7 +756,10 @@ <repeat name="data_tracks"> <conditional name="data_format"> <param name="data_format_select" value="gene_calls"/> - <param name="annotation" value="gff3/1.gff"/> + <conditional name="useuri"> + <param name="annotation" value="gff3/1.gff"/> + <param name="insource" value= "history"/> + </conditional> <conditional name="match_part"> <param name="match_part_select" value="false"/> </conditional> @@ -691,7 +791,11 @@ <repeat name="data_tracks"> <conditional name="data_format"> <param name="data_format_select" value="gene_calls"/> - <param name="annotation" value="gff3/1.gff"/> + <conditional name="useuri"> + <param name="annotation" value="gff3/1.gff"/> + <param name="insource" value= "history"/> + </conditional> + <param name="insource" value= "history"/> <conditional name="match_part"> <param name="match_part_select" value="false"/> </conditional>