Previous changeset 18:702ac01fbef8 (2013-03-18) Next changeset 20:83e3813084f2 (2013-05-21) |
Commit message:
Updated tool definition for Flexbar 2.33 release |
added:
flexbar.pl flexbar.xml |
b |
diff -r 702ac01fbef8 -r 621fa3daa2a1 flexbar.pl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/flexbar.pl Mon Mar 18 18:18:28 2013 +0100 |
[ |
@@ -0,0 +1,34 @@ +#!/usr/bin/env perl + +# Flexbar wrapper for Galaxy tool definition, version 2.33 +# Author: Johannes Roehr + +use warnings; +use strict; + +my ($outFile, $id, $folder, $format) = @ARGV[($#ARGV - 3) .. $#ARGV]; + +my $call = join " ", @ARGV[0..($#ARGV - 4)]; + +system $call .' --target FlexbarTargetFile > '. $outFile and exit 1; + + +foreach(<FlexbarTargetFile*>){ + + my $fileType; + + $fileType = $1 if /\.(\w+)$/; + $fileType = $format if /\.\w*fast\w$/; + $fileType = 'fasta' if /\.fasta$/; + $fileType = 'tabular' if $fileType eq 'lengthdist'; + + my $file = $_; + + s/_//g; + + my $name = "primary_". $id ."_". $_ ."_visible_". $fileType; + + rename $file, $name; + rename $name, $folder; +} + |
b |
diff -r 702ac01fbef8 -r 621fa3daa2a1 flexbar.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/flexbar.xml Mon Mar 18 18:18:28 2013 +0100 |
b |
b'@@ -0,0 +1,423 @@\n+\n+<!-- Flexbar tool definition for Galaxy, version 2.33 -->\n+<!-- Author: Johannes Roehr -->\n+\n+<tool id="flexbar" name="Flexbar" version="2.33" force_history_refresh="True">\n+\n+\t<description>flexible barcode and adapter removal</description>\n+ \n+\t<requirements>\n+ <requirement type="binary" version="2.33">flexbar</requirement>\n+ </requirements>\n+\t\n+\t<version_command>flexbar --version</version_command>\n+\t\n+\t<command interpreter="perl">\n+\t\t\n+\t\tflexbar.pl flexbar\n+\t\t\n+\t\t--threads $threads\n+\t\t\n+\t\t--reads $reads\n+\t\t\n+\t\t#if $cReads2.select == "on":\n+\t\t\t#if $cReads2.reads2.ext == $reads.ext:\n+\t\t\t\t--reads2 $cReads2.reads2\n+\t\t\t#end if\n+\t\t#end if\n+\t\t\n+\t\t\n+\t\t#if $reads.ext == "fasta":\n+\t\t\t--format fasta\n+\t\t#end if\n+\t\t#if $reads.ext == "fastq":\n+\t\t\t--format fastq\n+\t\t#end if\n+\t\t#if $reads.ext == "fastqsanger":\n+\t\t\t--format fastq-sanger\n+\t\t#end if\n+\t\t#if $reads.ext == "fastqsolexa":\n+\t\t\t--format fastq-solexa\n+\t\t#end if\n+\t\t#if $reads.ext == "fastqillumina":\n+\t\t\t--format fastq-i1.3\n+\t\t#end if\n+\t\t#if $reads.ext == "csfasta":\n+\t\t\t--format csfasta\n+\t\t#end if\n+\t\t#if $reads.ext == "fastqcssanger":\n+\t\t\t--format csfastq\n+\t\t#end if\n+\t\t\n+\t\t\n+\t\t--max-uncalled $maxUncalled\n+\t\t--min-readlength $minReadLen\n+\t\t\n+\t\t#if $trimEnds.select == "on":\n+\t\t\t--pre-trim-left $trimEnds.trimLeft\n+\t\t\t--pre-trim-right $trimEnds.trimRight\n+\t\t#end if\n+\t\t\n+\t\t#if $cTrimPhred.select == "on":\n+\t\t\t--pre-trim-phred $cTrimPhred.trimPhred\n+\t\t#end if\n+\t\t\n+\t\t#if $cTrimLen.select == "on":\n+\t\t\t--post-trim-length $cTrimLen.trimLen\n+\t\t#end if\n+\t\t\n+\t\t\n+\t\t#if $cBarcodes.select == "on":\n+\t\t\t--barcodes $cBarcodes.barcodes\n+\t\t\t\n+\t\t\t#if $cBarcodes.cbReads.select == "yes":\n+\t\t\t\t--barcode-reads $cBarcodes.cbReads.bReads\n+\t\t\t#end if\n+\t\t\t\n+\t\t\t#if $cBarcodes.cbReads.select == "no":\n+\t\t\t\t$cBarcodes.cbReads.bKeep\n+\t\t\t#end if\n+\t\t\t\n+\t\t\t--barcode-trim-end $cBarcodes.bTrimEnd\n+\t\t\t\n+\t\t\t#if $cBarcodes.cbTailLen.select == "yes":\n+\t\t\t\t--barcode-tail-length $cBarcodes.cbTailLen.bTailLen\n+\t\t\t#end if\n+\t\t\t\n+\t\t\t#if $cBarcodes.cbMinOverlap.select == "yes":\n+\t\t\t\t--barcode-min-overlap $cBarcodes.cbMinOverlap.bMinOverlap\n+\t\t\t#end if\n+\t\t\t\n+\t\t\t--barcode-threshold $cBarcodes.bThresh\n+\t\t\t\n+\t\t\t#if $cBarcodes.cbAlignScores.select == "yes":\n+\t\t\t\t--barcode-match $bMatch\n+\t\t\t\t--barcode-mismatch $bMismatch\n+\t\t\t\t--barcode-gap $bGap\n+\t\t\t#end if\n+\t\t#end if\n+\t\t\n+\t\t\n+\t\t#if $cAdapters.select == "on":\n+\t\t\t\n+\t\t\t#if $cAdapters.ccAdapters.select == "data":\n+\t\t\t\t--adapters $cAdapters.ccAdapters.adaptersData\n+\t\t\t#end if\n+\t\t\t\n+\t\t\t#if $cAdapters.ccAdapters.select == "seq":\n+\t\t\t\t--adapter-seq $cAdapters.ccAdapters.adapterSeq\n+\t\t\t#end if\n+\t\t\t\n+\t\t\t--adapter-trim-end $cAdapters.aTrimEnd\n+\t\t\t\n+\t\t\t#if $cAdapters.caTailLen.select == "yes":\n+\t\t\t\t--adapter-tail-length $cAdapters.caTailLen.aTailLen\n+\t\t\t#end if\n+\t\t\t\n+\t\t\t--adapter-min-overlap $cAdapters.aMinOverlap\n+\t\t\t--adapter-threshold $cAdapters.aThresh\n+\t\t\t\n+\t\t\t#if $cAdapters.caAlignScores.select == "yes":\n+\t\t\t\t--adapter-match $aMatch\n+\t\t\t\t--adapter-mismatch $aMismatch\n+\t\t\t\t--adapter-gap $aGap\n+\t\t\t#end if\n+\t\t#end if\n+\t\t\n+\t\t\n+\t\t#if $cLogging.select == "show":\n+\t\t\t$cLogging.logLevel\n+\t\t\t$cLogging.singleReads\n+\t\t\t$cLogging.lenDist\n+\t\t\t$cLogging.fastaOutput\n+\t\t\t$cLogging.numTags\n+\t\t\t$cLogging.remTags\n+\t\t\t$cLogging.rndTags\n+\t\t#end if\n+\t\t\n+\t\t\n+\t\t$output $output.id $__new_file_path__ $reads.ext\n+\t\t\n+\t</command>\n+\t\n+\t<inputs>\n+\t\t\n+\t\t<param format="fasta,fastq,fastqsanger,fastqsolexa,fastqillumina,csfasta,fastqcssanger" name="reads" type="data" label="Sequencing reads" optional="false"/>\n+\t\t\n+\t\t\n+\t\t<conditional name="cReads2">\n+\t\t\t<param name="select" type="select" label="2nd read set (paired)">\n+\t\t\t\t<option value="off" selected="true">Off</option>\n+\t\t\t\t<option value="on">On</option>\n+\t\t\t</param>\n+\t\t\t<when value="on">\n+\t\t\t\t<param format="fasta,fastq,fastqsanger,fastqsolexa,fastqillumina,csfasta,fastqcssanger" name="reads2" type="data" label="Reads 2" optional="false" help="same format as first read set"/>\n+\t\t\t</when>\n+\t\t</conditional>\n+\t\t\n+\t\t\n+\t\t<param n'..b'al>\n+\t\t\t</when>\n+\t\t</conditional>\n+\t\t\n+\t\t\n+\t\t<conditional name="cTrimLen">\n+\t\t\t<param name="select" type="select" label="6) Trimming to length">\n+\t\t\t\t<option value="off" selected="true">Off</option>\n+\t\t\t\t<option value="on">On</option>\n+\t\t\t</param>\n+\t\t\t<when value="on">\n+\t\t\t\t<param name="trimLen" size="4" type="integer" value="30" label="Length" optional="false" help="trim reads to certain length from right"/>\n+\t\t\t</when>\n+\t\t</conditional>\n+\t\t\n+\t\t<param name="minReadLen" size="4" type="integer" value="18" label="7) Minimum read length" optional="false" help="shorter reads are discarded"/>\n+\t\t\n+\t\t\n+\t\t<conditional name="cLogging">\n+\t\t\t<param name="select" type="select" label="Logging and tagging options">\n+\t\t\t\t<option value="off" selected="true">Off</option>\n+\t\t\t\t<option value="show">Show</option>\n+\t\t\t</param>\n+\t\t\t<when value="show">\n+\t\t\t\t<param name="logLevel" type="select" label="Alignment logging">\n+\t\t\t\t\t<option value="" selected="true">Off</option>\n+\t\t\t\t\t<option value="--log-level ALL">All</option>\n+\t\t\t\t\t<option value="--log-level MOD">Modified</option>\n+\t\t\t\t\t<option value="--log-level TAB">Tabular</option>\n+\t\t\t\t</param>\n+\t\t\t\t\n+\t\t\t\t<param name="singleReads" type="select" label="Single reads">\n+\t\t\t\t\t<option value="" selected="true">Off</option>\n+\t\t\t\t\t<option value="--single-reads">On</option>\n+\t\t\t\t</param>\n+\t\t\t\t\n+\t\t\t\t<param name="lenDist" type="select" label="Read length distribution">\n+\t\t\t\t\t<option value="" selected="true">Off</option>\n+\t\t\t\t\t<option value="--length-dist">On</option>\n+\t\t\t\t</param>\n+\t\t\t\t\n+\t\t\t\t<param name="fastaOutput" type="select" label="Fasta output">\n+\t\t\t\t\t<option value="" selected="true">Off</option>\n+\t\t\t\t\t<option value="--fasta-output">Always</option>\n+\t\t\t\t</param>\n+\t\t\t\t\n+\t\t\t\t<param name="numTags" type="select" label="Number tags">\n+\t\t\t\t\t<option value="" selected="true">Off</option>\n+\t\t\t\t\t<option value="--number-tags">On</option>\n+\t\t\t\t</param>\n+\t\t\t\t\n+\t\t\t\t<param name="remTags" type="select" label="Removal tags">\n+\t\t\t\t\t<option value="" selected="true">Off</option>\n+\t\t\t\t\t<option value="--removal-tags">On</option>\n+\t\t\t\t</param>\n+\t\t\t\t\n+\t\t\t\t<param name="rndTags" type="select" label="Random tags">\n+\t\t\t\t\t<option value="" selected="true">Off</option>\n+\t\t\t\t\t<option value="--random-tags">On</option>\n+\t\t\t\t</param>\n+\t\t\t</when>\n+\t\t</conditional>\n+\t\t\n+\t\t<param name="threads" type="select" label="Threads" help="check availability of cores">\n+\t\t <option value="1" selected="true">1</option>\n+\t\t <option value="2">2</option>\n+\t\t\t<option value="4">4</option>\n+\t\t</param>\n+\t\t\n+ \t</inputs>\n+ \t\n+\t<stdio>\n+\t <exit_code range="1:" level="fatal" description="Error!" />\n+\t</stdio>\n+\t\n+\t<outputs>\n+\t <data format="txt" name="output" metadata_source="reads"/>\n+\t</outputs>\n+\t\n+\t\n+\t<help>\n+\n+**Description**\n+\n+Flexbar is a program to preprocess sequencing data. It demultiplexes barcoded runs and removes adapter sequences. Further, basic read trimming and filtering options are provided. Flexbar increases mapping rates and improves genome and transcriptome assemblies. It supports next-generation sequencing data in fasta/q and csfasta/q format from Illumina, Roche 454, and the SOLiD platform. Flexbar is available on the project_ page.\n+\n+.. _project: https://sourceforge.net/projects/flexbar\n+\n+------\n+\n+**Trim-end modes**\n+\n+**Any:** longer part of read remains\n+\n+**Left:** align before or at read end, right part remains\n+\n+**Right:** align after or at read start, left part remains\n+\n+**Left tail:** consider first n bases, see tail-length options\n+\n+**Right tail:** use only last n bases of reads in alignment\n+\n+------\n+\n+**Documentation**\n+\n+Further documentation is available on the `manual`__ wiki page and via the command line help screen.\n+\n+.. __: http://sourceforge.net/p/flexbar/wiki\n+\n+------\n+\n+**Reference**\n+\n+Matthias Dodt, Johannes T. Roehr, Rina Ahmed, Christoph Dieterich: Flexbar \xe2\x80\x94 flexible barcode and adapter processing for next-generation sequencing platforms. Biology 2012, 1(3):895-905.\n+\n+\t</help>\n+\n+</tool>\n+\n' |