view parsedb.xml @ 0:183edf446dcf draft default tip

Uploaded
author davidvanzessen
date Mon, 17 Jul 2017 07:44:27 -0400
parents
children
line wrap: on
line source

<tool id="change_o_parsedb_galaxy" name="ParseDB" version="1.0">
	<description>Change-O</description>
	<command interpreter="bash">
		#if $action.action_select=="fasta"
			parsedb.sh fasta $input $out_file
		#elif $action.action_select=="clip"
			parsedb.sh clip $input $out_file
		#elif $action.action_select=="split"
			parsedb.sh split $input $out_file $action.column '$input.name'
		#elif $action.action_select=="add"
			parsedb.sh add $input $out_file $action.column $action.value
		#elif $action.action_select=="delete"
			parsedb.sh delete $input $out_file $action.column $action.value $action.regex
		#elif $action.action_select=="drop"
			parsedb.sh drop $input $out_file $action.column
		#elif $action.action_select=="index"
			parsedb.sh index $input $out_file $action.column
		#elif $action.action_select=="rename"
			parsedb.sh rename $input $out_file $action.column $action.newname
		#elif $action.action_select=="select"
			parsedb.sh select $input $out_file $action.column $action.value $action.regex
		#elif $action.action_select=="sort"
			parsedb.sh sort $input $out_file $action.column $action.num $action.desc
		#elif $action.action_select=="update"
			parsedb.sh update $input $out_file $action.column $action.value $action.update $action.regex
		#end if
	</command>
	<inputs>
		<param name="input" type="data" format="tabular" label="Change-o DB file" />
		<conditional name="action">
			<param name="action_select" type="select" label="Action">
				<option value="fasta">Create a fasta file from database records</option>
				<option value="clip">Create a clip-fasta file from database records</option>
				<option value="split">Split database files by field values</option>
				<option value="add">Add field and value pairs</option>
				<option value="delete">Delete specific records</option>
				<option value="drop">Delete entire fields</option>
				<option value="index">Add a numeric index field</option>
				<option value="rename">Renames fields</option>
				<option value="select">Select specific records</option>
				<option value="sort">Sort records by field values</option>
				<option value="update">Update field and value pairs</option>
			</param>
			<when value="fasta">
				
			</when>
			<when value="clip">
				
			</when>
			<when value="split">
				<param name="column" label="Select the column to split on" type="data_column" data_ref="input" numerical="False" use_header_names="True" force_select="True" />
			</when>l
			<when value="add">
				<param name="column" type="text" size="20" label="The new column name." />
				<param name="value" type="text" size="20" label="The value that will be put in the new column" />
			</when>
			<when value="delete">
				<param name="column" label="Select the column to search on." type="data_column" data_ref="input" numerical="False" use_header_names="True" force_select="True" />
				<param name="value" type="text"  size="20" label="The value that will be used" />
				<param name="regex" type="select" label="Regex" help="Treat values as regular expressions and allow partial string matches.">
					<option value="text" selected="true">False</option>
					<option value="regex">True</option>
				</param>
			</when>
			<when value="drop">
				<param name="column" label="Select the column to remove" type="data_column" data_ref="input" numerical="False" use_header_names="True" force_select="True" />
			</when>
			<when value="index">
				<param name="column" type="text" size="20" value="INDEX" label="The index column name" />
			</when>
			<when value="rename">
				<param name="column" label="Select the column to delete on" type="data_column" data_ref="input" numerical="False" use_header_names="True" force_select="True" />
				<param name="newname" type="text" size="20" value="newname" label="The new column name" />
			</when>
			<when value="select">
				<param name="column" label="Select the column to search on" type="data_column" data_ref="input" numerical="False" use_header_names="True" force_select="True" />
				<param name="value" type="text" size="20" label="The value that will be used" />
				<param name="regex" type="select" label="Regex" help="Treat values as regular expressions and allow partial string matches">
					<option value="text" selected="true">False</option>
					<option value="regex">True</option>
				</param>
			</when>
			<when value="sort">
				<param name="column" label="Select the column to sort on" type="data_column" data_ref="input" numerical="False" use_header_names="True" force_select="True" />
				<param name="num" type="select" label="Numerical" help="Define the sort column as numeric rather than textual.">
					<option value="false" selected="true">False</option>
					<option value="true">True</option>
				</param>
				<param name="desc" type="select" label="Descending" help="Sort records in descending">
					<option value="false" selected="true">False</option>
					<option value="true">True</option>
				</param>
			</when>
			<when value="update">
				<param name="column" label="Select the column to search on" type="data_column" data_ref="input" numerical="False" use_header_names="True" force_select="True" />
				<param name="value" type="text" size="20" label="The value that will be replaced" />
				<param name="update" type="text" size="20" label="The value that will replace the original" />
				<param name="regex" type="select" label="Regex" help="Treat values as regular expressions and allow partial string matches">
					<option value="text" selected="true">False</option>
					<option value="regex">True</option>
				</param>
			</when>			
		</conditional>
	</inputs>
	<outputs>
		<data format="tabular" name="out_file" label = "Change-o DB ${input.name}">
		    <filter>action['action_select'] != "split"</filter>
		</data>
        <data format="txt" name="split">
			<discover_datasets pattern="(?P&lt;designation&gt;.+)\.tab" ext="tabular" directory="split" visible="true" />
			<filter>action['action_select'] == "split"</filter>
        </data>
	</outputs>
	<citations>
		<citation type="doi">10.1093/bioinformatics/btv359</citation>
	</citations>
	<help>
		
	</help>
</tool>