annotate 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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
ba4ed464f8b6 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">
ba4ed464f8b6 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>
ba4ed464f8b6 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/beacon2 commit dcaf8046840f163143075b276dd75909d344ec3a
iuc
parents:
diff changeset
3 <macros>
ba4ed464f8b6 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>
ba4ed464f8b6 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/beacon2 commit dcaf8046840f163143075b276dd75909d344ec3a
iuc
parents:
diff changeset
5 </macros>
ba4ed464f8b6 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/beacon2 commit dcaf8046840f163143075b276dd75909d344ec3a
iuc
parents:
diff changeset
6 <expand macro="xrefs"/>
ba4ed464f8b6 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/beacon2 commit dcaf8046840f163143075b276dd75909d344ec3a
iuc
parents:
diff changeset
7 <expand macro="requirements"/>
ba4ed464f8b6 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/beacon2 commit dcaf8046840f163143075b276dd75909d344ec3a
iuc
parents:
diff changeset
8 <expand macro="creators"/>
ba4ed464f8b6 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[
ba4ed464f8b6 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/beacon2 commit dcaf8046840f163143075b276dd75909d344ec3a
iuc
parents:
diff changeset
10 #import re
ba4ed464f8b6 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/beacon2 commit dcaf8046840f163143075b276dd75909d344ec3a
iuc
parents:
diff changeset
11 #set $names = []
ba4ed464f8b6 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/beacon2 commit dcaf8046840f163143075b276dd75909d344ec3a
iuc
parents:
diff changeset
12 #set $x=1
ba4ed464f8b6 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):
ba4ed464f8b6 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)
ba4ed464f8b6 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
ba4ed464f8b6 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 )
ba4ed464f8b6 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} &&
ba4ed464f8b6 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/beacon2 commit dcaf8046840f163143075b276dd75909d344ec3a
iuc
parents:
diff changeset
18 #end for
ba4ed464f8b6 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/beacon2 commit dcaf8046840f163143075b276dd75909d344ec3a
iuc
parents:
diff changeset
19 csv2xlsx
ba4ed464f8b6 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:
ba4ed464f8b6 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/beacon2 commit dcaf8046840f163143075b276dd75909d344ec3a
iuc
parents:
diff changeset
21 ${name}
ba4ed464f8b6 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/beacon2 commit dcaf8046840f163143075b276dd75909d344ec3a
iuc
parents:
diff changeset
22 #end for
ba4ed464f8b6 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
ba4ed464f8b6 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/beacon2 commit dcaf8046840f163143075b276dd75909d344ec3a
iuc
parents:
diff changeset
24 ]]></command>
ba4ed464f8b6 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/beacon2 commit dcaf8046840f163143075b276dd75909d344ec3a
iuc
parents:
diff changeset
25 <inputs>
ba4ed464f8b6 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="" />
ba4ed464f8b6 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/beacon2 commit dcaf8046840f163143075b276dd75909d344ec3a
iuc
parents:
diff changeset
27 </inputs>
ba4ed464f8b6 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/beacon2 commit dcaf8046840f163143075b276dd75909d344ec3a
iuc
parents:
diff changeset
28 <outputs>
ba4ed464f8b6 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" />
ba4ed464f8b6 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/beacon2 commit dcaf8046840f163143075b276dd75909d344ec3a
iuc
parents:
diff changeset
30 </outputs>
ba4ed464f8b6 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/beacon2 commit dcaf8046840f163143075b276dd75909d344ec3a
iuc
parents:
diff changeset
31 <tests>
ba4ed464f8b6 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">
ba4ed464f8b6 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" />
ba4ed464f8b6 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">
ba4ed464f8b6 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>
ba4ed464f8b6 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/beacon2 commit dcaf8046840f163143075b276dd75909d344ec3a
iuc
parents:
diff changeset
36 </output>
ba4ed464f8b6 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/beacon2 commit dcaf8046840f163143075b276dd75909d344ec3a
iuc
parents:
diff changeset
37 </test>
ba4ed464f8b6 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/beacon2 commit dcaf8046840f163143075b276dd75909d344ec3a
iuc
parents:
diff changeset
38 </tests>
ba4ed464f8b6 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/beacon2 commit dcaf8046840f163143075b276dd75909d344ec3a
iuc
parents:
diff changeset
39 <help><![CDATA[
ba4ed464f8b6 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.
ba4ed464f8b6 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’
ba4ed464f8b6 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.
ba4ed464f8b6 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
ba4ed464f8b6 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.
ba4ed464f8b6 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/beacon2 commit dcaf8046840f163143075b276dd75909d344ec3a
iuc
parents:
diff changeset
45 ]]></help>
ba4ed464f8b6 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/beacon2 commit dcaf8046840f163143075b276dd75909d344ec3a
iuc
parents:
diff changeset
46 <expand macro="citations" />
ba4ed464f8b6 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/beacon2 commit dcaf8046840f163143075b276dd75909d344ec3a
iuc
parents:
diff changeset
47 </tool>