view qcSTR/qcSTR.xml @ 0:ecf8c4f9f8ba draft

"planemo upload for repository https://github.com/Kulivox/TRToolsGalaxyWrapper commit 08480e3145858e41b14bf1061f87243e8cc2d04e"
author michal_klinka
date Sat, 23 Apr 2022 16:34:03 +0000
parents
children 8e8cf43f6836
line wrap: on
line source

<?xml version="1.0" ?>
<tool id="qcSTR" name="QcSTR" version="@tool_version@">
    <description>qcSTR generates plots that are useful for diagnosing issues in TR calling.</description>
	<macros>
		<import>macros.xml</import>
	</macros>
	<expand macro="requirements"/>
    <version_command>qcSTR --version</version_command>
	<command detect_errors="exit_code"><![CDATA[qcSTR

## vcf definition
#if $required_arguments.vcf:
   --vcf $required_arguments.vcf
#end if
## end vcf definition
## out definition
#if $required_arguments.out:
   --out $required_arguments.out
#end if
## end out definition
## vcftype definition
#if $optional_input_arguments.vcftype:
   --vcftype $optional_input_arguments.vcftype
#end if
## end vcftype definition
## samples definition
#if $optional_input_arguments.samples:
   --samples $optional_input_arguments.samples
#end if
## end samples definition
## period definition
#if $optional_input_arguments.period:
   --period $optional_input_arguments.period
#end if
## end period definition
## quality_repeat definition
#for $item in $quality_plot_options.quality_repeat:
      ## quality definition
   #if $item.quality:
   --quality
   #end if
   ## end quality definition

#end for
## end quality_repeat definition
## quality_ignore_no_call definition
#if $quality_plot_options.quality_ignore_no_call:
   --quality-ignore-no-call
#end if
## end quality_ignore_no_call definition
## refbias_metric definition
#if $reference_bias_plot_options.refbias_metric:
   --refbias-metric $reference_bias_plot_options.refbias_metric
#end if
## end refbias_metric definition
## refbias_mingts definition
#if $reference_bias_plot_options.refbias_mingts:
   --refbias-mingts $reference_bias_plot_options.refbias_mingts
#end if
## end refbias_mingts definition
## refbias_xrange_min definition
#if $reference_bias_plot_options.refbias_xrange_min:
   --refbias-xrange-min $reference_bias_plot_options.refbias_xrange_min
#end if
## end refbias_xrange_min definition
## refbias_xrange_max definition
#if $reference_bias_plot_options.refbias_xrange_max:
   --refbias-xrange-max $reference_bias_plot_options.refbias_xrange_max
#end if
## end refbias_xrange_max definition
## refbias_binsize definition
#if $reference_bias_plot_options.refbias_binsize:
   --refbias-binsize $reference_bias_plot_options.refbias_binsize
#end if
## end refbias_binsize definition
## numrecords definition
#if $debug_group.numrecords:
   --numrecords $debug_group.numrecords
#end if
## end numrecords definition
## version definition
#if $version05e4.version:
   --version
#end if
## end version definition
1>$stdout 2>$stderr
]]></command>


	<inputs>
		<section name="required_arguments" title="Required arguments" expanded="false">
			<param argument="--vcf" type="data" format="vcf" optional="false" label="vcf" help="VCF file to analyze."/>
			<param argument="--out" type="text" optional="false" label="out" help="Output prefix for files generated"/>
		</section>
		<section name="optional_input_arguments" title="Optional input arguments" expanded="false">
			<param argument="--vcftype" type="select" optional="true" label="vcftype" help="Genotyper that was used to create this VCF input">
				<expand macro="vcfTypes"/>
			</param>
			<param argument="--samples" type="text" optional="true" label="samples" help="File containing list of samples to include"/>
			<param argument="--period" type="integer" optional="true" label="period" help="Only consider repeats with this motif length"/>
		</section>
		<section name="quality_plot_options" title="Quality plot options" expanded="false">
			<repeat name="quality_repeat" title="quality_repeat">
				<param argument="--quality" type="boolean" optional="true" label="quality" help="Which quality plot(s) to produce. May be specified more than  once. See the README for more info">
					<option value="per-locus">Per-locus</option>
					<option value="sample-stratified">Sample-stratified</option>
					<option value="per-sample">Per-sample</option>
					<option value="locus-stratified">Locus-stratified</option>
					<option value="per-call">Per-call</option>
				</param>
			</repeat>
			<param argument="--quality-ignore-no-call" type="boolean" optional="true" label="quality_ignore_no_call" help="Exclude no-calls and calls without quality scores from quality graph distributions instead of the default, which is to include them as zero quality calls. Setting this can cause the plotting to crash if it reduces the number of valid calls (in a strata) to &lt;= 1"/>
		</section>
		<section name="reference_bias_plot_options" title="Reference bias plot options" expanded="false">
			<param argument="--refbias-metric" type="text" optional="true" label="refbias_metric" help="Which metric to use for the y-axis on the reference bias plot.">
				<option value="mean">Mean</option>
				<option value="median">Median</option>
			</param>
			<param argument="--refbias-mingts" type="integer" optional="true" label="refbias_mingts" help="Don't compute points for the reference bias plot based on fewer than this many genotypes"/>
			<param argument="--refbias-xrange-min" type="integer" optional="true" label="refbias_xrange_min" help="Minimum x-axis value (bp) to show on the reference bias plot"/>
			<param argument="--refbias-xrange-max" type="integer" optional="true" label="refbias_xrange_max" help="Maximum x-axis value (bp) to show on the reference bias plot"/>
			<param argument="--refbias-binsize" type="integer" optional="true" label="refbias_binsize" help="Size (bp) of x-axis bins for the reference bias plot"/>
		</section>
		<section name="debug_group" title="Debug group" expanded="false">
			<param argument="--numrecords" type="integer" optional="true" label="numrecords" help="Only process this many records"/>
		</section>
		<section name="version05e4" title="Version" expanded="false">
			<param argument="--version" type="boolean" optional="true" label="version" help="show program's version number and exit"/>
		</section>
	</inputs>


	<outputs>
		<data name="stdout" format="txt" />
        <data name="stderr" format="txt" />
        <collection format="pdf" name="qcSTROutput" type="list" label="Output of qcSTR">
            <discover_datasets format="pdf" pattern="(?P&lt;designation&gt;.+)\.pdf"/>
        </collection>
	</outputs>


	<tests>
         <test>
            <param name="vcf" value="NA12878_chr21_hipstr.sorted.vcf.gz"/>
            <param name="out" value="test"/>
            <param name="vcftype" value="hipstr"/>
            <output name="stdout" file="output.txt" />
            <output_collection name="qcSTROutput" type="list" count="3">
                <element name="test-diffref-bias"  ftype="pdf">
                    <assert_contents>
                        <has_size value="12600" delta="300" />
                        <has_text text="%PDF" />
                        <has_text text="%%EOF" />
                    </assert_contents>
                </element>
                <element name="test-diffref-histogram"  ftype="pdf">
                    <assert_contents>
                        <has_size value="11400" delta="300" />
                        <has_text text="%PDF" />
                        <has_text text="%%EOF" />
                    </assert_contents>
                </element>
                <element name="test-quality"  ftype="pdf">
                    <assert_contents>
                        <has_size value="11900" delta="300" />
                        <has_text text="%PDF" />
                        <has_text text="%%EOF" />
                    </assert_contents>
                </element>
            </output_collection>
        </test>
    </tests>


	<help>usage: main.py [-h] --vcf VCF --out OUT [--vcftype {##!!## Name trh could not be loaded}] [--samples SAMPLES] [--period PERIOD] [--quality {per-locus,sample-stratified,per-sample,locus-stratified,per-call}]
               [--quality-ignore-no-call] [--refbias-metric {mean,median}] [--refbias-mingts REFBIAS_MINGTS] [--refbias-xrange-min REFBIAS_XRANGE_MIN] [--refbias-xrange-max REFBIAS_XRANGE_MAX]
               [--refbias-binsize REFBIAS_BINSIZE] [--numrecords NUMRECORDS] [--version]

options:
  -h, --help            show this help message and exit

Required arguments:
  --vcf VCF             VCF file to analyze.
  --out OUT             Output prefix for files generated

Optional input arguments:
  --vcftype {##!!## Name trh could not be loaded}
                        Which type of VCF to restrict the input to, or 'auto' for no restrction
  --samples SAMPLES     File containing list of samples to include
  --period PERIOD       Only consider repeats with this motif length

Quality plot options:
  --quality {per-locus,sample-stratified,per-sample,locus-stratified,per-call}
                        Which quality plot(s) to produce. May be specified more than once. See the README for more info
  --quality-ignore-no-call
                        Exclude no-calls and calls without quality scores from quality graph distributions instead of the default, which is to include them as zero quality calls. Setting this can cause the plotting to crash if
                        it reduces the number of valid calls (in a strata) to &lt;= 1

Reference bias plot options:
  --refbias-metric {mean,median}
                        Which metric to use for the y-axis on the reference bias plot.
  --refbias-mingts REFBIAS_MINGTS
                        Don't compute points for the reference bias plot based on fewer than this many genotypes
  --refbias-xrange-min REFBIAS_XRANGE_MIN
                        Minimum x-axis value (bp) to show on the reference bias plot
  --refbias-xrange-max REFBIAS_XRANGE_MAX
                        Maximum x-axis value (bp) to show on the reference bias plot
  --refbias-binsize REFBIAS_BINSIZE
                        Size (bp) of x-axis bins for the reference bias plot

Debug group:
  --numrecords NUMRECORDS
                        Only process this many records

Version:
  --version             show program's version number and exit
</help>


	<citations>
		<citation type="bibtex">@misc{TRTools: a toolkit for genome-wide analysis of tandem repeats,
      author = {Nima Mousavi, Jonathan Margoliash, Neha Pusarla, Shubham Saini, Richard Yanicky, Melissa Gymrek},
      year = {2020},
      title = {TRTools},
      publisher = {GitHub},
      journal = {GitHub repository},
      url = {https://github.com/gymreklab/trtools},
}</citation>
	</citations>
</tool>