view vcfs2fasta.xml @ 9:1ec00e184217 draft

Uploaded
author ulfschaefer
date Thu, 16 Jun 2016 07:01:47 -0400
parents f05fa489089b
children 76f76eee9130
line wrap: on
line source

<tool id="vcfs2fasta" name="VCFs to fasta" version="1.0">
  <description>Takes a set of VCF files and outputs a multi fasta file with only the variant positions.</description>
  <requirements>
    <requirement type="package" version="2.7.10">python</requirement>
    <requirement type="package" version="0.6.8dev">pyvcf</requirement>
    <requirement type="package" version="3.11">pyyaml</requirement>
    <requirement type="package" version="2.0.2">bintrees</requirement>
	<requirement type="package" version="1.66">biopython</requirement>
	<requirement type="package" version="1.4">matplotlib</requirement>
    <requirement type="package" version="0.23.1">cython</requirement>
	<requirement type="package" version="1.0">phephenix</requirement>
  </requirements>
  <stdio>
	<!-- Assume anything other than zero is an error -->
    <exit_code range="1:" />
    <exit_code range=":-1" />
  </stdio>
  <command interpreter="bash">
    vcfs2fasta.sh
    $output
    #if str($mix_cond.mix) == "yes":
        $mix_cond.mix_value
    #else
        NOTTHERE
    #end if
    #if str($coln_cond.coln) == "yes":
        $coln_cond.column_ns
    #else
        NOTTHERE
    #end if
    #if str($colgap_cond.colgap) == "yes":
        $colgap_cond.column_gaps
    #else
        NOTTHERE
    #end if
    #if str($samplen_cond.samplen) == "yes":
        $samplen_cond.sample_ns
    #else
        NOTTHERE
    #end if
    #if str($samplegap_cond.samplegap) == "yes":
        $samplegap_cond.sample_gaps
    #else
        NOTTHERE
    #end if
    #if str($reference_cond.reference) == "yes":
        $reference_cond.ref_fa
    #else
        NOTTHERE
    #end if
    #if str($include_cond.include) == "yes":
        $include_cond.in_bed
    #else
        NOTTHERE
    #end if
    #if str($exclude_cond.exclude) == "yes":
        $exclude_cond.ex_bed
    #else
        NOTTHERE
    #end if
    #if $withstats:
        $statsfile
    #else
        NOTTHERE
    #end if
    #for $i, $input_vcf in enumerate( $input_vcfs ):
        "${input_vcf}"
    #end for
  </command>

  <inputs>
    <param name="input_vcfs" type="data" multiple="true" format="vcf" label="Input VCF file(s)" />

    <conditional name="mix_cond">
        <param name="mix" type="select" label="With Mixtures" help="Specify this option with a threshold to output mixtures above this threshold.">
          <option value="yes">Specify</option>
          <option value="no" selected="true">Do not specify</option>
        </param>
        <when value="yes">
            <param name="mix_value" type="float" value="0.5" label="Mixture value" />
        </when>
    </conditional>

    <conditional name="coln_cond">
        <param name="coln" type="select" label="Column Ns" help="Keeps columns with fraction of Ns below specified threshold.">
          <option value="yes">Specify</option>
          <option value="no" selected="true">Do not specify</option>
        </param>
        <when value="yes">
            <param name="column_ns" type="float" value="0.5" label="Column Ns value" />
        </when>
    </conditional>

    <conditional name="colgap_cond">
        <param name="colgap" type="select" label="Column Gaps" help="Keeps columns with fraction of gaps below specified threshold.">
          <option value="yes">Specify</option>
          <option value="no" selected="true">Do not specify</option>
        </param>
        <when value="yes">
            <param name="column_gaps" type="float" value="0.5" label="Column gaps value" />
        </when>
    </conditional>

    <conditional name="samplen_cond">
        <param name="samplen" type="select" label="Sample Ns" help="Keeps samples with fraction of Ns below specified threshold.">
          <option value="yes">Specify</option>
          <option value="no" selected="true">Do not specify</option>
        </param>
        <when value="yes">
            <param name="sample_ns" type="float" value="0.5" label="Sample Ns value" />
        </when>
    </conditional>

    <conditional name="samplegap_cond">
        <param name="samplegap" type="select" label="Sample gaps" help="Keeps samples with fraction of gaps below specified threshold.">
          <option value="yes">Specify</option>
          <option value="no" selected="true">Do not specify</option>
        </param>
        <when value="yes">
            <param name="sample_gaps" type="float" value="0.5" label="Sample gaps value" />
        </when>
    </conditional>

    <conditional name="reference_cond">
        <param name="reference" type="select" label="Reference genome file" help="If path to reference specified, then whole genome will be outputted.">
          <option value="yes">Specify</option>
          <option value="no" selected="true">Do not specify</option>
        </param>
        <when value="yes">
            <param name="ref_fa" type="data" format="fasta" label="Reference fasta file" help="Fasta format"/>
        </when>
    </conditional>

    <conditional name="include_cond">
        <param name="include" type="select" label="Include region" help="Specify regions to include in a bed file.">
          <option value="yes">Specify</option>
          <option value="no" selected="true">Do not specify</option>
        </param>
        <when value="yes">
            <param name="in_bed" type="data" format="bed" label="Include regions bed file" help="bed format"/>
        </when>
    </conditional>

    <conditional name="exclude_cond">
        <param name="exclude" type="select" label="Exclude region" help="Specify regions to exclude in a bed file.">
          <option value="yes">Specify</option>
          <option value="no" selected="true">Do not specify</option>
        </param>
        <when value="yes">
            <param name="ex_bed" type="data" format="bed" label="Exclude regions bed file" help="bed format"/>
        </when>
    </conditional>

  </inputs>

  <outputs>
    <data format="fasta" name="output" label="${tool.name} on ${on_string}: FASTA file" />
  </outputs>
  <test>
	<param name="input_vcfs" value="1_short.vcf" ftype="vcf" />
	<param name="input_vcfs" value="2_short.vcf" ftype="vcf" />
	<output name="output" file="testresult.fa" ftype="fasta" />
  </test>
  <help>

  </help>
</tool>