Mercurial > repos > malbuquerque > delly
changeset 0:ace1798624b4 draft
Uploaded
author | malbuquerque |
---|---|
date | Tue, 20 Jan 2015 14:16:43 -0500 |
parents | |
children | 5f241f2398c3 |
files | package/delly.xml package/tool_dependencies.xml |
diffstat | 2 files changed, 139 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/package/delly.xml Tue Jan 20 14:16:43 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>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/package/tool_dependencies.xml Tue Jan 20 14:16:43 2015 -0500 @@ -0,0 +1,33 @@ +<?xml version="1.0"?> +<tool_dependency> + + <package name="boost" version="1.53"> + <repository changeset_revision="cee17eb9de41" name="package_boost_1_53" owner="iuc" toolshed="https://toolshed.g2.bx.psu.edu" /> + </package> + + <package name="bamtools" version="2.3.0"> + <repository changeset_revision="ad46b5210186" name="package_bamtools_2_3_0" owner="malbuquerque" toolshed="https://toolshed.g2.bx.psu.edu" /> + </package> + + <package name="seqtk" version="1.0.0"> + <repository changeset_revision="35f0f4568ded" name="package_seqtk_1_0_0" owner="malbuquerque" toolshed="https://toolshed.g2.bx.psu.edu" /> + </package> + + <package name="delly" version="0.6.1"> + <install version="1.0.0"> + <actions> + <action type="download_by_url">https://github.com/tobiasrausch/delly/archive/v0.6.1.tar.gz</action> + <action type="download_by_url">https://github.com/morinlab/galaxy_tools/delly/Makefile</action> + <action type="shell_command">make all BOOST_ROOT=\$BOOST_ROOT BAMTOOLS_ROOT=\$BAMTOOLS_ROOT SEQTK_ROOT=\$SEQTK_ROOT</action> + <action type="move_directory_files"> + <source_directory>.</source_directory> + <destination_directory>$INSTALL_DIR</destination_directory> + </action> + <action type="set_environment"> + <environment_variable action="set_to" name="DELLY_DIR">$INSTALL_DIR</environment_variable> + </action> + </actions> + </install> + </package> + + </tool_dependency>