Mercurial > repos > geco-team > gmql_repository
comparison gmql_rest_repository.xml @ 0:bb858d9ad271 draft default tip
planemo upload for repository https://github.com/lu-brn/gmql-galaxy commit 953ee36ceda5814dc9baa03427bc0eb4ee2e93bd-dirty
| author | geco-team |
|---|---|
| date | Tue, 26 Jun 2018 09:02:27 -0400 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| -1:000000000000 | 0:bb858d9ad271 |
|---|---|
| 1 <tool id="gmql_repository" name="GMQL Repository Access" version="0.1.1"> | |
| 2 <description>View, browse, rename or delete datasets in the user's space on the GMQL system.</description> | |
| 3 <macros> | |
| 4 <import>gmql_rest_macros.xml</import> | |
| 5 </macros> | |
| 6 <command><![CDATA[ | |
| 7 python $__tool_directory__/gmql_rest_datasets.py | |
| 8 #set $cmd = $rep.operation | |
| 9 #if $cmd == 'list' : | |
| 10 $out_list | |
| 11 #elif $cmd == 'samples' : | |
| 12 $out_samples | |
| 13 -dataset=$rep.ds_name | |
| 14 #elif $cmd == 'delete' : | |
| 15 $updated_list | |
| 16 -dataset=$rep.dataset_del | |
| 17 #elif $cmd == 'rename' : | |
| 18 $updated_list | |
| 19 -dataset=$rep.dataset_ren | |
| 20 -new_name=$rep.new_name | |
| 21 #end if | |
| 22 -user=$authToken | |
| 23 -cmd=$cmd | |
| 24 ]]></command> | |
| 25 <code file="dynamic_utils.py"> | |
| 26 <hook validate_input="validate" /> | |
| 27 </code> | |
| 28 <inputs> | |
| 29 <param format="gmql_user" name="authToken" type="data" label="Select user" /> | |
| 30 <conditional name="rep"> | |
| 31 <param name="operation" type="select" display="radio" multiple="false" label="Select the desired action" > | |
| 32 <option value="list">View datasets</option> | |
| 33 <option value="samples">View a dataset's samples</option> | |
| 34 <option value="rename">Rename a dataset</option> | |
| 35 <option value="delete">Delete a dataset</option> | |
| 36 </param> | |
| 37 <when value="list"> | |
| 38 <!-- do nothing --> | |
| 39 </when> | |
| 40 <when value="samples"> | |
| 41 <param name="gmql_datasets" type="data" format="gmql_repository" label="Working Datasets"/> | |
| 42 <param name="ds_name" type="select" label="Select Dataset"> | |
| 43 <options from_dataset="gmql_datasets"> | |
| 44 <column name="value" index="0"/> | |
| 45 </options> | |
| 46 </param> | |
| 47 | |
| 48 </when> | |
| 49 <when value="rename"> | |
| 50 <param name="gmql_datasets" type="data" format="gmql_repository" label="Working Datasets" /> | |
| 51 <param name="dataset_ren" type="select" label="Select Dataset to rename"> | |
| 52 <options from_dataset="gmql_datasets"> | |
| 53 <column name="value" index="0" /> | |
| 54 <filter column="1" type="static_value" value="public" keep="false" /> | |
| 55 </options> | |
| 56 </param> | |
| 57 <param name="new_name" type="text" label="New Dataset Name" > | |
| 58 <validator type="regex" message="Only alphanumeric characters and underscore are allowed">[\w]+$</validator> | |
| 59 </param> | |
| 60 </when> | |
| 61 <when value="delete"> | |
| 62 <param name="gmql_datasets" type="data" format="gmql_repository" label="Working Datasets" /> | |
| 63 <param name="dataset_del" type="select" label="Select Dataset to delete"> | |
| 64 <options from_dataset="gmql_datasets"> | |
| 65 <column name="value" index="0" /> | |
| 66 <filter column="1" type="static_value" value="public" keep="false"/> | |
| 67 </options> | |
| 68 </param> | |
| 69 </when> | |
| 70 </conditional> | |
| 71 </inputs> | |
| 72 <outputs> | |
| 73 <data format="gmql_repository" name="out_list" label="${authToken.name.split()[0].rstrip('')} GMQL Datasets"> | |
| 74 <filter>rep['operation'] == 'list'</filter> | |
| 75 <actions> | |
| 76 <action name="column_names" type="metadata" default="dataset,owner" /> | |
| 77 </actions> | |
| 78 </data> | |
| 79 <data format="tabular" name="out_samples" label="${rep.ds_name} samples list from ${authToken.name.split()[0].rstrip('')} GMQL Datasets" > | |
| 80 <filter>rep['operation'] == 'samples'</filter> | |
| 81 <actions> | |
| 82 <action name="column_names" type="metadata" default="id,sample,ext" /> | |
| 83 </actions> | |
| 84 </data> | |
| 85 <data format="gmql_repository" name="updated_list" label="${authToken.name.split()[0].rstrip('')} GMQL Datasets"> | |
| 86 <filter>rep['operation'] == 'rename' or rep['operation'] == 'delete'</filter> | |
| 87 <actions> | |
| 88 <action name="column_names" type="metadata" default="dataset,owner" /> | |
| 89 </actions> | |
| 90 </data> | |
| 91 </outputs> | |
| 92 <tests> | |
| 93 <test> | |
| 94 <param name="authToken" value="guest.gmql_user" /> | |
| 95 <conditional name="rep"> | |
| 96 <param name="operation" value="list" /> | |
| 97 </conditional> | |
| 98 <output name="out_list" ftype="gmql_repository"> | |
| 99 <assert_contents> | |
| 100 <has_n_columns n="2" /> | |
| 101 <has_line_matching expression="Example_Dataset_1\tpublic" /> | |
| 102 <has_line_matching expression="Example_Dataset_2\tpublic" /> | |
| 103 </assert_contents> | |
| 104 </output> | |
| 105 </test> | |
| 106 <test> | |
| 107 <param name="authToken" value="guest.gmql_user" /> | |
| 108 <conditional name="rep"> | |
| 109 <param name="operation" value="samples" /> | |
| 110 <param name="gmql_datasets" value="rep.gmql_repository" /> | |
| 111 <param name="ds_name" value="Example_Dataset_1" /> | |
| 112 </conditional> | |
| 113 <output name="out_samples" ftype="tabular"> | |
| 114 <assert_contents> | |
| 115 <has_n_columns n="3" /> | |
| 116 <has_text text="S_00000" /> | |
| 117 <has_text text="S_00001" /> | |
| 118 <has_text text="S_00002" /> | |
| 119 <has_text text="S_00003" /> | |
| 120 <has_text text="S_00004" /> | |
| 121 <has_text text="S_00005" /> | |
| 122 <has_text text="S_00006" /> | |
| 123 </assert_contents> | |
| 124 </output> | |
| 125 </test> | |
| 126 </tests> | |
| 127 <help> | |
| 128 This tool serves to access the GMQL public repository, and the user’s private one. | |
| 129 In particular, within the public repository interesting datasets collected from established sources, | |
| 130 like ENCODE or UCSC, and small example datasets are hosted. | |
| 131 | |
| 132 ---- | |
| 133 | |
| 134 **What it does** | |
| 135 | |
| 136 - **view datasets**: list all datasets, both private and public | |
| 137 - **view dataset's samples**: list samples of given dataset | |
| 138 - **rename dataset**: change name of dataset, return updated datasets list | |
| 139 - **delete dataset**: delete dataset, return updated dataset list | |
| 140 | |
| 141 .. class:: warningmark | |
| 142 | |
| 143 Public datasets can only be seen or browsed, but not renamed or deleted. | |
| 144 | |
| 145 .. class:: warningmark | |
| 146 | |
| 147 A gmql_user authentication token is required for every action. | |
| 148 </help> | |
| 149 <expand macro="citations" /> | |
| 150 </tool> |
