comparison bcftools_plugin_counts.xml @ 0:06cd2a0252dc draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bcftools commit ef90c4602bdb83ea7455946c9d175ea27284e643
author iuc
date Wed, 06 Jul 2016 07:04:58 -0400
parents
children 136dc00f36c9
comparison
equal deleted inserted replaced
-1:000000000000 0:06cd2a0252dc
1 <?xml version='1.0' encoding='utf-8'?>
2 <tool name="bcftools @EXECUTABLE@" id="bcftools_plugin_@PLUGIN_ID@" version="@VERSION@.0">
3 <description>plugin counts number of samples, SNPs, INDELs, MNPs and total sites</description>
4 <macros>
5 <token name="@EXECUTABLE@">counts</token>
6 <token name="@PLUGIN_ID@">counts</token>
7 <import>macros.xml</import>
8 </macros>
9 <expand macro="requirements" />
10 <expand macro="version_command" />
11 <command detect_errors="aggressive"><![CDATA[
12 @PREPARE_ENV@
13 @PREPARE_INPUT_FILE@
14 #set $section = $sec_restrict
15 @PREPARE_TARGETS_FILE@
16 bcftools plugin @EXECUTABLE@
17
18 ## VCF input section
19 #set $section = $sec_restrict
20 @INCLUDE@
21 @EXCLUDE@
22 @REGIONS@
23 @TARGETS@
24
25 ## Primary Input/Outputs
26 @INPUT_FILE@ | tee counts_file.txt
27 && sed 's/^.* \([a-zA-Z]*\):[ ]*\([0-9]*\)$/\1 \2/' counts_file.txt | python $transform > "$output_file"
28 ]]>
29 </command>
30 <configfiles>
31 <configfile name="transform">
32 import sys
33 header = []
34 value = []
35 for line in sys.stdin:
36 h,v = line.strip().split()
37 header.append(h)
38 value.append(v)
39 print >> sys.stdout, '#%s\n' % '\t'.join(header)
40 print >> sys.stdout, '%s\n' % '\t'.join(value)
41 </configfile>
42 </configfiles>
43 <inputs>
44 <expand macro="macro_input" />
45 <section name="sec_restrict" expanded="false" title="Restrict to">
46 <expand macro="macro_regions" />
47 <expand macro="macro_targets" />
48 <expand macro="macro_include" />
49 <expand macro="macro_exclude" />
50 </section>
51 </inputs>
52 <outputs>
53 <data name="output_file" format="tabular"/>
54 </outputs>
55 <tests>
56 <test>
57 <param name="input_file" ftype="vcf" value="view.vcf" />
58 <output name="output_file">
59 <assert_contents>
60 <has_text text="SNPs"/>
61 <has_text text="11"/>
62 </assert_contents>
63 </output>
64 </test>
65 </tests>
66 <help><![CDATA[
67 =====================================
68 bcftools @EXECUTABLE@ plugin
69 =====================================
70
71 Counts number of samples, SNPs, INDELs, MNPs and total number of sites.
72
73 @REGIONS_HELP@
74 @TARGETS_HELP@
75 @EXPRESSIONS_HELP@
76
77
78
79 ]]></help>
80 <expand macro="citations" />
81 </tool>