PageRenderTime 12ms CodeModel.GetById 1ms app.highlight 5ms RepoModel.GetById 1ms app.codeStats 0ms

/tools/vcf_tools/intersect.xml

https://bitbucket.org/cistrome/cistrome-harvard/
XML | 80 lines | 73 code | 7 blank | 0 comment | 0 complexity | 9cdd1d3e72d2e643a189808af406b5de MD5 | raw file
 1<tool id="vcf_intersect" name="Intersect" version="1.0.0">
 2  <description>Generate the intersection of two VCF files</description>
 3  <command interpreter="python">
 4    vcfPytools.py
 5      intersect 
 6      --in=$input1
 7      #if $format_type.format == "vcf"
 8      --in=$input2
 9      #elif $format_type.format == "bed"
10      --bed=$input2
11      #end if
12      #if $priority_file.value == "first_file"
13      --priority-file=$input1
14      #elif $priority_file.value == "second_file"
15      --priority-file=$input2
16      #end if
17      --out=$output1
18  </command>
19  <inputs>
20    <param name="input1" label="First VCF file" type="data" format="vcf" />
21    <conditional name="format_type">
22      <param name="format" type="select" label="intersect with file of format">
23        <option value="vcf">VCF</option>
24        <option value="bed">BED</option>
25      </param>
26      <when value="vcf">
27        <param name="input2" label="second VCF file" type="data" format="vcf"/>
28      </when>
29      <when value="bed">
30        <param name="input2" label="second BED file" type="data" format="bed"/>
31      </when>
32    </conditional>
33    <param name="priority_file" type="select" label="Priority file" help="If the priority file argument is set (this must be equal to one of the input vcf files), then the record written to the output will come from this file.  If this argument is not set, the record with the highest quality is written out.">
34      <option value="none">None</option>
35      <option value="first_file">First file</option>
36      <option value="second_file">Second file</option>
37    </param>
38  </inputs>
39  <outputs>
40    <data format="vcf" name="output1" label="${tool.name} on ${on_string}" />
41  </outputs>
42  <tests>
43    <test>
44      <param name="input1" value="1.vcf" ftype="vcf" />
45      <param name="format" value="vcf" />
46      <param name="input2" value="2.vcf" ftype="vcf" />
47      <param name="priority_file" value="none" />
48      <output name="output" file="1_2_intersect_priority_0.vcf" lines_diff="2" ftype="vcf" />
49    </test>
50    <test>
51      <param name="input1" value="1.vcf" ftype="vcf" />
52      <param name="format" value="vcf" />
53      <param name="input2" value="2.vcf" ftype="vcf" />
54      <param name="priority_file" value="first_file" />
55      <output name="output" file="1_2_intersect_priority_1.vcf" lines_diff="2" ftype="vcf" />
56    </test>
57    <test>
58      <param name="input1" value="1.vcf" ftype="vcf" />
59      <param name="format" value="vcf" />
60      <param name="input2" value="2.vcf" ftype="vcf" />
61      <param name="priority_file" value="second_file" />
62      <output name="output" file="1_2_intersect_priority_2.vcf" lines_diff="2" ftype="vcf" />
63    </test>
64  </tests>
65  <help>
66
67**What it does**
68
69This tool uses vcfPytools_' intersect command to generate the intersection of two VCF files
70
71.. _vcfPytools: https://github.com/AlistairNWard/vcfPytools
72
73Two input files are required as input and the intersection of these two files is generated and sent to the output.  These files must be sorted by genomic coordinate to function correctly, although the reference sequence order is no important.
74
75The intersection can be calculated on two VCF files or a VCF and a BED file.
76
77If the priority file argument is set (this must be equal to one of the input VCF files), then the record written to the output will come from this file.  If this argument is not set, the record with the highest quality is written out.
78
79  </help>
80</tool>