view vcfleftalign.xml @ 3:520aae0d09e2 draft default tip

Uploaded
author anton
date Mon, 15 Sep 2014 14:52:58 -0400
parents 42d8be06ca03
children
line wrap: on
line source

<tool id="vcfleftalign" name="VCFleftAlign:" version="0.0.2">
<requirements>
    <requirement type="package" version="8a5602bf07">vcflib</requirement>
    <!-- <requirement type="package" version="0.1.18">samtools</requirement> -->
</requirements>
  <description>Left-align indels and complex variants in VCF dataset</description>
  <command>
    #set $reference_fasta_filename = "localref.fa"
    #if str( $reference_source.reference_source_selector ) == "history":
       ln -s "${reference_source.ref_file}" "${reference_fasta_filename}" &amp;&amp;
    #else:
       #set $reference_fasta_filename = str( $reference_source.ref_file.fields.path )
    #end if    
   vcfleftalign -r "${reference_fasta_filename}" -w "${window_size}" "${input_vcf}" > "${out_file1}"</command>
  <inputs>
<param name="input_vcf" type="data" format="vcf" label="VCF dataset to left-align" />
    <conditional name="reference_source">
       <param name="reference_source_selector" type="select" label="Choose the source for the reference genome">
         <option value="cached">Locally cached</option>
         <option value="history">History</option>
       </param>
       <when value="cached">
         <param name="ref_file" type="select" label="Select reference genome">
           <options from_data_table="fasta_indexes">
           </options>
	   <validator type="no_options" message="A built-in reference genome is not available for the build associated with the selected input file"/>
         </param>
       </when>
       <when value="history"> <!-- FIX ME!!!! -->
         <param name="ref_file" type="data" format="fasta" label="Using reference file" />
       </when>
     </conditional>
     <param name="window_size" type="integer" value="150" label="Use a window of this many bp when left-aligning" help="default = 150 bp" />
  </inputs>
  <outputs>
    <data format="vcf" name="out_file1" />
  </outputs>
 <stdio>
    <exit_code range="1:" level="fatal" />
 </stdio>
  <tests>
    <test>
      <param name="reference_source_selector" value="history" />
      <param name="input_vcf" value="vcflib-phix.vcf"/>
      <param name="ref_file" value="vcflib-test-genome-phix.fa" />
      <param name="window_size" value="150" />
      <output name="out_file1" file="vcfleftalign-test1.vcf"/>
    </test>
    </tests>
  <help>

Left-aligns variants in VCF dataset.  Window size is determined dynamically according to the entropy of the regions flanking the indel.  These must have entropy > 1 bit/bp, or be shorter than ~5kb.

----

Vcfleftalign is a part of VCFlib toolkit developed by Erik Garrison (https://github.com/ekg/vcflib).                                                                                                                                 

</help>
</tool>