changeset 1:94dbee11c8a9 draft

Uploaded
author simon-gladman
date Tue, 05 Feb 2013 19:19:15 -0500
parents b559512bebcc
children 28d2dd0f048b
files velvet_optimiser_vlsci.xml
diffstat 1 files changed, 300 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/velvet_optimiser_vlsci.xml	Tue Feb 05 19:19:15 2013 -0500
@@ -0,0 +1,300 @@
+<tool id="velvetoptimiser_vlsci" name="Velvet Optimiser vlsci" version="1.0.0">
+	<description>Automatically optimise a de-novo assembly using Velvet.</description>
+    
+	
+	<command interpreter="perl">
+		velvet_optimiser_wrapper_vlsci.pl
+            '$start_kmer'
+            '$end_kmer'
+            '$kmer_step'
+
+            #for i in $inputs:
+                '$i.__index__'
+                '${i.filetype}'
+                '${i.is_separate.separate}'
+                '${i.is_separate.forwards_file.datatype}'
+                '${i.is_separate.forwards_file}'
+                #if $i.is_separate.separate:
+                    '${i.is_separate.reverse_file}'
+                #end if
+                '${i.shortMP}'
+            #end for
+            
+            'other:'
+            '$amosfile'
+            '$verbose'
+            
+            #if $advanced.is_advanced:
+                'advanced:'
+                '$advanced.optFuncKmer'
+                '$advanced.optFuncCov'
+                '$advanced.velvetg_opts'
+                '$advanced.minCovCutoff'
+                '$advanced.maxCovCutoff'
+            #end if
+            
+            '$contigs'
+            '$stats'
+            #if $amosfile:
+                '$afgfile'
+            #end if
+            '$logfile'
+            '$dummyout'
+            '$lastgraph'
+            
+            > $dummyout2
+	</command>
+	
+	<inputs>
+		##The k-mer search range setting section.
+		<param name="start_kmer" type="integer" label="Start k-mer value" value="19" help="Odd integer. Lower limit of k-mer size range to search for optimum value"/>
+		<param name="end_kmer" type="integer" label="End k-mer value" value="191" help="Odd integer. Upper limit of k-mer size range to search for optimum value"/>
+		<param name="kmer_step" type="integer" label="k-mer search step size" value="2" help="Step size kmer search over the above range. Must be even."/>
+		
+		##Read files section. No need for zipped or auto format options as the data is already sucked in in a legible format...
+		<repeat name="inputs" title="Input read libraries">
+			
+			<param name="filetype" type="select" label="File type">
+				<option value="short" selected="yes">short</option>
+				<option value="shortPaired">shortPaired</option>
+				<option value="long">long</option>
+				<option value="longPaired">longPaired</option>
+				<option value="reference">reference</option>
+			</param>
+			
+			<conditional name="is_separate">
+				<param name="separate" type="boolean" checked="false" truevalue="-separate" falsevalue="" label="Are the reads paired and in two different files?" help="Tick this box if this is a paired library with forward and reverse read files.."/>
+				<when value="">
+					<param name="forwards_file" type="data" format="fasta,fastq,raw,sam,bam" label="Read dataset"/>
+				</when>
+				<when value="-separate">
+					<param name="forwards_file" type="data" format="fasta,fastq,raw,sam,bam" label="Read dataset for direction 1"/>
+					<param name="reverse_file" type="data" format="fasta,fastq,raw,sam,bam" label="Read dataset for direction 2"/>
+				</when>
+			</conditional>
+			
+			<param name="shortMP" type="boolean" checked="false" truevalue="shortMP_lib" falsevalue="not_shortMP" label="Library is short mate paired." help="Select if read set is from an Illumina mate pair library"/>
+		
+		</repeat>
+		
+		##The other options section (amos file, verbose output capture)
+		<param name="amosfile" type="boolean" checked="false" truevalue="amos" falsevalue="no_amos" label="Produce the amos output file?"/>
+		<param name="verbose" type="boolean" checked="false" truevalue="verbose" falsevalue="not_verbose" label="Capture verbose velvet output in log file?"/>
+				
+		##Advanced parameter setting section (optFuncs, other velvetg options, min cov cutoff, max cov cutoff ratio)
+		<conditional name="advanced">
+            <param name="is_advanced" type="boolean" checked="false" truevalue="yes" falsevalue="no" label="Set advanced parameters?"/>
+            <when value="yes">
+                <param name="optFuncKmer" type="text" value="n50" label="K-mer optimisation function" help="See help below for possibilities!"/>
+                <param name="optFuncCov" type="text" value="Lbp" label="Coverage cutoff optimisation function" help="See help below for possibilities!"/>
+                <param name="velvetg_opts" type="text" value="" label="Other velvetg options" help="Add any other required velvetg options from the advanced set"/>
+                <param name="minCovCutoff" type="integer" value="0" label="Minimum coverage cutoff" help="The minimum coverage cutoff to consider in the optimisation"/>
+                <param name="maxCovCutoff" type="float" value="0.8" label="Maximum coverage cutoff" help="The maximum coverage cutoff to consider expressed as a fraction of the calculated expected coverage."/>
+            </when>
+            <when value="no">
+            
+            </when>
+        </conditional>
+		
+	
+	</inputs>
+	
+	<outputs>
+        <data name="dummyout" format="tabular" label="${tool.name} on ${on_string}: STDERR" hidden="True"/>
+        <data name="dummyout2" format="tabular" label="${tool.name} on ${on_string}: dummyout" hidden="True"/>
+        <data name="contigs" format="fasta" label="${tool.name} on ${on_string}: Contigs"/>
+        <data name="afgfile" format="afg" label="${tool.name} on ${on_string}: Assembly afg file">
+            <filter>(amosfile)</filter>
+        </data>
+        <data name="stats" format="tabular" label="${tool.name} on ${on_string}: Contig stats"/>
+        <data name="logfile" format="tabular" label="${tool.name} on ${on_string}: VelvetOptimiser Logfile"/>
+        <data name="lastgraph" format="text" label="${tool.name} on ${on_string}: VelvetOptimiser LastGraph" hidden="True"/>
+	</outputs>
+    
+    <requirments>
+        <requirement type="binary">velveth</requirement>
+        <requirement type="binary">velvetg</requirement>
+        <requirement type="binary">VelvetOptimiser.pl</requirement>
+    </requirments>
+    
+    <tests>
+        <test>
+            <param name="start_kmer" value="21"/>
+            <param name="end_kmer" value="29"/>
+            <param name="${inputs.is_separate.separate}" value="false"/>
+            <param name="${inputs.is_separate.forwards_file}" value="vopt_test_reads.dat" ftype="fasta"/>
+            <output name="contigs" file="vopt_test_contigs.dat"/>
+        </test>
+    </tests>
+
+	<help>
+**Velvet Optimiser Overview**
+
+Velvet_ is a de novo genomic assembler specially designed for short read sequencing technologies, such as Solexa or 454, developed by Daniel Zerbino and Ewan Birney at the European Bioinformatics Institute (EMBL-EBI), near Cambridge, in the United Kingdom.
+
+Velvet currently takes in short read sequences, removes errors then produces high quality unique contigs. It then uses paired-end read and long read information, when available, to retrieve the repeated areas between contigs.
+
+Read the Velvet `documentation`__ for details on using the Vevlet Assembler.
+
+.. _Velvet: http://www.ebi.ac.uk/~zerbino/velvet/
+
+.. __: http://www.ebi.ac.uk/~zerbino/velvet/Manual.pdf
+
+------
+
+**VelvetOptimiser**
+
+VelvetOptimiser_ was written by Simon Gladman of CSIRO/Monash University.
+
+VelvetOptimiser performs a number of velveth and velvetg steps to try and optimise an assembly based on the metrics provided below. 
+
+.. _VelvetOptimiser: http://bioinformatics.net.au/software.shtml
+
+------
+
+**Velvet Optimiser VLSCI**
+
+Galaxy tool wrapper for newer versions (2.5.5) of Velvet Optimiser. Written by Simon Gladman of VBC/VLSCI.
+
+Written for use on the Genomics Virtual Laboratory.
+
+------
+
+**Outputs**
+
+
+**Contigs**
+
+The *contigs.fa* file.
+This fasta file contains the sequences of the contigs longer than 2k, where k is the word-length used in velveth. If you have specified a min contig lgth threshold, then the contigs shorter than that value are omitted.
+Note that the length and coverage information provided in the header of each contig should therefore be understood in k-mers and in k-mer coverage (cf. 5.1) respectively.
+The N's in the sequence correspond to gaps between scaffolded contigs. The number of N's corresponds to the estimated length of the gap. For reasons of compatibility with the archives, any gap shorter than 10bp is represented by a sequence of 10 N's.
+
+**Stats**
+
+The *stats.txt* file.
+This file is a simple tabbed-delimited description of the nodes. The column names are pretty much self-explanatory. Note however that node lengths are given in k-mers. To obtain the length in nucleotides of each node you simply need to add k - 1, where k is the word-length used in velveth.
+The in and out columns correspond to the number of arcs on the 5' and 3' ends of the contig respectively.
+The coverages in columns short1 cov, short1 Ocov, short2 cov, and short2 Ocov are provided in k-mer coverage (5.1).
+Also, the difference between # cov and # Ocov is the way these values are computed. In the first count, slightly divergent sequences are added to the coverage tally. However, in the second, stricter count, only the sequences which map perfectly onto the consensus sequence are taken into account.
+
+**LastGraph**
+
+The *LastGraph* file.
+This file describes in its entirety the graph produced by Velvet.
+
+**AMOS.afg**
+
+The *velvet_asm.afg* file.
+This file is mainly designed to be read by the open-source AMOS genome assembly package. Nonetheless, a number of programs are available to transform this kind of file into other assembly file formats (namely ACE, TIGR, Arachne and Celera). See http://amos.sourceforge.net/ for more information.
+The file describes all the contigs contained in the contigs.fa file (cf 4.2.1).
+
+**Logfile**
+
+The Velvet Optimiser's logfile
+
+**STDERR**
+
+The Standard Error output of the Optimiser for error messages etc.
+
+**Dummyout**
+
+The workings of the perl script intermediary between galaxy and the optimiser. DEBUG information while testing. Will be removed from final version.
+
+**Advanced options**
+        
+Other Velvetg Options                   : Extra velvetg options to pass through.  eg. -long_mult_cutoff -max_coverage etc (default '') See below for details.
+
+Minimum coverage cutoff                 : The minimum cov_cutoff to be used. (default '0').
+
+Maximum coverage cutoff                 : The maximum coverage cutoff to consider as a multiplier of the expected coverage. (default '0.8').
+
+K-mer optimisation function             : The optimisation function used for k-mer choice. (default 'n50').
+
+Coverage cutoff optimisation function   : The optimisation function used for cov_cutoff optimisation. (default 'Lbp').
+            
+Velvet optimiser assembly optimisation function can be built from the following variables.
+
+LNbp = The total number of Ns in large contigs
+
+Lbp = The total number of base pairs in large contigs
+
+Lcon = The number of large contigs
+
+max = The length of the longest contig
+
+n50 = The n50
+
+ncon = The total number of contigs
+
+tbp = The total number of basepairs in contigs
+
+Examples are:
+
+'Lbp' = Just the total basepairs in contigs longer than 1kb
+
+'n50*Lcon' = The n50 times the number of long contigs.
+
+'n50*Lcon/tbp+log(Lbp)' = The n50 times the number of long contigs divided by the total bases in all contigs plus the log of the number of bases in long contigs (as an example only.)
+
+**Hash Length**
+
+The hash length, also known as k-mer length, corresponds to the length, in base pairs, of the words being hashed. 
+
+The hash length is the length of the k-mers being entered in the hash table. Firstly, you must observe three technical constraints::
+
+# it must be an odd number, to avoid palindromes. If you put in an even number, Velvet will just decrement it and proceed.
+# it must be below or equal to MAXKMERHASH length (cf. 2.3.3, by default 31bp), because it is stored on 64 bits
+# it must be strictly inferior to read length, otherwise you simply will not observe any overlaps between reads, for obvious reasons.
+
+Now you still have quite a lot of possibilities. As is often the case, it's a trade- off between specificity and sensitivity. Longer kmers bring you more specificity (i.e. less spurious overlaps) but lowers coverage (cf. below). . . so there's a sweet spot to be found with time and experience.
+We like to think in terms of "k-mer coverage", i.e. how many times has a k-mer been seen among the reads. The relation between k-mer coverage Ck and standard (nucleotide-wise) coverage C is Ck = C # (L - k + 1)/L where k is your hash length, and L you read length.
+Experience shows that this kmer coverage should be above 10 to start getting decent results. If Ck is above 20, you might be "wasting" coverage. Experience also shows that empirical tests with different values for k are not that costly to run! VelvetOptimiser automates these tests for you.
+
+
+**Velvetg options**
+
+-scaffolding yes|no		        : scaffolding of contigs used paired end information (default: on)
+
+-max_branch_length integer	    : maximum length in base pair of bubble (default: 100)
+
+max_divergence floating-point  : maximum divergence rate between two branches in a bubble (default: 0.2)
+
+-max_gap_count integer	        : maximum number of gaps allowed in the alignment of the two branches of a bubble (default: 3)
+
+-min_pair_count integer 	    : minimum number of paired end connections to justify the scaffolding of two long contigs (default: 5)
+
+-max_coverage floating point	: removal of high coverage nodes AFTER tour bus (default: no removal)
+
+-coverage_mask integer	        : minimum coverage required for confident regions of contigs (default: 1)
+
+-long_mult_cutoff integer	    : minimum number of long reads required to merge contigs (default: 2)
+
+-paired_exp_fraction double 	: remove all the paired end connections which less than the specified fraction of the expected count (default: 0.1)
+
+-conserveLong yes|no    	    : preserve sequences with long reads in them (default no)
+
+
+**Input Files**
+
+Velvet works mainly with fasta and fastq formats. For paired-end reads, the assumption is that each read is next to its mate
+read. In other words, if the reads are indexed from 0, then reads 0 and 1 are paired, 2 and 3, 4 and 5, etc.
+
+Supported file formats are::
+
+    fasta
+    fastq
+    raw
+    sam
+    bam
+  
+Read categories are::
+
+    short (default)
+    shortPaired
+    long (for Sanger, 454 or even reference sequences)
+    longPaired
+    reference (for pre-mapped sam or bam files - see Velvet manual for details on how to use this option)
+	
+	</help>
+</tool>