view csv2xlsx.xml @ 1:89cbbb7821b0 draft default tip

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/beacon2 commit eecd43b81a8c9f2175c50a71ae85ce9185a9d3a7
author iuc
date Tue, 16 Apr 2024 09:27:40 +0000
parents ba4ed464f8b6
children
line wrap: on
line source

<tool id="beacon2_csv2xlsx" name="Beacon2 CSV2XLSX" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="21.05">
    <description>v2 CSV Models to XLSX</description>
    <macros>
        <import>macros.xml</import>
    </macros>
    <expand macro="xrefs"/>
    <expand macro="requirements"/>
    <expand macro="creators"/>
    <command detect_errors="exit_code"><![CDATA[   
        #import re
        #set $names = []
        #set $x=1
        #for $x, $csv in enumerate($csvs):
            #set $name_base = re.sub('[^\w\-_\.]', '_', $csv.element_identifier)
            #set $name = $name_base
            #silent $names.append( $name )
            ln -s '$csv' ${name}  &&
        #end for
        csv2xlsx
            #for $name in $names:
                ${name}
            #end for
            -o Beacon-v2-Models_template.xlsx
    ]]></command>
    <inputs>
        <param name="csvs" type="data" multiple="true" format="csv" label="CSV files" help="" />
    </inputs>
    <outputs>
        <data name="Beacon_v2_Models_template" format="xlsx" label="${tool.name} on ${on_string}: Beacon-v2-Models_template file" from_work_dir="Beacon-v2-Models_template.xlsx" />
    </outputs>
    <tests>
        <test expect_num_outputs="1">
            <param name="csvs" ftype="csv" value="analyses.csv,genomicVariations.csv,runs.csv,datasets.csv,biosamples.csv,individuals.csv,cohorts.csv" />
            <output name="Beacon_v2_Models_template" file="Beacon-v2-Models_template.xlsx" compare="sim_size">
                <assert_contents><has_size value="12000" delta="1000" /></assert_contents>
            </output>
        </test>
    </tests>
    <help><![CDATA[
         The Tool converts the data from multiple CSV files to the hierarchical structure of the Beacon v2 Models and creates an Excel file with seven entities.
         The Models entities are (analyses, biosamples, cohorts, datasets, genomicVariations, individuals and runs). The Excel consisting of all Models properties ‘flattened-out’
         The Excel file is separated into seven sheets (one per entry type). The user is responsible for filling out the Excel according to the entities and terms they want to share.
         Once the sheets are filled out, the Beacon v2 Reference Implementation comes with a utility that validates the Excel file against the Models JSON Schemas, and, if successful, it creates a set of JSON text
         files (JSON arrays) as an output that will be later loaded into the database.
    ]]></help>
    <expand macro="citations" />
</tool>