view qiime2-2020.8/qiime_diversity_beta-correlation.xml @ 21:a98d7ab297f1 draft

Deleted selected files
author florianbegusch
date Fri, 04 Sep 2020 12:46:48 +0000
parents d93d8888f0b0
children
line wrap: on
line source

<?xml version="1.0" ?>
<tool id="qiime_diversity_beta-correlation" name="qiime diversity beta-correlation"
      version="2020.8">
  <description>Beta diversity correlation</description>
  <requirements>
    <requirement type="package" version="2020.8">qiime2</requirement>
  </requirements>
  <command><![CDATA[
qiime diversity beta-correlation

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

--m-metadata-column=$mmetadatacolumn


#if str($pmethod) != 'None':
--p-method=$pmethod
#end if

--p-permutations=$ppermutations

#if $pintersectids:
 --p-intersect-ids
#end if

#if str($plabel1):
  --p-label1=$plabel1
#end if
#if str($plabel2):
  --p-label2=$plabel2
#end if# if $input_files_ometadatadistancematrix:
  # 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 + ' --o-metadata-distance-matrix=' + d['additional_input'].__getattr__('file_name')
    # end for
    # return $file_list
  # end def
--o-metadata-distance-matrix=$list_dict_to_string($input_files_ometadatadistancematrix)
# end if

--o-mantel-scatter-visualization=omantelscattervisualization

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

;
cp odistancematrix.qza $odistancematrix

;
qiime tools export  omantelscattervisualization.qzv --output-path out
&& mkdir -p '$omantelscattervisualization.files_path'
&& cp -r out/* '$omantelscattervisualization.files_path'
&& mv '$omantelscattervisualization.files_path/index.html' '$omantelscattervisualization'

  ]]></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="True" title="--m-metadata-file">
      <param format="tabular,qza,no_unzip.zip" label="--m-metadata-file: METADATA" name="additional_input" optional="True" type="data" />
    </repeat>
    <param label="--m-metadata-column: COLUMN  MetadataColumn[Numeric] Numeric metadata column from which to compute pairwise Euclidean distances                          [required]" name="mmetadatacolumn" optional="False" type="text" />
    <param label="--p-method: " name="pmethod" optional="True" type="select">
      <option selected="True" value="None">Selection is Optional</option>
      <option value="spearman">spearman</option>
      <option value="pearson">pearson</option>
    </param>
    <param label="--p-permutations: INTEGER Range(0, None)     The number of permutations to be run when computing p-values. Supplying a value of zero will disable permutation testing and p-values will not be calculated (this results in *much* quicker execution time if p-values are not desired).               [default: 999]" min="0" name="ppermutations" optional="True" type="integer" value="999" />
    <param label="--p-intersect-ids: --p-intersect-ids: / --p-no-intersect-ids If supplied, IDs that are not found in both distance matrices will be discarded before applying the Mantel test. Default behavior is to error on any mismatched IDs.                                   [default: False]" name="pintersectids" selected="False" type="boolean" />
    <param label="--p-label1: TEXT      Label for `distance-matrix` in the output visualization.                    [default: \'Metadata\']" name="plabel1" optional="False" type="text" value="\'Metadata\'" />
    <param label="--p-label2: TEXT      Label for `metadata-distance-matrix` in the output visualization.             [default: \'Distance Matrix\']" name="plabel2" optional="False" type="text" value="\'Distance Matrix\'" />
    <param label="--examples: Show usage examples and exit." name="examples" optional="False" type="data" />
    
  </inputs>

  <outputs>
    <repeat name="input_files_ometadatadistancematrix" optional="False" title="--o-metadata-distance-matrix">
      <param format="tabular,qza,no_unzip.zip" label="--o-metadata-distance-matrix: ARTIFACT DistanceMatrix     The Distance Matrix produced from the metadata column and used in the mantel test                  [required]" name="additional_input" optional="False" type="data" />
    </repeat>
    <data format="html" label="${tool.name} on ${on_string}: mantelscattervisualization.html" name="omantelscattervisualization" />
    
  </outputs>

  <help><![CDATA[
Beta diversity correlation
###############################################################

Create a distance matrix from a numeric metadata column and apply a two-
sided Mantel test to identify correlation between two distance matrices.
Actions used internally: `distance-matrix` from q2-metadata and `mantel`
from q2-diversity.

Parameters
----------
metadata : MetadataColumn[Numeric]
    Numeric metadata column from which to compute pairwise Euclidean
    distances
distance_matrix : DistanceMatrix
    Matrix of distances between pairs of samples.
method : Str % Choices('spearman', 'pearson'), optional
    The correlation test to be applied in the Mantel test.
permutations : Int % Range(0, None), optional
    The number of permutations to be run when computing p-values. Supplying
    a value of zero will disable permutation testing and p-values will not
    be calculated (this results in *much* quicker execution time if
    p-values are not desired).
intersect_ids : Bool, optional
    If supplied, IDs that are not found in both distance matrices will be
    discarded before applying the Mantel test. Default behavior is to error
    on any mismatched IDs.
label1 : Str, optional
    Label for `distance_matrix` in the output visualization.
label2 : Str, optional
    Label for `metadata_distance_matrix` in the output visualization.

Returns
-------
metadata_distance_matrix : DistanceMatrix
    The Distance Matrix produced from the metadata column and used in the
    mantel test
mantel_scatter_visualization : Visualization
    Scatter plot rendering of the manteltest results
  ]]></help>
  <macros>
    <import>qiime_citation.xml</import>
  </macros>
  <expand macro="qiime_citation"/>
</tool>