Mercurial > repos > iuc > cooc_tabmut
changeset 1:579538ff939d draft
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/cojac commit 5b54fc7af13196445abda407054e01dd3e5603c6
| author | iuc |
|---|---|
| date | Mon, 31 Jul 2023 15:23:29 +0000 |
| parents | 4be399803856 |
| children | eeb5c054ecf8 |
| files | cooc_tabmut.xml macros.xml test-data/ampl_info.tsv test-data/bed_cojac.bed test-data/primers.bed |
| diffstat | 5 files changed, 448 insertions(+), 41 deletions(-) [+] |
line wrap: on
line diff
--- a/cooc_tabmut.xml Thu Aug 11 13:50:09 2022 +0000 +++ b/cooc_tabmut.xml Mon Jul 31 15:23:29 2023 +0000 @@ -1,7 +1,7 @@ <tool id="cooc_tabmut" name="Cojac: tabmut" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@"> <description> - export cooccurrence mutations as a table + exports co-occurrence results from mutbamscan as a table </description> <macros> <import>macros.xml</import> @@ -10,26 +10,26 @@ <expand macro="requirements"/> <expand macro="version"/> <command detect_errors="exit_code"><![CDATA[ -#for $input_file in $cooc_file - #set $cooc_ext = $input_file.ext -#end for -cooc-tabmut - #if $cooc_ext == 'json' - -j '$cooc_file' - #else if $cooc_ext == 'yaml' - -y '$cooc_file' +cojac cooc-tabmut + #if $cooc_data.ext == 'json' + -j '$cooc_data' + #else + -y '$cooc_data' #end if - -o cooc-table.csv #if $table_orientation.choice == 'lines' -l #else if $table_orientation.choice == 'multiindex' -m #end if + #if $out_format == 'tsv': + -o cooc-table.tsv + #else: + -o cooc-table.csv + #end if -q ]]></command> <inputs> - <param name="cooc_file" type="data" format="json,yaml" multiple="true" - label="Results generated by mutbamscan"/> + <param name="cooc_data" type="data" format="json,yaml" label="Results generated by mutbamscan"/> <conditional name="table_orientation"> <param name="choice" type="select" label="Output table orientation"> <option value="columns">Column-oriented table (default)</option> @@ -42,23 +42,40 @@ <when value="lines"/> <when value="multiindex"/> </conditional> + <param name="out_format" type="select" label="Type of output to produce"> + <option value="tsv">Tab-separated (TSV)</option> + <option value="csv">Comma-separated (CSV)</option> + </param> </inputs> <outputs> - <data name="table" format="csv" - label="${tool.name} on ${on_string}: Mutation cooccurrence (CSV table)" - from_work_dir="cooc-table.csv"> + <data name="table_tsv" format="tsv" label="${tool.name} on ${on_string}: Mutation coo-ccurrence (TSV table)" from_work_dir="cooc-table.tsv"> + <filter>out_format == 'tsv'</filter> + </data> + <data name="table_csv" format="csv" label="${tool.name} on ${on_string}: Mutation coo-ccurrence (CSV table)" from_work_dir="cooc-table.csv"> + <filter>out_format == 'csv'</filter> </data> </outputs> <tests> <test expect_num_outputs="1"> - <param name="cooc_file" value="cooc-test111.json"/> + <param name="cooc_data" value="cooc-test111.json"/> <conditional name="table_orientation"> <param name="choice" value="columns"/> </conditional> - <output name="table" ftype="csv"> + <output name="table_tsv" ftype="tsv"> <assert_contents> - <has_text text="A76_om1.count"/> - <has_text text="A76_om1.mut_oneless"/> + <has_text text="A76"/> + </assert_contents> + </output> + </test> + <test expect_num_outputs="1"> + <param name="cooc_data" value="cooc-test111.json"/> + <conditional name="table_orientation"> + <param name="choice" value="columns"/> + </conditional> + <param name="out_format" value="csv"/> + <output name="table_csv" ftype="csv"> + <assert_contents> + <has_text text="A76"/> </assert_contents> </output> </test> @@ -66,8 +83,8 @@ <help><![CDATA[ @HELP_HEADER@ -Information about **cooc_tabmut** method -======================================== +Information about **cojac cooc_tabmut** method +============================================== The method exports a JSON or YAML file as a CSV/TSV table for downstream analysis (e.g.: RStudio).
--- a/macros.xml Thu Aug 11 13:50:09 2022 +0000 +++ b/macros.xml Mon Jul 31 15:23:29 2023 +0000 @@ -1,6 +1,6 @@ <?xml version="1.0"?> <macros> - <token name="@TOOL_VERSION@">0.2</token> + <token name="@TOOL_VERSION@">0.9</token> <token name="@VERSION_SUFFIX@">0</token> <token name="@PROFILE@">21.01</token> <xml name="biotools"> @@ -18,34 +18,28 @@ <version_command>echo @TOOL_VERSION@</version_command> </xml> <xml name="vocdir_input"> - <conditional name="vocdir_option"> + <conditional name="voc_source"> <param name="choice" type="select" - label="Source of YAML files with definition of the variant of concerns" - help="Cojac ships with a directory with variant definitions yaml files (https://github.com/cbg-ethz/cojac/tree/master/voc), which the tool can access internally. You can also download the latest version of the yaml files from https://github.com/phe-genomics/variant_definitions and use it as a custom yamls defining the variant of concerns."> - <option value="cache">Definitions shipped with the tool (can be outdated)</option> - <option value="custom">From history</option> + label="Source of lineage definitions" + help="Cojac detects lineage evidence based on lineage mutation patterns deined in tool-specific yaml format. You can choose between the (possibly outdated) definitions shipped with the tool or definitions provided as a collection of yaml datasets in your history. See the tool help below for more details."> + <option value="builtin">Lineage definitions shipped with the tool</option> + <option value="custom">YAML dataset collection in history</option> </param> - <when value="cache"/> + <when value="builtin"/> <when value="custom"> - <param name="voc_file" type="data" format="yaml" multiple="true" - label="YAML defining the variant of concern"/> + <param name="collection" type="data_collection" collection_type="list" format="yaml" label="Collection of lineage definitions" /> </when> </conditional> </xml> <token name="@VOCDIR_COMMAND@"><![CDATA[ -#if $vocdir_option.choice == 'custom' - #set vocdir = 'voc/' - #set file_paths1 = [] +#if $voc_config.choice == 'custom' mkdir -p voc && - #for $input_file in $voc_file - #set $file_path = $vocdir + $input_file.element_identifier - ln -s '$input_file' '$file_path' && - $file_paths1.append($file_path) + #for $input_file in $voc_config.collection + ln -s '$input_file' 'voc/$input_file.element_identifier' && #end for #else - DB_PATH="\$(dirname "\$(dirname "\$(which cooc-mutbamscan)")")/share/cojac" && - ln -s "\$DB_PATH" db && - #set $vocdir = 'db/voc' + DB_PATH="\$(dirname "\$(dirname "\$(which cojac)")")/share/cojac/voc" && + ln -s "\$DB_PATH" voc && #end if ]]></token> <token name="@HELP_HEADER@"><