comparison delly.xml @ 0:e3b753e2ee24 draft default tip

planemo upload for repository https://github.com/morinlab/tools-morinlab/tree/master/tools/delly commit 4ef2d91b7c1686a2696b92fe538d4aec51d05e40-dirty
author morinlab
date Tue, 11 Oct 2016 14:20:05 -0400
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:e3b753e2ee24
1 <tool id="delly" name="DELLY" version="0.6.1">
2
3 <description>structural variant discovery by integrated paired-end and split-read analysis</description>
4
5 <macros>
6 <import>citations.xml</import>
7 </macros>
8
9 <requirements>
10 <requirement type="package" version="1.55.0">boost</requirement>
11 <requirement type="package" version="0.6.1">delly</requirement>
12 <requirement type="set_environment">DELLY_DIR</requirement>
13 <requirement type="set_environment">BOOST_ROOT_DIR"</requirement>
14 <requirement type="set_environment">LD_LIBRARY_PATH"</requirement>
15 <requirement type="set_environment">LIBRARY_PATH"</requirement>
16 <requirement type="set_environment">CPLUS_INCLUDE_PATH"</requirement>
17 <requirement type="set_environment">C_INCLUDE_PATH"</requirement>
18 </requirements>
19
20 <command detect_errors="aggressive">
21
22 <!-- BAM and BAI linking, (1) link BAM to new BAM file & (2) link BAM metadata to new BAI file -->
23 #for $i, $s in enumerate( $repeatBam )
24 ln -s $s.sortedBam ./input$(i).bam;
25 ln -s $s.sortedBam.metadata.bam_index ./input$(i).bam.bai;
26 #end for
27
28 <!-- Sets args to a list of types selected -->
29 #if not isinstance( $variant_source_selector_param.value, list ):
30 #set $args = [ $variant_source_selector_param.value ]
31 #else:
32 #set $args = $variant_source_selector_param.value
33 #end if
34
35 <!-- Run Delly Jobs for each type selected -->
36 #for $option in $args
37 \$DELLY_DIR/src/delly
38 -t $option
39 -o ./output.$(option).vcf
40 -q $advancedsettings.mapQual
41 -s $advancedsettings.madCutoff
42
43 #if $option == "DEL":
44 -m $advancedsettings.minFlank
45 #end if
46
47 -u $advancedsettings.genoQual
48
49 #if $advancedsettings.vcfgeno
50 -v $advancedsettings.vcfgeno
51 #end if
52
53 #if $reference_source.reference_source_selector_param == "cached":
54 -g "${reference_source.reference.fields.path}"
55 #else:
56 -g $reference_source.reference
57 #end if
58
59 <!-- add each input bam to command -->
60 #for $i, $s in enumerate( $repeatBam ):
61 ./input$(i).bam
62 #end for
63 ;
64 #end for
65
66 <!-- Combine VCF Files and Sort Lexographically -->
67 #set $option = $args[0]
68 grep ^\# output.$(option).vcf > $outfile;
69 grep ^\# -v output.$(option).vcf > variants.txt;
70
71 <!-- If we called more than a single variant type, concatenate all the other types variant output -->
72 #if isinstance( $variant_source_selector_param.value, list ):
73 #for $option in $args[1:]
74 grep ^\# -v output.$(option).vcf >> variants.txt;
75 #end for
76 #end if
77
78 <!-- Sort all variant output, assuming that it will sort lexographically by chromosome, then position, ID -->
79 <!-- In future, maybe develop a script to sort by bam header -->
80 sort -k1,1d -k2,2n -k3,3d variants.txt > sortedVariants.txt;
81
82 <!-- Filter Variants that have Passed Quality Checks -->
83 #if $filterCalls
84 awk '{if ($7 == "PASS") print $0;}' sortedVariants.txt >> $outfile;
85 #else
86 cat sortedVariants.txt >> $outfile;
87 #end if
88
89 </command>
90
91 <inputs>
92
93 <!-- REFERENCE OPTIONS -->
94 <conditional name="reference_source">
95 <param type="select" name="reference_source_selector_param" label="Choose the source for the reference genome">
96 <option value="cached" selected="True">Use a built-in genome</option>
97 <option value="history">Use a genome from the history</option>
98 </param>
99 <when value="cached">
100 <param type="select" name="reference" label="Genome">
101 <options from_data_table="all_fasta"/>
102 </param>
103 </when>
104 <when value="history">
105 <param type="data" format="fasta" name="reference" label="Genome"/>
106 </when>
107 </conditional>
108
109 <!-- VARIANT OPTIONS -->
110 <param type="select" multiple="True" name="variant_source_selector_param" label="Select variants to identify in samples">
111 <option value="DEL" selected="true">Deletions</option>
112 <option value="DUP">Duplications</option>
113 <option value="INV">Inversions</option>
114 <option value="TRA">Translocations</option>
115 </param>
116 <!--
117 <param name="interval_file" type="data" format="txt" optional="true" label="Interval file" help="Created by make parallel, only use when parallelism is turned on, note interchromosomal and intrachromosomal events have different interval files"/>
118 -->
119 <repeat name="repeatBam" title="Bam Alignment" min="1" default="1" >
120 <param format="bam" name="sortedBam" type="data" label="File" />
121 </repeat>
122 <!-- <param name="excludeFile" type="data" format="bed" optional="true" label="Chromosomes to Exclude"/> -->
123 <param name="filterCalls" type="boolean" value="false" label="Filter Poor Variant Calls"/>
124
125 <section name="advancedsettings" title="Advanced Settings" expanded="false">
126 <!-- Paired End Options -->
127 <param name="mapQual" type="integer" value="0" min="0" max="255" label="PE - Minimum Mapping Quality" />
128 <param name="madCutoff" type="integer" value="9" min="0" max="255" label="PE - Insert Size Cutoff" />
129
130 <!-- SR Options -->
131 <param name="minFlank" type="integer" value="13" label="SR - Minimum Flanking Sequence" />
132
133 <!-- Genotyping Options -->
134 <param format="vcf" name="vcfgeno" type="data" optional="true" label="GT - Input VCF" />
135 <param name="genoQual" type="integer" value="20" min="0" max="255" label="GT - Minimum Mapping Quality" />
136 </section>
137 </inputs>
138
139 <outputs>
140 <data format="vcf" name="outfile" />
141 </outputs>
142
143 <citations>
144 <expand macro="morinlab_citation"/>
145 <expand macro="galaxy_citation"/>
146 <expand macro="delly_citation"/>
147 </citations>
148
149 </tool>