annotate csv2xlsx.xml @ 0:4509627e6ee1 draft default tip

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/beacon2 commit dcaf8046840f163143075b276dd75909d344ec3a
author iuc
date Sun, 01 Oct 2023 16:29:22 +0000
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
4509627e6ee1 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/beacon2 commit dcaf8046840f163143075b276dd75909d344ec3a
iuc
parents:
diff changeset
1 <tool id="beacon2_csv2xlsx" name="Beacon2 CSV2XLSX" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="21.05">
4509627e6ee1 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/beacon2 commit dcaf8046840f163143075b276dd75909d344ec3a
iuc
parents:
diff changeset
2 <description>v2 CSV Models to XLSX</description>
4509627e6ee1 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/beacon2 commit dcaf8046840f163143075b276dd75909d344ec3a
iuc
parents:
diff changeset
3 <macros>
4509627e6ee1 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/beacon2 commit dcaf8046840f163143075b276dd75909d344ec3a
iuc
parents:
diff changeset
4 <import>macros.xml</import>
4509627e6ee1 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/beacon2 commit dcaf8046840f163143075b276dd75909d344ec3a
iuc
parents:
diff changeset
5 </macros>
4509627e6ee1 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/beacon2 commit dcaf8046840f163143075b276dd75909d344ec3a
iuc
parents:
diff changeset
6 <expand macro="xrefs"/>
4509627e6ee1 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/beacon2 commit dcaf8046840f163143075b276dd75909d344ec3a
iuc
parents:
diff changeset
7 <expand macro="requirements"/>
4509627e6ee1 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/beacon2 commit dcaf8046840f163143075b276dd75909d344ec3a
iuc
parents:
diff changeset
8 <expand macro="creators"/>
4509627e6ee1 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/beacon2 commit dcaf8046840f163143075b276dd75909d344ec3a
iuc
parents:
diff changeset
9 <command detect_errors="exit_code"><![CDATA[
4509627e6ee1 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/beacon2 commit dcaf8046840f163143075b276dd75909d344ec3a
iuc
parents:
diff changeset
10 #import re
4509627e6ee1 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/beacon2 commit dcaf8046840f163143075b276dd75909d344ec3a
iuc
parents:
diff changeset
11 #set $names = []
4509627e6ee1 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/beacon2 commit dcaf8046840f163143075b276dd75909d344ec3a
iuc
parents:
diff changeset
12 #set $x=1
4509627e6ee1 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/beacon2 commit dcaf8046840f163143075b276dd75909d344ec3a
iuc
parents:
diff changeset
13 #for $x, $csv in enumerate($csvs):
4509627e6ee1 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/beacon2 commit dcaf8046840f163143075b276dd75909d344ec3a
iuc
parents:
diff changeset
14 #set $name_base = re.sub('[^\w\-_\.]', '_', $csv.element_identifier)
4509627e6ee1 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/beacon2 commit dcaf8046840f163143075b276dd75909d344ec3a
iuc
parents:
diff changeset
15 #set $name = $name_base
4509627e6ee1 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/beacon2 commit dcaf8046840f163143075b276dd75909d344ec3a
iuc
parents:
diff changeset
16 #silent $names.append( $name )
4509627e6ee1 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/beacon2 commit dcaf8046840f163143075b276dd75909d344ec3a
iuc
parents:
diff changeset
17 ln -s '$csv' ${name} &&
4509627e6ee1 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/beacon2 commit dcaf8046840f163143075b276dd75909d344ec3a
iuc
parents:
diff changeset
18 #end for
4509627e6ee1 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/beacon2 commit dcaf8046840f163143075b276dd75909d344ec3a
iuc
parents:
diff changeset
19 csv2xlsx
4509627e6ee1 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/beacon2 commit dcaf8046840f163143075b276dd75909d344ec3a
iuc
parents:
diff changeset
20 #for $name in $names:
4509627e6ee1 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/beacon2 commit dcaf8046840f163143075b276dd75909d344ec3a
iuc
parents:
diff changeset
21 ${name}
4509627e6ee1 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/beacon2 commit dcaf8046840f163143075b276dd75909d344ec3a
iuc
parents:
diff changeset
22 #end for
4509627e6ee1 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/beacon2 commit dcaf8046840f163143075b276dd75909d344ec3a
iuc
parents:
diff changeset
23 -o Beacon-v2-Models_template.xlsx
4509627e6ee1 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/beacon2 commit dcaf8046840f163143075b276dd75909d344ec3a
iuc
parents:
diff changeset
24 ]]></command>
4509627e6ee1 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/beacon2 commit dcaf8046840f163143075b276dd75909d344ec3a
iuc
parents:
diff changeset
25 <inputs>
4509627e6ee1 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/beacon2 commit dcaf8046840f163143075b276dd75909d344ec3a
iuc
parents:
diff changeset
26 <param name="csvs" type="data" multiple="true" format="csv" label="CSV files" help="" />
4509627e6ee1 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/beacon2 commit dcaf8046840f163143075b276dd75909d344ec3a
iuc
parents:
diff changeset
27 </inputs>
4509627e6ee1 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/beacon2 commit dcaf8046840f163143075b276dd75909d344ec3a
iuc
parents:
diff changeset
28 <outputs>
4509627e6ee1 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/beacon2 commit dcaf8046840f163143075b276dd75909d344ec3a
iuc
parents:
diff changeset
29 <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" />
4509627e6ee1 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/beacon2 commit dcaf8046840f163143075b276dd75909d344ec3a
iuc
parents:
diff changeset
30 </outputs>
4509627e6ee1 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/beacon2 commit dcaf8046840f163143075b276dd75909d344ec3a
iuc
parents:
diff changeset
31 <tests>
4509627e6ee1 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/beacon2 commit dcaf8046840f163143075b276dd75909d344ec3a
iuc
parents:
diff changeset
32 <test expect_num_outputs="1">
4509627e6ee1 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/beacon2 commit dcaf8046840f163143075b276dd75909d344ec3a
iuc
parents:
diff changeset
33 <param name="csvs" ftype="csv" value="analyses.csv,genomicVariations.csv,runs.csv,datasets.csv,biosamples.csv,individuals.csv,cohorts.csv" />
4509627e6ee1 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/beacon2 commit dcaf8046840f163143075b276dd75909d344ec3a
iuc
parents:
diff changeset
34 <output name="Beacon_v2_Models_template" file="Beacon-v2-Models_template.xlsx" compare="sim_size">
4509627e6ee1 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/beacon2 commit dcaf8046840f163143075b276dd75909d344ec3a
iuc
parents:
diff changeset
35 <assert_contents><has_size value="12000" delta="1000" /></assert_contents>
4509627e6ee1 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/beacon2 commit dcaf8046840f163143075b276dd75909d344ec3a
iuc
parents:
diff changeset
36 </output>
4509627e6ee1 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/beacon2 commit dcaf8046840f163143075b276dd75909d344ec3a
iuc
parents:
diff changeset
37 </test>
4509627e6ee1 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/beacon2 commit dcaf8046840f163143075b276dd75909d344ec3a
iuc
parents:
diff changeset
38 </tests>
4509627e6ee1 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/beacon2 commit dcaf8046840f163143075b276dd75909d344ec3a
iuc
parents:
diff changeset
39 <help><![CDATA[
4509627e6ee1 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/beacon2 commit dcaf8046840f163143075b276dd75909d344ec3a
iuc
parents:
diff changeset
40 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.
4509627e6ee1 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/beacon2 commit dcaf8046840f163143075b276dd75909d344ec3a
iuc
parents:
diff changeset
41 The Models entities are (analyses, biosamples, cohorts, datasets, genomicVariations, individuals and runs). The Excel consisting of all Models properties ‘flattened-out’
4509627e6ee1 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/beacon2 commit dcaf8046840f163143075b276dd75909d344ec3a
iuc
parents:
diff changeset
42 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.
4509627e6ee1 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/beacon2 commit dcaf8046840f163143075b276dd75909d344ec3a
iuc
parents:
diff changeset
43 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
4509627e6ee1 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/beacon2 commit dcaf8046840f163143075b276dd75909d344ec3a
iuc
parents:
diff changeset
44 files (JSON arrays) as an output that will be later loaded into the database.
4509627e6ee1 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/beacon2 commit dcaf8046840f163143075b276dd75909d344ec3a
iuc
parents:
diff changeset
45 ]]></help>
4509627e6ee1 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/beacon2 commit dcaf8046840f163143075b276dd75909d344ec3a
iuc
parents:
diff changeset
46 <expand macro="citations" />
4509627e6ee1 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/beacon2 commit dcaf8046840f163143075b276dd75909d344ec3a
iuc
parents:
diff changeset
47 </tool>