Fail to generate output for recentrifuge with planemo

Dear all,
I’m discovering the galaxy world and I try to integrate some tools to galaxy.
I started with recentrifuge a tool for taxonomy visualization but I failed to generate the output.
In fact, the planemo test failed to compare because the output of the test is empty.
The recentrifuge code don’t explicit an output but I tried with the -o option (give another name to the output) without success.

So I don’t know how to deal to solve the no output problem.

As a minimal example with only my input file, output files and test code :

  <command detect_errors="exit_code"><![CDATA[
        mkdir '$__tool_directory__/output_dir' &&
        rcf
        #if $db.db_selector == "cached"
          -n '$db.cached_db.fields.path'
        #end if

        #if $file_type.filetype == "centrifuge"
          -f '$input_file'
        #else if $file_type.filetype == "lmat"
          -l '$input_file'
        #else if $file_type.filetype == "clark"
          -r '$input_file'
        #else if $file_type.filetype == "kraken"
          -k '$input_file'
        #end if

        #if '$output_name.modify_name' == "true"
          -o '$__tool_directory__/output_dir/$output_name.file_name'
        #else
          -o "$__tool_directory__/output_dir/rcf.output"
        #end if

        -e '$output_type'

    ]]></command>
<inputs>
<param name="input_file" type="data" format="tabular" label="Output from taxonomy assignation" help="Select taxonomy file tabular formated"/>
</inputs>
  <outputs>
      <!-- HTML report -->
      <data name="html_report" format="html" from_work_dir="output_dir"/>

      <data name="data_csv" format="csv" from_work_dir="output_dir">
         <filter>output_type and "CSV" in output_type</filter>
      </data>
      <data name="data_tsv" format="tsv" from_work_dir="output_dir">
        <filter>output_type and "TSV" in output_type</filter>
      </data>
      <data name="stat_tsv" format="tsv" from_work_dir="output_dir">
        <filter>output_type and "TSV" in output_type</filter>
      </data>
      <data name="xls_report" format="xlsx" from_work_dir="output_dir">
        <filter>output_type and "XLSX" in output_type or output_type and "DYNOMICS" in output_type </filter>
      </data>
        <data name="stat_csv" format="csv" from_work_dir="output_dir">
          <filter>output_type and "CSV" in output_type or output_type and "MULTICSV" in output_type </filter>
      </data>
    </outputs>
<tests>
      <test> <!-- Test 1: Basic test with kraken file-->
        <conditional name="db">
          <param name="db_selector" value="cached"/>
          <param name="cached_db" value="test-db-2022"/>
        </conditional>
          <param name="filetype" value="kraken"/>
          <param name="input_file" value="kraken.txt"/>
          <param name="output_type" value="CSV"/>
          <param name="scoring" value="KRAKEN"/>
          <param name="summary" value="avoid"/>

        <output name="data_csv" file="output_dir/rcf.output.data.csv">
        </output>
        <output name="stat_csv" file="output_dir/rcf.output.stat.csv">
        </output>
        <output name="html_report" file="output_dir/rcf.output">
        </output>
      </test>
    </tests>

The planemo report give me the code seem to be ok :

mkdir '/home/pierre/.planemo/planemo_tmp_a_v6y1k9/output_dir' && rcf -n '/home/pierre/.planemo/planemo_tmp_a_v6y1k9/test-data/test-db'  -k '/tmp/tmpnivasmvl/files/2/3/3/dataset_2334d82b-ddc1-4dc8-bb41-df026f8c1a34.dat'  -o "/home/pierre/.planemo/planemo_tmp_a_v6y1k9/output_dir/rcf.output"  -e 'CSV'

The standard ouput from planemo report is okay, the softaware indicate generating of files and give me the output directory

Generating final plot /home/pierre/.planemo/planemo_tmp_a_v6y1k9/output_dir/rcf.output OK!
Generating csv extra output /home/pierre/.planemo/planemo_tmp_a_v6y1k9/output_dir/rcf.output.]*.csv OK!

The link to the git with the code
recentrifuge

Hi @pimarin,
in the from_work_dir option you should specify the dataset path, not just the folder; e.g:

<data name="data_csv" format="csv" from_work_dir="output_dir/rcf.output">
   <filter>output_type and "CSV" in output_type</filter>
</data>

Regards

Hi @gallardoalba ,
Thank you for you efficiency, but it didn’t work. the -o option is not an obligation, I forced it hoping it solve the problem, but even if I don’t use it I have the same trouble…

I also tried with multiple dataset :

<outputs>
      <data name="html_report" format="html">
        <discover_datasets pattern="__designation__" directory="$__tool_directory__/output_dir" visible="false" />
      </data>
      <data name="data_csv" format="csv">
        <discover_datasets pattern="__designation_and_ext__" directory="$__tool_directory__/output_dir" visible="false" />
      </data>
</outputs>
<test>
  <output name="data_csv" >
          <discovered_dataset designation="/home/pierre/Seafile/ABROMICS/galaxy-tools/tools/recentrifuge/test-data/output_dir/data_csv" ftype="csv">
             <assert_contents><has_n_lines n="10" /></assert_contents>
          </discovered_dataset>
        </output>
        <output name="html_report" >
          <discovered_dataset designation="/home/pierre/Seafile/ABROMICS/galaxy-tools/tools/recentrifuge/test-data/output_dir/html_report" ftype="html">
             <assert_contents><has_text text="Enterobacteriaceae" /></assert_contents>
          </discovered_dataset>
        </output>
</test>

Hi @pimarin,
I opened a PR; it fixes the problem with the outputs Fix outputs by gallardoalba · Pull Request #1 · mesocentre-clermont-auvergne/galaxy-tools · GitHub

Regards

Hi @gallardoalba thank to your help everything is okay now !

1 Like