Mercurial > repos > florianbegusch > qiime2_suite
diff qiime2/qiime_longitudinal_first-distances.xml @ 29:3ba9833030c1 draft
Uploaded
author | florianbegusch |
---|---|
date | Fri, 04 Sep 2020 13:12:49 +0000 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/qiime2/qiime_longitudinal_first-distances.xml Fri Sep 04 13:12:49 2020 +0000 @@ -0,0 +1,161 @@ +<?xml version="1.0" ?> +<tool id="qiime_longitudinal_first-distances" name="qiime longitudinal first-distances" + version="2020.8"> + <description>Compute first distances or distance from baseline between sequential states</description> + <requirements> + <requirement type="package" version="2020.8">qiime2</requirement> + </requirements> + <command><![CDATA[ +qiime longitudinal first-distances + +--i-distance-matrix=$idistancematrix +# if $input_files_mmetadatafile: + # def list_dict_to_string(list_dict): + # set $file_list = list_dict[0]['additional_input'].__getattr__('file_name') + # for d in list_dict[1:]: + # set $file_list = $file_list + ' --m-metadata-file=' + d['additional_input'].__getattr__('file_name') + # end for + # return $file_list + # end def +--m-metadata-file=$list_dict_to_string($input_files_mmetadatafile) +# end if + +#if '__ob__' in str($pstatecolumn): + #set $pstatecolumn_temp = $pstatecolumn.replace('__ob__', '[') + #set $pstatecolumn = $pstatecolumn_temp +#end if +#if '__cb__' in str($pstatecolumn): + #set $pstatecolumn_temp = $pstatecolumn.replace('__cb__', ']') + #set $pstatecolumn = $pstatecolumn_temp +#end if +#if 'X' in str($pstatecolumn): + #set $pstatecolumn_temp = $pstatecolumn.replace('X', '\\') + #set $pstatecolumn = $pstatecolumn_temp +#end if +#if '__sq__' in str($pstatecolumn): + #set $pstatecolumn_temp = $pstatecolumn.replace('__sq__', "'") + #set $pstatecolumn = $pstatecolumn_temp +#end if +#if '__db__' in str($pstatecolumn): + #set $pstatecolumn_temp = $pstatecolumn.replace('__db__', '"') + #set $pstatecolumn = $pstatecolumn_temp +#end if + +--p-state-column=$pstatecolumn + + +#if '__ob__' in str($pindividualidcolumn): + #set $pindividualidcolumn_temp = $pindividualidcolumn.replace('__ob__', '[') + #set $pindividualidcolumn = $pindividualidcolumn_temp +#end if +#if '__cb__' in str($pindividualidcolumn): + #set $pindividualidcolumn_temp = $pindividualidcolumn.replace('__cb__', ']') + #set $pindividualidcolumn = $pindividualidcolumn_temp +#end if +#if 'X' in str($pindividualidcolumn): + #set $pindividualidcolumn_temp = $pindividualidcolumn.replace('X', '\\') + #set $pindividualidcolumn = $pindividualidcolumn_temp +#end if +#if '__sq__' in str($pindividualidcolumn): + #set $pindividualidcolumn_temp = $pindividualidcolumn.replace('__sq__', "'") + #set $pindividualidcolumn = $pindividualidcolumn_temp +#end if +#if '__db__' in str($pindividualidcolumn): + #set $pindividualidcolumn_temp = $pindividualidcolumn.replace('__db__', '"') + #set $pindividualidcolumn = $pindividualidcolumn_temp +#end if + +--p-individual-id-column=$pindividualidcolumn + + +#if str($pbaseline): + --p-baseline=$pbaseline +#end if +#if str($preplicatehandling) != 'None': +--p-replicate-handling=$preplicatehandling +#end if + +--o-first-distances=ofirstdistances + +#if str($examples) != 'None': +--examples=$examples +#end if + +; +cp ofirstdistances.qza $ofirstdistances + + ]]></command> + <inputs> + <param format="qza,no_unzip.zip" label="--i-distance-matrix: ARTIFACT DistanceMatrix Matrix of distances between pairs of samples. [required]" name="idistancematrix" optional="False" type="data" /> + <repeat name="input_files_mmetadatafile" optional="False" title="--m-metadata-file"> + <param format="tabular,qza,no_unzip.zip" label="--m-metadata-file: METADATA... (multiple Sample metadata file containing arguments will be individual-id-column. merged) [required]" name="additional_input" optional="False" type="data" /> + </repeat> + <param label="--p-state-column: TEXT Metadata column containing state (time) variable information. [required]" name="pstatecolumn" optional="False" type="text" /> + <param label="--p-individual-id-column: TEXT Metadata column containing IDs for individual subjects. [required]" name="pindividualidcolumn" optional="False" type="text" /> + <param label="--p-baseline: NUMBER A value listed in the state-column metadata column against which all other states should be compared. Toggles calculation of static distances instead of first distances (which are calculated if no value is given for baseline). If a \'baseline\' value is provided, sample distances at each state are compared against the baseline state, instead of the previous state. Must be a value listed in the state-column. [optional]" name="pbaseline" optional="False" type="text" /> + <param label="--p-replicate-handling: " name="preplicatehandling" optional="True" type="select"> + <option selected="True" value="None">Selection is Optional</option> + <option value="error">error</option> + <option value="random">random</option> + <option value="drop">drop</option> + </param> + <param label="--examples: Show usage examples and exit." name="examples" optional="False" type="data" /> + + </inputs> + + <outputs> + <data format="qza" label="${tool.name} on ${on_string}: firstdistances.qza" name="ofirstdistances" /> + + </outputs> + + <help><![CDATA[ +Compute first distances or distance from baseline between sequential states +############################################################### + +Calculates first distances between sequential states for samples collected +from individual subjects sampled repeatedly at two or more states. This +method is similar to the "first differences" method, except that it +requires a distance matrix as input and calculates first differences as +distances between successive states. Outputs a data series of first +distances for each individual subject at each sequential pair of states, +labeled by the SampleID of the second state (e.g., paired distances between +time 0 and time 1 would be labeled by the SampleIDs at time 1). This file +can be used as input to linear mixed effects models or other longitudinal +or diversity methods to compare changes in first distances across time or +among groups of subjects. Also supports distance from baseline (or other +static comparison state) by setting the "baseline" parameter. + +Parameters +---------- +distance_matrix : DistanceMatrix + Matrix of distances between pairs of samples. +metadata : Metadata + Sample metadata file containing individual_id_column. +state_column : Str + Metadata column containing state (time) variable information. +individual_id_column : Str + Metadata column containing IDs for individual subjects. +baseline : Float, optional + A value listed in the state_column metadata column against which all + other states should be compared. Toggles calculation of static + distances instead of first distances (which are calculated if no value + is given for baseline). If a "baseline" value is provided, sample + distances at each state are compared against the baseline state, + instead of the previous state. Must be a value listed in the + state_column. +replicate_handling : Str % Choices('error', 'random', 'drop'), optional + Choose how replicate samples are handled. If replicates are detected, + "error" causes method to fail; "drop" will discard all replicated + samples; "random" chooses one representative at random from among + replicates. + +Returns +------- +first_distances : SampleData[FirstDifferences] + Series of first distances. + ]]></help> + <macros> + <import>qiime_citation.xml</import> + </macros> + <expand macro="qiime_citation"/> +</tool> \ No newline at end of file