Mercurial > repos > iuc > circos
changeset 13:c4bde687c846 draft default tip
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/circos commit 0cfd88d16b0b20a66d4b21b037ddee6a8c440d88
author | iuc |
---|---|
date | Wed, 12 Apr 2023 15:09:05 +0000 |
parents | 290a11559985 |
children | |
files | circos.xml macros.xml macros_tests.xml process-cytogenetic-bands.py stack-histogram.py stack-histogram.xml tableviewer.xml test-data/2/out.tar test-data/3/chrom.tab test-data/3/out.png test-data/too-many.fa |
diffstat | 11 files changed, 696 insertions(+), 58 deletions(-) [+] |
line wrap: on
line diff
--- a/circos.xml Mon Nov 22 12:23:12 2021 +0000 +++ b/circos.xml Wed Apr 12 15:09:05 2023 +0000 @@ -1,11 +1,6 @@ <?xml version="1.0"?> -<tool id="circos" name="Circos" version="@WRAPPER_VERSION@"> +<tool id="circos" name="Circos" version="@WRAPPER_VERSION@" profile="21.09"> <description>visualizes data in a circular layout</description> - <xrefs> - <xref type="bio.tools">galactic_circos</xref> - <!--<xref type="bioconda">circos</xref>--> - <!--<xref type="rrid">RRID:SCR_018207</xref>--> - </xrefs> <macros> <import>macros.xml</import> <import>macros_conffiles.xml</import> @@ -18,6 +13,11 @@ <edam_operations> <edam_operation>operation_0337</edam_operation> </edam_operations> + <xrefs> + <xref type="bio.tools">galactic_circos</xref> + <!--<xref type="bioconda">circos</xref>--> + <!--<xref type="rrid">RRID:SCR_018207</xref>--> + </xrefs> <expand macro="requirements"/> <stdio> <!-- Anything other than zero is an error --> @@ -29,10 +29,10 @@ <version_command>circos --version</version_command> <command><![CDATA[ ## Directory structure -mkdir -p circos/conf/ circos/data/ && +mkdir -p circos/conf/ circos/data/; #if $reference_genome.ref.ref_source == 'history': - ln -s '$reference_genome.ref.genome_fasta' genomeref.fa && + ln -s '$reference_genome.ref.genome_fasta' genomeref.fa; #end if #if $reference_genome.ref.ref_source in ('lengths', 'cached'): @@ -48,61 +48,61 @@ <(head -n 50 '${reference_genome.ref.fasta_indexes.fields.len_path}') #end if #end if - > circos/conf/karyotype.txt && + > circos/conf/karyotype.txt; #else if $reference_genome.ref.ref_source == 'karyotype': - cp $reference_genome.ref.input_karyotype circos/conf/karyotype.txt && + cp '${reference_genome.ref.input_karyotype}' circos/conf/karyotype.txt; #else if str($reference_genome.ref.ref_source) == 'history': ## Process the karyotype.txt file python '$__tool_directory__/karyotype-from-fasta.py' genomeref.fa - > circos/conf/karyotype.txt && + > circos/conf/karyotype.txt; #else if $reference_genome.ref.ref_source == 'preset': - cp '$__tool_directory__/karyotype/${reference_genome.ref.preset_karyotype}' circos/conf/karyotype.txt && + cp '$__tool_directory__/karyotype/${reference_genome.ref.preset_karyotype}' circos/conf/karyotype.txt; #end if python '$__tool_directory__/karyotype-colors.py' `grep -c '^chr\s' 'circos/conf/karyotype.txt'` - > 'circos/conf/karyotype-colors.conf' && + > 'circos/conf/karyotype-colors.conf'; -touch circos/conf/karyotype-colors.conf && +touch circos/conf/karyotype-colors.conf; ## #if $ideogram.bands.bands: ## #if $ideogram.bands.convert_bands: ## python '$__tool_directory__/process-cytogenetic-bands.py' ## '${ideogram.bands.bands}' ## >> circos/conf/karyotype.txt -## 2> circos/conf/karyotype-colors.conf && +## 2> circos/conf/karyotype-colors.conf; ## #else ## cat '${ideogram.bands.bands}' -## >> circos/conf/karyotype.txt && +## >> circos/conf/karyotype.txt; ## #end if ## #end if #if $plot_options.colour_profile: #if str($plot_options.colour_profile) == 'cg': - cat '$__tool_directory__/colours/cg.conf' >> circos/conf/karyotype-colors.conf && + cat '$__tool_directory__/colours/cg.conf' >> circos/conf/karyotype-colors.conf; #end if #end if -cp '$circos_conf' circos/conf/circos.conf && -cp '$ticks_conf' circos/conf/ticks.conf && -cp '$ideogram_conf' circos/conf/ideogram.conf && -cp '$data_conf' circos/conf/data.conf && -cp '$links_conf' circos/conf/links.conf && -cp '$test_case_conf' circos/conf/galaxy_test_case.json && +cp '$circos_conf' circos/conf/circos.conf ; +cp '$ticks_conf' circos/conf/ticks.conf ; +cp '$ideogram_conf' circos/conf/ideogram.conf ; +cp '$data_conf' circos/conf/data.conf ; +cp '$links_conf' circos/conf/links.conf ; +cp '$test_case_conf' circos/conf/galaxy_test_case.json ; ## 2D Data Plots #for $hi, $data in enumerate($sec_tdd.data): - cp '${data.plot_format.data_source}' circos/data/data-${hi}.txt && + cp '${data.plot_format.data_source}' circos/data/data-${hi}.txt ; #end for ## Link Tracks #for $hi, $data in enumerate($sec_links.data): - cp '${data.data_source}' circos/data/links-${hi}.txt && + cp '${data.data_source}' circos/data/links-${hi}.txt ; #end for #if $outputs.tar == "yes" - tar -czf circos.tar.gz circos && + tar -czf circos.tar.gz circos ; #end if #if $outputs.svg == "yes" or $outputs.png == "yes": @@ -617,10 +617,10 @@ </section> </inputs> <outputs> - <data name="output_png" format="png" from_work_dir="circos.png" label="Circos Plot"> + <data name="output_png" format="png" from_work_dir="circos.png" label="Circos Plot (PNG)"> <filter>outputs['png']</filter> </data> - <data name="output_svg" format="svg" from_work_dir="circos.svg" label="Circos Plot"> + <data name="output_svg" format="svg" from_work_dir="circos.svg" label="Circos Plot (SVG)"> <filter>outputs['svg']</filter> </data> <data name="output_tar" format="tar.gz" from_work_dir="circos.tar.gz" label="Circos Conf Files">
--- a/macros.xml Mon Nov 22 12:23:12 2021 +0000 +++ b/macros.xml Wed Apr 12 15:09:05 2023 +0000 @@ -1,21 +1,20 @@ <?xml version="1.0"?> <macros> <token name="@TOOL_VERSION@">0.69.8</token> - <token name="@VERSION_SUFFIX@">10</token> + <token name="@VERSION_SUFFIX@">12</token> <token name="@WRAPPER_VERSION@">@TOOL_VERSION@+galaxy@VERSION_SUFFIX@</token> <xml name="requirements"> <requirements> <requirement type="package" version="@TOOL_VERSION@">circos</requirement> - <requirement type="package" version="2.7">python</requirement> - <requirement type="package" version="0.6.4">bcbiogff</requirement> - <requirement type="package" version="1.70">biopython</requirement> - <requirement type="package" version="0.3.13">pybigwig</requirement> + <requirement type="package" version="0.6.6">bcbiogff</requirement> + <!-- tiles-from-gff3.py and text-from-gff3.py needs UnknownSeq which is removed in 1.81 --> + <requirement type="package" version="1.79">biopython</requirement> + <requirement type="package" version="0.3.18">pybigwig</requirement> <requirement type="package" version="0.23">circos-tools</requirement> - <requirement type="package" version="3.4">grep</requirement> - <requirement type="package" version="5.1.0">gawk</requirement> - <requirement type="package" version="1.29">tar</requirement> + <requirement type="package" version="3.10">grep</requirement> + <requirement type="package" version="1.34">tar</requirement> <yield /> </requirements> </xml>
--- a/macros_tests.xml Mon Nov 22 12:23:12 2021 +0000 +++ b/macros_tests.xml Wed Apr 12 15:09:05 2023 +0000 @@ -23,24 +23,9 @@ <section name="reference_genome"> <conditional name="ref"> <param name="ref_source" value="history" /> - <param name="genome_fasta" value="1/input.fa" /> + <param name="genome_fasta" value="too-many.fa" /> </conditional> </section> - - <section name="outputs"> - <param name="png" value="yes" /> - <param name="svg" value="yes" /> - </section> - - <section name="limits"> - <param name="max_ticks" value="1" /> - <param name="max_ideograms" value="1" /> - <param name="max_links" value="1" /> - <param name="max_points_per_track" value="1" /> - </section> - - <output name="output_png" file="0/out.png" compare="sim_size" delta="15000" ftype="png"/> - <output name="output_svg" file="0/out.svg" compare="sim_size" delta="15000" ftype="svg"/> </test> <test> @@ -113,6 +98,36 @@ <output name="output_png" file="1/out.png" compare="sim_size" delta="15000" ftype="png"/> <output name="output_svg" file="1/out.svg" compare="sim_size" delta="15000" ftype="svg"/> </test> + <test> + <section name="reference_genome"> + <conditional name="ref"> + <param name="ref_source" value="history" /> + <param name="genome_fasta" value="1/input.fa" /> + </conditional> + </section> + + <section name="outputs"> + <param name="tar" value="yes" /> + <param name="png" value="no" /> + <param name="svg" value="no" /> + </section> + + <output name="output_tar" file="2/out.tar" compare="sim_size" delta="15000"/> + </test> + <test> + <section name="reference_genome"> + <conditional name="ref"> + <param name="ref_source" value="karyotype" /> + <param name="input_karyotype" value="3/chrom.tab" /> + </conditional> + </section> + + <section name="outputs"> + <param name="png" value="yes" /> + </section> + + <output name="output_tar" file="3/out.png" compare="sim_size" delta="15000"/> + </test> </tests> </xml> </macros>
--- a/process-cytogenetic-bands.py Mon Nov 22 12:23:12 2021 +0000 +++ b/process-cytogenetic-bands.py Wed Apr 12 15:09:05 2023 +0000 @@ -29,7 +29,7 @@ if line.startswith("#"): continue - lineData = dict(zip(COLS, line.split())) + lineData = dict(list(zip(COLS, line.split()))) color = lineData.get("itemRgb", "gpos50") if color not in colormap: @@ -47,7 +47,7 @@ # Does not look like an int continue - colormap[color] = "gx-karyotype-%s" % len(colormap.keys()) + colormap[color] = "gx-karyotype-%s" % len(list(colormap.keys())) sys.stderr.write( "{colorName} = {color}\n".format(colorName=colormap[color], color=color)
--- a/stack-histogram.py Mon Nov 22 12:23:12 2021 +0000 +++ b/stack-histogram.py Wed Apr 12 15:09:05 2023 +0000 @@ -12,7 +12,7 @@ bws = [pyBigWig.open(x) for x in files] # obtain some chroms. Hope all sets are identical! - k = bws[0].chroms().keys() + k = list(bws[0].chroms().keys()) # do magic? # nah.
--- a/stack-histogram.xml Mon Nov 22 12:23:12 2021 +0000 +++ b/stack-histogram.xml Wed Apr 12 15:09:05 2023 +0000 @@ -29,7 +29,7 @@ <tests> <test> <param name="input" value="scatter/1.bw,scatter/1.bw,scatter/1.bw" ftype="bigwig" /> - <output name="output" file="scatter/1.multi.out" ftype="tabular" /> + <output name="output" file="scatter/1.multi.out" ftype="tabular" sort="true"/> </test> </tests> <help><![CDATA[
--- a/tableviewer.xml Mon Nov 22 12:23:12 2021 +0000 +++ b/tableviewer.xml Wed Apr 12 15:09:05 2023 +0000 @@ -620,10 +620,10 @@ <expand macro="limits" /> </inputs> <outputs> - <data name="output_png" format="png" from_work_dir="circos.png" label="Circos TableViewer Plot"> + <data name="output_png" format="png" from_work_dir="circos.png" label="Circos TableViewer Plot (PNG)"> <filter>outputs['png']</filter> </data> - <data name="output_svg" format="svg" from_work_dir="circos.svg" label="Circos TableViewer Plot"> + <data name="output_svg" format="svg" from_work_dir="circos.svg" label="Circos TableViewer Plot (SVG)"> <filter>outputs['svg']</filter> </data> <data name="output_tar" format="tar.gz" from_work_dir="circos.tar.gz" label="Circos TableViewer Conf Files">
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/3/chrom.tab Wed Apr 12 15:09:05 2023 +0000 @@ -0,0 +1,24 @@ +chr - hs1 1 0 249250621 chr1 +chr - hs2 2 0 243199373 chr2 +chr - hs3 3 0 198022430 chr3 +chr - hs4 4 0 191154276 chr4 +chr - hs5 5 0 180915260 chr5 +chr - hs6 6 0 171115067 chr6 +chr - hs7 7 0 159138663 chr7 +chr - hs8 8 0 146364022 chr8 +chr - hs9 9 0 141213431 chr9 +chr - hs10 10 0 135534747 chr10 +chr - hs11 11 0 135006516 chr11 +chr - hs12 12 0 133851895 chr12 +chr - hs13 13 0 115169878 chr13 +chr - hs14 14 0 107349540 chr14 +chr - hs15 15 0 102531392 chr15 +chr - hs16 16 0 90354753 chr16 +chr - hs17 17 0 81195210 chr17 +chr - hs18 18 0 78077248 chr18 +chr - hs19 19 0 59128983 chr19 +chr - hs20 20 0 63025520 chr20 +chr - hs21 21 0 48129895 chr21 +chr - hs22 22 0 51304566 chr22 +chr - hsX x 0 155270560 chrx +chr - hsY y 0 59373566 chry
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/too-many.fa Wed Apr 12 15:09:05 2023 +0000 @@ -0,0 +1,600 @@ +>seq1 +tcga +>seq2 +tcga +>seq3 +tcga +>seq4 +tcga +>seq5 +tcga +>seq6 +tcga +>seq7 +tcga +>seq8 +tcga +>seq9 +tcga +>seq10 +tcga +>seq11 +tcga +>seq12 +tcga +>seq13 +tcga +>seq14 +tcga +>seq15 +tcga +>seq16 +tcga +>seq17 +tcga +>seq18 +tcga +>seq19 +tcga +>seq20 +tcga +>seq21 +tcga +>seq22 +tcga +>seq23 +tcga +>seq24 +tcga +>seq25 +tcga +>seq26 +tcga +>seq27 +tcga +>seq28 +tcga +>seq29 +tcga +>seq30 +tcga +>seq31 +tcga +>seq32 +tcga +>seq33 +tcga +>seq34 +tcga +>seq35 +tcga +>seq36 +tcga +>seq37 +tcga +>seq38 +tcga +>seq39 +tcga +>seq40 +tcga +>seq41 +tcga +>seq42 +tcga +>seq43 +tcga +>seq44 +tcga +>seq45 +tcga +>seq46 +tcga +>seq47 +tcga +>seq48 +tcga +>seq49 +tcga +>seq50 +tcga +>seq51 +tcga +>seq52 +tcga +>seq53 +tcga +>seq54 +tcga +>seq55 +tcga +>seq56 +tcga +>seq57 +tcga +>seq58 +tcga +>seq59 +tcga +>seq60 +tcga +>seq61 +tcga +>seq62 +tcga +>seq63 +tcga +>seq64 +tcga +>seq65 +tcga +>seq66 +tcga +>seq67 +tcga +>seq68 +tcga +>seq69 +tcga +>seq70 +tcga +>seq71 +tcga +>seq72 +tcga +>seq73 +tcga +>seq74 +tcga +>seq75 +tcga +>seq76 +tcga +>seq77 +tcga +>seq78 +tcga +>seq79 +tcga +>seq80 +tcga +>seq81 +tcga +>seq82 +tcga +>seq83 +tcga +>seq84 +tcga +>seq85 +tcga +>seq86 +tcga +>seq87 +tcga +>seq88 +tcga +>seq89 +tcga +>seq90 +tcga +>seq91 +tcga +>seq92 +tcga +>seq93 +tcga +>seq94 +tcga +>seq95 +tcga +>seq96 +tcga +>seq97 +tcga +>seq98 +tcga +>seq99 +tcga +>seq100 +tcga +>seq101 +tcga +>seq102 +tcga +>seq103 +tcga +>seq104 +tcga +>seq105 +tcga +>seq106 +tcga +>seq107 +tcga +>seq108 +tcga +>seq109 +tcga +>seq110 +tcga +>seq111 +tcga +>seq112 +tcga +>seq113 +tcga +>seq114 +tcga +>seq115 +tcga +>seq116 +tcga +>seq117 +tcga +>seq118 +tcga +>seq119 +tcga +>seq120 +tcga +>seq121 +tcga +>seq122 +tcga +>seq123 +tcga +>seq124 +tcga +>seq125 +tcga +>seq126 +tcga +>seq127 +tcga +>seq128 +tcga +>seq129 +tcga +>seq130 +tcga +>seq131 +tcga +>seq132 +tcga +>seq133 +tcga +>seq134 +tcga +>seq135 +tcga +>seq136 +tcga +>seq137 +tcga +>seq138 +tcga +>seq139 +tcga +>seq140 +tcga +>seq141 +tcga +>seq142 +tcga +>seq143 +tcga +>seq144 +tcga +>seq145 +tcga +>seq146 +tcga +>seq147 +tcga +>seq148 +tcga +>seq149 +tcga +>seq150 +tcga +>seq151 +tcga +>seq152 +tcga +>seq153 +tcga +>seq154 +tcga +>seq155 +tcga +>seq156 +tcga +>seq157 +tcga +>seq158 +tcga +>seq159 +tcga +>seq160 +tcga +>seq161 +tcga +>seq162 +tcga +>seq163 +tcga +>seq164 +tcga +>seq165 +tcga +>seq166 +tcga +>seq167 +tcga +>seq168 +tcga +>seq169 +tcga +>seq170 +tcga +>seq171 +tcga +>seq172 +tcga +>seq173 +tcga +>seq174 +tcga +>seq175 +tcga +>seq176 +tcga +>seq177 +tcga +>seq178 +tcga +>seq179 +tcga +>seq180 +tcga +>seq181 +tcga +>seq182 +tcga +>seq183 +tcga +>seq184 +tcga +>seq185 +tcga +>seq186 +tcga +>seq187 +tcga +>seq188 +tcga +>seq189 +tcga +>seq190 +tcga +>seq191 +tcga +>seq192 +tcga +>seq193 +tcga +>seq194 +tcga +>seq195 +tcga +>seq196 +tcga +>seq197 +tcga +>seq198 +tcga +>seq199 +tcga +>seq200 +tcga +>seq201 +tcga +>seq202 +tcga +>seq203 +tcga +>seq204 +tcga +>seq205 +tcga +>seq206 +tcga +>seq207 +tcga +>seq208 +tcga +>seq209 +tcga +>seq210 +tcga +>seq211 +tcga +>seq212 +tcga +>seq213 +tcga +>seq214 +tcga +>seq215 +tcga +>seq216 +tcga +>seq217 +tcga +>seq218 +tcga +>seq219 +tcga +>seq220 +tcga +>seq221 +tcga +>seq222 +tcga +>seq223 +tcga +>seq224 +tcga +>seq225 +tcga +>seq226 +tcga +>seq227 +tcga +>seq228 +tcga +>seq229 +tcga +>seq230 +tcga +>seq231 +tcga +>seq232 +tcga +>seq233 +tcga +>seq234 +tcga +>seq235 +tcga +>seq236 +tcga +>seq237 +tcga +>seq238 +tcga +>seq239 +tcga +>seq240 +tcga +>seq241 +tcga +>seq242 +tcga +>seq243 +tcga +>seq244 +tcga +>seq245 +tcga +>seq246 +tcga +>seq247 +tcga +>seq248 +tcga +>seq249 +tcga +>seq250 +tcga +>seq251 +tcga +>seq252 +tcga +>seq253 +tcga +>seq254 +tcga +>seq255 +tcga +>seq256 +tcga +>seq257 +tcga +>seq258 +tcga +>seq259 +tcga +>seq260 +tcga +>seq261 +tcga +>seq262 +tcga +>seq263 +tcga +>seq264 +tcga +>seq265 +tcga +>seq266 +tcga +>seq267 +tcga +>seq268 +tcga +>seq269 +tcga +>seq270 +tcga +>seq271 +tcga +>seq272 +tcga +>seq273 +tcga +>seq274 +tcga +>seq275 +tcga +>seq276 +tcga +>seq277 +tcga +>seq278 +tcga +>seq279 +tcga +>seq280 +tcga +>seq281 +tcga +>seq282 +tcga +>seq283 +tcga +>seq284 +tcga +>seq285 +tcga +>seq286 +tcga +>seq287 +tcga +>seq288 +tcga +>seq289 +tcga +>seq290 +tcga +>seq291 +tcga +>seq292 +tcga +>seq293 +tcga +>seq294 +tcga +>seq295 +tcga +>seq296 +tcga +>seq297 +tcga +>seq298 +tcga +>seq299 +tcga +>seq300 +tcga