Mercurial > repos > bgruening > blobtoolkit
changeset 2:53dd00a4ab68 draft
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/blobtoolkit commit 5078c7010ec46fd01fec2057dd4486781c958c37
author | bgruening |
---|---|
date | Tue, 28 Mar 2023 15:17:19 +0000 |
parents | 840822c1e84a |
children | 8c2167481e72 |
files | blobtoolkit.xml macros.xml test-data/test01_blobdir.tar.gz test-data/test02_blobdir.tar.gz |
diffstat | 4 files changed, 35 insertions(+), 75 deletions(-) [+] |
line wrap: on
line diff
--- a/blobtoolkit.xml Mon Mar 20 16:37:54 2023 +0000 +++ b/blobtoolkit.xml Tue Mar 28 15:17:19 2023 +0000 @@ -22,14 +22,16 @@ --taxid $mode_conditional.taxid --taxdump './taxdump' './Blobdir' - && cp -r './taxdump' './Blobdir/' - && tar -zcf './Blobdir.tgz' './Blobdir' - + && tar -C ./Blobdir -zcvf Blobdir.tgz . #else if $mode_conditional.selector == 'add' + mkdir -p './Blobdir' && + mkdir -p './taxdump' && + ln -s '${mode_conditional.taxdump}' 'taxdump.tar' && + tar -xf 'taxdump.tar' -C './taxdump' && #if $mode_conditional.blobdir.is_of_type("tgz") - tar -zxf '${mode_conditional.blobdir}' -C './' && + tar -zxf '${mode_conditional.blobdir}' -C './Blobdir' && #else - tar -xf '${mode_conditional.blobdir}' -C './' && + tar -xf '${mode_conditional.blobdir}' -C './Blobdir' && #end if #if $mode_conditional.busco ln -s '${mode_conditional.busco}' './busco_results.tab' && @@ -50,7 +52,7 @@ #end if blobtools add --threads \${GALAXY_SLOTS:-8} - --taxdump './Blobdir/taxdump' + --taxdump './taxdump' #if $mode_conditional.busco --busco './busco_results.tab' #end if @@ -95,9 +97,15 @@ #end if $mode_conditional.advanced_options.replace './Blobdir' - && tar -zcf './Blobdir.tgz' './Blobdir' + && tar -C ./Blobdir -zcvf Blobdir.tgz . #else if $mode_conditional.selector == 'filter' + mkdir -p './Blobdir' && + #if $mode_conditional.blobdir.is_of_type("tgz") + tar -zxf '${mode_conditional.blobdir}' -C './Blobdir' && + #else + tar -xf '${mode_conditional.blobdir}' -C './Blobdir' && + #end if #if $mode_conditional.filter_options.list echo $mode_conditional.filter_options.list > id_list.txt && #end if @@ -148,29 +156,7 @@ #end if ./Blobdir #end if - && tar -zcf './Blobdir.tgz' './Blobdir' - - #else if $mode_conditional.selector == 'plots' - #if $mode_conditional.blobdir.is_of_type("tgz") - tar -zxf '${mode_conditional.blobdir}' -C './' && - #else - tar -xf '${mode_conditional.blobdir}' -C './' && - #end if - blobtools view - --format $mode_conditional.format - --view 'blob' - ./Blobdir - && mv ./Blobdir.blob.circle* ./Blobdir.blob.circle - && blobtools view - --format $mode_conditional.format - --view 'cumulative' - ./Blobdir - && mv ./Blobdir.cumulative* Blobdir.cumulative - && blobtools view - --format $mode_conditional.format - --view 'snail' - ./Blobdir - && mv ./Blobdir.snail* Blobdir.snail + && tar -C ./Blobdir -zcvf Blobdir.tgz . #end if ]]></command> <inputs> @@ -179,16 +165,16 @@ <option value="create">Create a BlobToolKit dataset</option> <option value="add">Add data to a BlobToolKit dataset</option> <option value="filter">Edit a BlobToolKit dataset</option> - <option value="plots">Generate plots</option> </param> <when value="create"> <param argument="--fasta" type="data" format="fasta" label="Genome assembly file" help="FASTA sequence file" /> <param argument="--meta" type="data" format="yaml" label="Metadata file" optional="true" help="Optional metadata dataset"/> <param argument="--taxid" type="integer" value="" label="NCBI taxonomy ID" help="Add ranks to metadata for a taxid"/> - <param argument="--taxdump" type="data" format="tar,tgz,gz" label="NCBI taxdump directory" help="It should be compressed in tar.gz format"/> + <expand macro="macro_taxdump"/> </when> <when value="add"> <param name="blobdir" type="data" format="tgz" label="Blobdir.tgz file" help="This file should be generated by Blobtool create" /> + <expand macro="macro_taxdump"/> <param argument="--busco" type="data" format="tsv,tabular,txt" optional="true" label="BUSCO full table file"/> <conditional name="blast_input"> <param name="selector" type="select" label="BLAST/Diamond hits"> @@ -310,38 +296,12 @@ </param> </section> </when> - <when value="plots"> - <param name="blobdir" type="data" format="tgz" label="Blobdir file" help="This file should be generated by the moudule create" /> - <param argument="--format" type="select" label="Image format"> - <option value="png">PNG</option> - <option value="svg">SVG</option> - </param> - <param argument="--param" type="text" optional="true" label="Query parameter" help="Query string parameter."/> - </when> </conditional> </inputs> <outputs> <data name="blobdir" format="tgz" from_work_dir="./Blobdir.tgz" label="${tool.name} on ${on_string}: Blobdir.tgz"> <filter>mode_conditional['selector'] == 'create' or mode_conditional['selector'] == 'add' or mode_conditional['selector'] == 'filter'</filter> </data> - <data name="plot_circle" format="png" from_work_dir="./Blobdir.blob.circle" label="${tool.name} on ${on_string}: blob plot"> - <filter>mode_conditional['selector'] == 'plots'</filter> - <change_format> - <when input="$mode_conditional.format" value="svg" format="svg"/> - </change_format> - </data> - <data name="plot_cumulative" format="png" from_work_dir="./Blobdir.cumulative" label="${tool.name} on ${on_string}: cumulative plot"> - <filter>mode_conditional['selector'] == 'plots'</filter> - <change_format> - <when input="$mode_conditional.format" value="svg" format="svg"/> - </change_format> - </data> - <data name="plot_snail" format="png" from_work_dir="./Blobdir.snail" label="${tool.name} on ${on_string}: snail plot"> - <filter>mode_conditional['selector'] == 'plots'</filter> - <change_format> - <when input="$mode_conditional.format" value="svg" format="svg"/> - </change_format> - </data> </outputs> <tests> <test expect_num_outputs="1"> @@ -352,12 +312,13 @@ <param name="taxid" value="801"/> <param name="taxdump" value="small_taxdump.tar.gz"/> </conditional> - <output name="blobdir" file="test01_blobdir.tar.gz" compare="sim_size" delta="1500"/> + <output name="blobdir" file="test01_blobdir.tar.gz" compare="sim_size" delta="100"/> </test> <test expect_num_outputs="1"> <conditional name="mode_conditional"> <param name="selector" value="add"/> <param name="blobdir" value="test01_blobdir.tar.gz"/> + <param name="taxdump" value="small_taxdump.tar.gz"/> <param name="busco" value="busco_full_table.tabular"/> <param name="cov" value="bam_file.bam"/> <param name="fasta" value="contig.fasta"/> @@ -374,7 +335,7 @@ <param name="hits_cols" value="1=qseqid,2=staxids,3=bitscore,5=sseqid,10=qstart,11=qend,14=evalue"/> </conditional> </conditional> - <output name="blobdir" file="test02_blobdir.tar.gz" compare="sim_size" delta="1500"/> + <output name="blobdir" file="test02_blobdir.tar.gz" compare="sim_size" delta="100"/> </test> <test expect_num_outputs="1"> <conditional name="mode_conditional"> @@ -391,20 +352,10 @@ </conditional> <output name="blobdir"> <assert_contents> - <has_size value="672500" delta="1000"/> + <has_size value="620" delta="50"/> </assert_contents> </output> </test> - <test expect_num_outputs="3"> - <conditional name="mode_conditional"> - <param name="selector" value="plots"/> - <param name="blobdir" value="test02_blobdir.tar.gz"/> - <param name="format" value="png"/> - </conditional> - <output name="plot_circle" file="test04_circle.png" ftype="png"/> - <output name="plot_cumulative" file="test04_cumulative.png" ftype="png"/> - <output name="plot_snail" file="test04_snail.png" ftype="png"/> - </test> <test expect_num_outputs="1"> <conditional name="mode_conditional"> <param name="selector" value="filter"/> @@ -419,7 +370,7 @@ </conditional> <output name="blobdir"> <assert_contents> - <has_size value="672497" delta="1000"/> + <has_size value="620" delta="50"/> </assert_contents> </output> </test> @@ -427,6 +378,13 @@ <help><![CDATA[ BlobToolKit is a software suite to aid researchers in identifying and isolating non-target data in draft and publicly available genome assemblies. It can be used to process assembly, read and analysis files for fully reproducible interactive exploration in the browser-based Viewer. BlobToolKit can be used during assembly to filter non-target DNA, helping researchers produce assemblies with high biological credibility. + +.. class:: infomark + +**NCBI taxdump directory** + +The taxdump database, provided by NCBI, includes the taxonomic lineage of taxa, information on type strains and material, and host information. The file **new_taxdump.tar.gz** can be downloaded from the taxonomy directory on the `FTP site <ftp.ncbi.nlm.nih.gov/pub/taxonomy/new_taxdump/>`_. + ]]></help> <expand macro="citations"/> -</tool> \ No newline at end of file +</tool>
--- a/macros.xml Mon Mar 20 16:37:54 2023 +0000 +++ b/macros.xml Tue Mar 28 15:17:19 2023 +0000 @@ -1,6 +1,6 @@ <macros> <token name="@TOOL_VERSION@">4.0.7</token> - <token name="@VERSION_SUFFIX@">0</token> + <token name="@VERSION_SUFFIX@">1</token> <xml name="requirements"> <requirements> @@ -42,6 +42,8 @@ </when> <when value="disabled"/> </conditional> - + </xml> + <xml name="macro_taxdump"> + <param argument="--taxdump" type="data" format="tar,gz,tgz" label="NCBI taxdump directory" help="It requires to use the last taxdump version. You can find more information about it in the help section."/> </xml> </macros>