diff delly.xml @ 31:a72576c51220 draft

Uploaded
author malbuquerque
date Tue, 20 Jan 2015 19:10:44 -0500
parents 226f241f0c92
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/delly.xml	Tue Jan 20 19:10:44 2015 -0500
@@ -0,0 +1,106 @@
+<tool id="delly" name="DELLY" version="0.6.1">
+
+	<description>structural variant discovery by integrated paired-end and split-read analysis</description>
+
+	<requirements>
+		<requirement type="package" version="0.6.1">delly</requirement>
+		<requirement type="set_environment">DELLY_DIR</requirement>
+	</requirements>
+
+
+	<command> 
+
+		<!-- BAM and BAI linking, (1) link BAM to new BAM file & (2) link BAM metadata to new BAI file -->
+		#for $i, $s in enumerate( $repeatBam )
+			ln -s $s.sortedBam ./input$(i).bam;
+			ln -s $s.sortedBam.metadata.bam_index ./input$(i).bam.bai;
+		#end for		
+
+		<!-- Sets args to a list of types selected -->
+		#if not isinstance( $type.value, list ):
+			#set $args = [ $type.value ]
+		#else:
+			#set $args = $type.value
+		#end if
+
+		<!-- Run Delly Jobs for each type selected -->
+		#for $option in $args
+			<!-- NEED TO FIX -->
+			<!-- Delly should be automatically installed into the galaxy instance and should not be running off 
+					 the computers specific tool set -->
+			\$DELLY_DIR/src/delly -t $option -o ./output.$(option).vcf -q $mapQual -s $madCutoff 
+			#if $option == "DEL" 
+			-m $minFlank 
+			#end if 
+			-u $genoQual -v $vcfgeno -g $genome
+			
+			<!-- add each input bam to command -->
+			#for $i, $s in enumerate( $repeatBam )
+				./input$(i).bam	
+			#end for
+			;
+  	#end for
+
+		<!-- Combine VCF Files and Sort Lexographically -->
+		#set $option = $args[0]
+		grep ^\# output.$(option).vcf > $outfile;
+		grep ^\# -v output.$(option).vcf > variants.txt;
+		
+		<!-- If we called more than a single variant type, concatenate all the other types variant output -->
+		#if isinstance( $type.value, list ):
+			#for $option in $args[1:]
+				grep ^\# -v output.$(option).vcf >> variants.txt;
+			#end for
+		#end if
+		
+		<!-- Sort all variant output, assuming that it will sort lexographically by chromosome, then position, ID  -->
+		<!-- In future, maybe develop a script to sort by bam header -->
+		sort -k1,1d -k2,2n -k3,3d variants.txt > sortedVariants.txt;
+		
+		<!-- Filter Variants that have Passed Quality Checks -->
+		#if $filterCalls
+			awk '{if ($7 == "PASS") print $0;}' sortedVariants.txt >> $outfile;
+		#else
+			cat sortedVariants.txt >> $outfile;
+		#end if
+		
+	</command>
+ 
+	<inputs>
+		
+		<!-- General Options -->
+		<param name="type" type="select" multiple="true" display="checkboxes" label="Variant Types">
+			<option value="DEL" selected="true">Deletions</option>
+			<option value="DUP" selected="true">Tandem Duplications</option>
+			<option value="INV" selected="true">Inversions</option>
+			<option value="TRA" selected="true">Translocations</option>
+		</param>
+		<repeat name="repeatBam" title="Bam Alignment" min="1" default="1" >	
+			<param format="bam" name="sortedBam" type="data" label="File" />		
+		</repeat>
+		<param name="excludeFile" type="data" optional="true" label="Chromosomes to Exclude"/> 
+		<param name="filterCalls" type="boolean" value="false" label="Filter Poor Variant Calls"/>
+		
+		<!-- Paired End Options -->
+		<param name="mapQual" type="integer" value="0" min="0" max="255" label="PE - Minimum Mapping Quality" />
+		<param name="madCutoff" type="integer" value="9" min="0" max="255" label="PE - Insert Size Cutoff" />		
+
+		<!-- SR Options -->
+		<param format="fasta" name="genome" type="data" optional="true" label="SR - Genome Fasta File" />
+		<param name="minFlank" type="integer" value="13" label="SR - Minimum Flanking Sequence" />
+
+		<!-- Genotyping Options -->
+		<param format="vcf" name="vcfgeno" type="data" optional="true" label="GT - Input VCF" />
+		<param name="genoQual" type="integer" value="20" min="0" max="255" label="GT - Minimum Mapping Quality" />
+
+	</inputs>
+  
+	<outputs>
+		<data format="vcf" name="outfile" />
+	</outputs>
+  
+	<help>
+
+	</help>
+
+</tool>