view vcfcheck.xml @ 3:e57a64775b9e draft default tip

Uploaded
author anton
date Mon, 15 Sep 2014 14:49:50 -0400
parents fb8033dcb750
children
line wrap: on
line source

<tool id="vcfcheck" name="VCFcheck:" version="0.0.2">
<requirements>
    <requirement type="package" version="8a5602bf07">vcflib</requirement>
</requirements>
  <description>Verify that the reference allele matches the reference genome</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    
  vcfcheck $failure_selector -f "${reference_fasta_filename}" "${input_vcf}" > "${out_file1}"</command>
  <inputs>
    <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">
             <!--<filter type="data_meta" key="dbkey" ref="input_bam" column="value"/>-->
           </options>
	   <validator type="no_options" message="A built-in reference genome is not available for the build associated with the selected input file"/>
         </param>
	 <param name="input_vcf" type="data" format="vcf" label="Select VCF dataset">
	   <!-- Validators are commented to allow users apply too to any build. May need to be revised in the future
		<validator type="unspecified_build" />
		<validator type="dataset_metadata_in_data_table" table_name="fasta_indexes" metadata_name="dbkey" metadata_column="1" message="Sequences are not currently available for the specified build." />
	   -->
	 </param>
       </when>
       <when value="history"> <!-- FIX ME!!!! -->
         <param name="ref_file" type="data" format="fasta" label="Using reference file" />
	 <param name="input_vcf" type="data" format="vcf" label="Select VCF dataset" />
       </when>
     </conditional>
     <param name="failure_selector" type="select" display="radio" label="Exclude or include failed sites">
       <option value="-x">Exculde failures (-x option)</option>
       <option value="-k">Keep failures (-k option)</option>
     </param>
  </inputs>
  <outputs>
    <data format="vcf" name="out_file1" />
  </outputs>
  <stdio>
    <regex match="index file" source="stderr" level="warning"/>
  </stdio>
  <tests>
    <test>
      <param name="reference_source_selector" value="history" />
      <param name="failure_selection" value="-x" />
      <param name="input_vcf" value="vcflib-phix.vcf"/>
      <param name="ref_file" value="vcflib-test-genome-phix.fa" />
      <output name="out_file1" file="vcfcheck-test1.vcf"/>
    </test>
    </tests>
  <help>

Verifies that the VCF REF field matches the reference as described.  

The options are::

    -x, --exclude-failures If a record fails, don't print it.  Otherwise do.
    -k, --keep-failures    Print if the record fails, otherwise not.

----

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

</help>
</tool>