annotate delly.xml @ 23:f68202f023b3 draft

Uploaded
author malbuquerque
date Tue, 20 Jan 2015 18:23:56 -0500
parents 226f241f0c92
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7
226f241f0c92 Uploaded
malbuquerque
parents:
diff changeset
1 <tool id="delly" name="DELLY" version="0.6.1">
226f241f0c92 Uploaded
malbuquerque
parents:
diff changeset
2
226f241f0c92 Uploaded
malbuquerque
parents:
diff changeset
3 <description>structural variant discovery by integrated paired-end and split-read analysis</description>
226f241f0c92 Uploaded
malbuquerque
parents:
diff changeset
4
226f241f0c92 Uploaded
malbuquerque
parents:
diff changeset
5 <requirements>
226f241f0c92 Uploaded
malbuquerque
parents:
diff changeset
6 <requirement type="package" version="0.6.1">delly</requirement>
226f241f0c92 Uploaded
malbuquerque
parents:
diff changeset
7 <requirement type="set_environment">DELLY_DIR</requirement>
226f241f0c92 Uploaded
malbuquerque
parents:
diff changeset
8 </requirements>
226f241f0c92 Uploaded
malbuquerque
parents:
diff changeset
9
226f241f0c92 Uploaded
malbuquerque
parents:
diff changeset
10
226f241f0c92 Uploaded
malbuquerque
parents:
diff changeset
11 <command>
226f241f0c92 Uploaded
malbuquerque
parents:
diff changeset
12
226f241f0c92 Uploaded
malbuquerque
parents:
diff changeset
13 <!-- BAM and BAI linking, (1) link BAM to new BAM file & (2) link BAM metadata to new BAI file -->
226f241f0c92 Uploaded
malbuquerque
parents:
diff changeset
14 #for $i, $s in enumerate( $repeatBam )
226f241f0c92 Uploaded
malbuquerque
parents:
diff changeset
15 ln -s $s.sortedBam ./input$(i).bam;
226f241f0c92 Uploaded
malbuquerque
parents:
diff changeset
16 ln -s $s.sortedBam.metadata.bam_index ./input$(i).bam.bai;
226f241f0c92 Uploaded
malbuquerque
parents:
diff changeset
17 #end for
226f241f0c92 Uploaded
malbuquerque
parents:
diff changeset
18
226f241f0c92 Uploaded
malbuquerque
parents:
diff changeset
19 <!-- Sets args to a list of types selected -->
226f241f0c92 Uploaded
malbuquerque
parents:
diff changeset
20 #if not isinstance( $type.value, list ):
226f241f0c92 Uploaded
malbuquerque
parents:
diff changeset
21 #set $args = [ $type.value ]
226f241f0c92 Uploaded
malbuquerque
parents:
diff changeset
22 #else:
226f241f0c92 Uploaded
malbuquerque
parents:
diff changeset
23 #set $args = $type.value
226f241f0c92 Uploaded
malbuquerque
parents:
diff changeset
24 #end if
226f241f0c92 Uploaded
malbuquerque
parents:
diff changeset
25
226f241f0c92 Uploaded
malbuquerque
parents:
diff changeset
26 <!-- Run Delly Jobs for each type selected -->
226f241f0c92 Uploaded
malbuquerque
parents:
diff changeset
27 #for $option in $args
226f241f0c92 Uploaded
malbuquerque
parents:
diff changeset
28 <!-- NEED TO FIX -->
226f241f0c92 Uploaded
malbuquerque
parents:
diff changeset
29 <!-- Delly should be automatically installed into the galaxy instance and should not be running off
226f241f0c92 Uploaded
malbuquerque
parents:
diff changeset
30 the computers specific tool set -->
226f241f0c92 Uploaded
malbuquerque
parents:
diff changeset
31 \$DELLY_DIR/src/delly -t $option -o ./output.$(option).vcf -q $mapQual -s $madCutoff
226f241f0c92 Uploaded
malbuquerque
parents:
diff changeset
32 #if $option == "DEL"
226f241f0c92 Uploaded
malbuquerque
parents:
diff changeset
33 -m $minFlank
226f241f0c92 Uploaded
malbuquerque
parents:
diff changeset
34 #end if
226f241f0c92 Uploaded
malbuquerque
parents:
diff changeset
35 -u $genoQual -v $vcfgeno -g $genome
226f241f0c92 Uploaded
malbuquerque
parents:
diff changeset
36
226f241f0c92 Uploaded
malbuquerque
parents:
diff changeset
37 <!-- add each input bam to command -->
226f241f0c92 Uploaded
malbuquerque
parents:
diff changeset
38 #for $i, $s in enumerate( $repeatBam )
226f241f0c92 Uploaded
malbuquerque
parents:
diff changeset
39 ./input$(i).bam
226f241f0c92 Uploaded
malbuquerque
parents:
diff changeset
40 #end for
226f241f0c92 Uploaded
malbuquerque
parents:
diff changeset
41 ;
226f241f0c92 Uploaded
malbuquerque
parents:
diff changeset
42 #end for
226f241f0c92 Uploaded
malbuquerque
parents:
diff changeset
43
226f241f0c92 Uploaded
malbuquerque
parents:
diff changeset
44 <!-- Combine VCF Files and Sort Lexographically -->
226f241f0c92 Uploaded
malbuquerque
parents:
diff changeset
45 #set $option = $args[0]
226f241f0c92 Uploaded
malbuquerque
parents:
diff changeset
46 grep ^\# output.$(option).vcf > $outfile;
226f241f0c92 Uploaded
malbuquerque
parents:
diff changeset
47 grep ^\# -v output.$(option).vcf > variants.txt;
226f241f0c92 Uploaded
malbuquerque
parents:
diff changeset
48
226f241f0c92 Uploaded
malbuquerque
parents:
diff changeset
49 <!-- If we called more than a single variant type, concatenate all the other types variant output -->
226f241f0c92 Uploaded
malbuquerque
parents:
diff changeset
50 #if isinstance( $type.value, list ):
226f241f0c92 Uploaded
malbuquerque
parents:
diff changeset
51 #for $option in $args[1:]
226f241f0c92 Uploaded
malbuquerque
parents:
diff changeset
52 grep ^\# -v output.$(option).vcf >> variants.txt;
226f241f0c92 Uploaded
malbuquerque
parents:
diff changeset
53 #end for
226f241f0c92 Uploaded
malbuquerque
parents:
diff changeset
54 #end if
226f241f0c92 Uploaded
malbuquerque
parents:
diff changeset
55
226f241f0c92 Uploaded
malbuquerque
parents:
diff changeset
56 <!-- Sort all variant output, assuming that it will sort lexographically by chromosome, then position, ID -->
226f241f0c92 Uploaded
malbuquerque
parents:
diff changeset
57 <!-- In future, maybe develop a script to sort by bam header -->
226f241f0c92 Uploaded
malbuquerque
parents:
diff changeset
58 sort -k1,1d -k2,2n -k3,3d variants.txt > sortedVariants.txt;
226f241f0c92 Uploaded
malbuquerque
parents:
diff changeset
59
226f241f0c92 Uploaded
malbuquerque
parents:
diff changeset
60 <!-- Filter Variants that have Passed Quality Checks -->
226f241f0c92 Uploaded
malbuquerque
parents:
diff changeset
61 #if $filterCalls
226f241f0c92 Uploaded
malbuquerque
parents:
diff changeset
62 awk '{if ($7 == "PASS") print $0;}' sortedVariants.txt >> $outfile;
226f241f0c92 Uploaded
malbuquerque
parents:
diff changeset
63 #else
226f241f0c92 Uploaded
malbuquerque
parents:
diff changeset
64 cat sortedVariants.txt >> $outfile;
226f241f0c92 Uploaded
malbuquerque
parents:
diff changeset
65 #end if
226f241f0c92 Uploaded
malbuquerque
parents:
diff changeset
66
226f241f0c92 Uploaded
malbuquerque
parents:
diff changeset
67 </command>
226f241f0c92 Uploaded
malbuquerque
parents:
diff changeset
68
226f241f0c92 Uploaded
malbuquerque
parents:
diff changeset
69 <inputs>
226f241f0c92 Uploaded
malbuquerque
parents:
diff changeset
70
226f241f0c92 Uploaded
malbuquerque
parents:
diff changeset
71 <!-- General Options -->
226f241f0c92 Uploaded
malbuquerque
parents:
diff changeset
72 <param name="type" type="select" multiple="true" display="checkboxes" label="Variant Types">
226f241f0c92 Uploaded
malbuquerque
parents:
diff changeset
73 <option value="DEL" selected="true">Deletions</option>
226f241f0c92 Uploaded
malbuquerque
parents:
diff changeset
74 <option value="DUP" selected="true">Tandem Duplications</option>
226f241f0c92 Uploaded
malbuquerque
parents:
diff changeset
75 <option value="INV" selected="true">Inversions</option>
226f241f0c92 Uploaded
malbuquerque
parents:
diff changeset
76 <option value="TRA" selected="true">Translocations</option>
226f241f0c92 Uploaded
malbuquerque
parents:
diff changeset
77 </param>
226f241f0c92 Uploaded
malbuquerque
parents:
diff changeset
78 <repeat name="repeatBam" title="Bam Alignment" min="1" default="1" >
226f241f0c92 Uploaded
malbuquerque
parents:
diff changeset
79 <param format="bam" name="sortedBam" type="data" label="File" />
226f241f0c92 Uploaded
malbuquerque
parents:
diff changeset
80 </repeat>
226f241f0c92 Uploaded
malbuquerque
parents:
diff changeset
81 <param name="excludeFile" type="data" optional="true" label="Chromosomes to Exclude"/>
226f241f0c92 Uploaded
malbuquerque
parents:
diff changeset
82 <param name="filterCalls" type="boolean" value="false" label="Filter Poor Variant Calls"/>
226f241f0c92 Uploaded
malbuquerque
parents:
diff changeset
83
226f241f0c92 Uploaded
malbuquerque
parents:
diff changeset
84 <!-- Paired End Options -->
226f241f0c92 Uploaded
malbuquerque
parents:
diff changeset
85 <param name="mapQual" type="integer" value="0" min="0" max="255" label="PE - Minimum Mapping Quality" />
226f241f0c92 Uploaded
malbuquerque
parents:
diff changeset
86 <param name="madCutoff" type="integer" value="9" min="0" max="255" label="PE - Insert Size Cutoff" />
226f241f0c92 Uploaded
malbuquerque
parents:
diff changeset
87
226f241f0c92 Uploaded
malbuquerque
parents:
diff changeset
88 <!-- SR Options -->
226f241f0c92 Uploaded
malbuquerque
parents:
diff changeset
89 <param format="fasta" name="genome" type="data" optional="true" label="SR - Genome Fasta File" />
226f241f0c92 Uploaded
malbuquerque
parents:
diff changeset
90 <param name="minFlank" type="integer" value="13" label="SR - Minimum Flanking Sequence" />
226f241f0c92 Uploaded
malbuquerque
parents:
diff changeset
91
226f241f0c92 Uploaded
malbuquerque
parents:
diff changeset
92 <!-- Genotyping Options -->
226f241f0c92 Uploaded
malbuquerque
parents:
diff changeset
93 <param format="vcf" name="vcfgeno" type="data" optional="true" label="GT - Input VCF" />
226f241f0c92 Uploaded
malbuquerque
parents:
diff changeset
94 <param name="genoQual" type="integer" value="20" min="0" max="255" label="GT - Minimum Mapping Quality" />
226f241f0c92 Uploaded
malbuquerque
parents:
diff changeset
95
226f241f0c92 Uploaded
malbuquerque
parents:
diff changeset
96 </inputs>
226f241f0c92 Uploaded
malbuquerque
parents:
diff changeset
97
226f241f0c92 Uploaded
malbuquerque
parents:
diff changeset
98 <outputs>
226f241f0c92 Uploaded
malbuquerque
parents:
diff changeset
99 <data format="vcf" name="outfile" />
226f241f0c92 Uploaded
malbuquerque
parents:
diff changeset
100 </outputs>
226f241f0c92 Uploaded
malbuquerque
parents:
diff changeset
101
226f241f0c92 Uploaded
malbuquerque
parents:
diff changeset
102 <help>
226f241f0c92 Uploaded
malbuquerque
parents:
diff changeset
103
226f241f0c92 Uploaded
malbuquerque
parents:
diff changeset
104 </help>
226f241f0c92 Uploaded
malbuquerque
parents:
diff changeset
105
226f241f0c92 Uploaded
malbuquerque
parents:
diff changeset
106 </tool>