view qiime2-2020.8/qiime_diversity_filter-distance-matrix.xml @ 20:d93d8888f0b0 draft

Uploaded
author florianbegusch
date Fri, 04 Sep 2020 12:44:24 +0000
parents
children
line wrap: on
line source

<?xml version="1.0" ?>
<tool id="qiime_diversity_filter-distance-matrix" name="qiime diversity filter-distance-matrix"
      version="2020.8">
  <description>Filter samples from a distance matrix.</description>
  <requirements>
    <requirement type="package" version="2020.8">qiime2</requirement>
  </requirements>
  <command><![CDATA[
qiime diversity filter-distance-matrix

--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($pwhere):
  #set $pwhere_temp = $pwhere.replace('__ob__', '[')
  #set $pwhere = $pwhere_temp
#end if
#if '__cb__' in str($pwhere):
  #set $pwhere_temp = $pwhere.replace('__cb__', ']')
  #set $pwhere = $pwhere_temp
#end if
#if 'X' in str($pwhere):
  #set $pwhere_temp = $pwhere.replace('X', '\\')
  #set $pwhere = $pwhere_temp
#end if
#if '__sq__' in str($pwhere):
  #set $pwhere_temp = $pwhere.replace('__sq__', "'")
  #set $pwhere = $pwhere_temp
#end if
#if '__db__' in str($pwhere):
  #set $pwhere_temp = $pwhere.replace('__db__', '"')
  #set $pwhere = $pwhere_temp
#end if

#if str($pwhere):
  --p-where=$pwhere
#end if

#if $pexcludeids:
 --p-exclude-ids
#end if

--o-filtered-distance-matrix=ofiltereddistancematrix

#if str($examples) != 'None':
--examples=$examples
#end if

;
cp ofiltereddistancematrix.qza $ofiltereddistancematrix

  ]]></command>
  <inputs>
    <param format="qza,no_unzip.zip" label="--i-distance-matrix: ARTIFACT DistanceMatrix     Distance matrix to filter by sample.         [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 used with `where` parameter when arguments will    selecting samples to retain, or with `exclude-ids` when be merged)        selecting samples to discard.                [required]" name="additional_input" optional="False" type="data" />
    </repeat>
    <param label="--p-where: TEXT       SQLite WHERE clause specifying sample metadata criteria that must be met to be included in the filtered distance matrix. If not provided, all samples in `metadata` that are also in the input distance matrix will be retained.                     [optional]" name="pwhere" optional="False" type="text" />
    <param label="--p-exclude-ids: --p-exclude-ids: / --p-no-exclude-ids If `True`, the samples selected by `metadata` or `where` parameters will be excluded from the filtered distance matrix instead of being retained. [default: False]" name="pexcludeids" selected="False" type="boolean" />
    <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}: filtereddistancematrix.qza" name="ofiltereddistancematrix" />
    
  </outputs>

  <help><![CDATA[
Filter samples from a distance matrix.
###############################################################

Filter samples from a distance matrix, retaining only the samples matching
search criteria specified by `metadata` and `where` parameters (or
retaining only the samples not matching that criteria, if `exclude_ids` is
True). See the filtering tutorial on https://docs.qiime2.org for additional
details.

Parameters
----------
distance_matrix : DistanceMatrix
    Distance matrix to filter by sample.
metadata : Metadata
    Sample metadata used with `where` parameter when selecting samples to
    retain, or with `exclude_ids` when selecting samples to discard.
where : Str, optional
    SQLite WHERE clause specifying sample metadata criteria that must be
    met to be included in the filtered distance matrix. If not provided,
    all samples in `metadata` that are also in the input distance matrix
    will be retained.
exclude_ids : Bool, optional
    If `True`, the samples selected by `metadata` or `where` parameters
    will be excluded from the filtered distance matrix instead of being
    retained.

Returns
-------
filtered_distance_matrix : DistanceMatrix
    Distance matrix filtered to include samples matching search criteria
  ]]></help>
  <macros>
    <import>qiime_citation.xml</import>
  </macros>
  <expand macro="qiime_citation"/>
</tool>