view coverage_distributions.xml @ 12:4b6590dd7250

Uploaded
author miller-lab
date Wed, 12 Sep 2012 17:10:26 -0400
parents
children
line wrap: on
line source

<tool id="gd_coverage_distributions" name="Coverage" version="1.0.0">
  <description>distributions</description>

  <command interpreter="python">
    coverage_distributions.py "$input" "0" "$output" "$output.files_path"
    #if $individuals.choice == '0'
      "all_individuals"
    #else if $individuals.choice == '1'
      #set $arg = 'individuals:%s' % str($individuals.p1_input)
        "$arg"
    #else if $individuals.choice == '2'
      #for $population in $individuals.populations
        #set $arg = 'population:%s:%s' % (str($population.p_input), str($population.p_input.name))
        "$arg"
      #end for
    #end if
    #for $individual, $individual_col in zip($input.dataset.metadata.individual_names, $input.dataset.metadata.individual_columns)
      #set $individual_arg = 'individual:%s:%s' % ($individual_col, $individual)
      "$individual_arg"
    #end for
  </command>

  <inputs>
    <param name="input" type="data" format="gd_snp" label="SNP table" />

    <conditional name="individuals">
      <param name="choice" type="select" label="Individuals">
        <option value="0" selected="true">All</option>
        <option value="1">Individuals in a population</option>
        <option value="2">Population totals</option>
      </param>
      <when value="0" />
      <when value="1">
        <param name="p1_input" type="data" format="gd_indivs" label="Population individuals" />
      </when>
      <when value="2">
        <repeat name="populations" title="Population" min="1">
          <param name="p_input" type="data" format="gd_indivs" label="individuals" />
        </repeat>
      </when>
    </conditional> 

    <!--
    <param name="data_source" type="select" label="Data source">
      <option value="0" selected="true">Sequence coverage</option>
      <option value="1">Genotype quality</option>
    </param>
    -->
  </inputs>

  <outputs>
    <data name="output" format="html" />
  </outputs>

  <tests>
    <test>
      <param name="input" value="test_in/sample.gd_snp" ftype="gd_snp" />
      <param name="choice" value="0" />
      <output name="output" file="test_out/coverage_distributions/coverage.html" ftype="html" compare="diff" lines_diff="2">
        <extra_files type="file" name="coverage.pdf" value="test_out/coverage_distributions/coverage.pdf" compare="sim_size" delta = "1000"/>
        <extra_files type="file" name="coverage.txt" value="test_out/coverage_distributions/coverage.txt" />
      </output>
    </test>
  </tests>

  <help>
**What it does**

This tool reports distributions of SNP reliability indicators for
individuals or populations.  The reliability is measured by the sequence
coverage.  Textual and graphical reports are generated, where the text
output gives the cumulative distributions.
  </help>
</tool>