diff fastx_barcode_splitter.xml @ 0:84bbf4fd24c3 draft

Initial toolshed version with support for separate index reads and automatic loading of results into Galaxy history.
author lparsons
date Fri, 08 Nov 2013 09:53:39 -0500
parents
children b7b3d008e2d3
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fastx_barcode_splitter.xml	Fri Nov 08 09:53:39 2013 -0500
@@ -0,0 +1,92 @@
+<tool id="cshl_princeton_fastx_barcode_splitter" version="1.1" name="Barcode Splitter" force_history_refresh="True">
+	<description></description>
+	<command interpreter="bash">
+		fastx_barcode_splitter_galaxy_wrapper.sh $BARCODE $input "primary_$output.id" "$__new_file_path__" $input.extension --mismatches $mismatches --partial $partial 
+		#if $refBarcodeLocation.barcodeLocation == "idxfile":
+		  --idxfile $refBarcodeLocation.idxfile 
+		#else: 
+		  $refBarcodeLocation.EOL 
+		#end if
+		> $output
+	</command>
+
+	<inputs>
+		<param format="txt" version="1.1" name="BARCODE" type="data" label="Barcodes to use" />
+		<param format="fasta,fastqsanger,fastqsolexa,fastqillumina" version="1.1" name="input" type="data" label="Library to split" />
+
+		<conditional name="refBarcodeLocation">
+			<param version="1.1" name="barcodeLocation" type="select" label="Barcodes found at">
+				<option value="bol">Start of sequence (5' end)</option>
+				<option value="eol">End of sequence (3' end)</option>
+				<option value="idxfile">Separate index file</option>
+			</param>
+			<when value="bol">
+				<param version="1.1" name="EOL" type="hidden" value="--bol" />
+			</when>
+			<when value="eol">
+				<param version="1.1" name="EOL" type="hidden" value="--eol" />
+			</when>
+			<when value="idxfile">
+				<param version="1.1" name="idxfile" type="data" format="fasta,fastq,fastqsanger" label="Select index read file" />
+			</when>
+		</conditional>
+
+		<param version="1.1" name="mismatches" type="integer" size="3" value="0" label="Number of allowed mismatches" />
+		
+		<param version="1.1" name="partial" type="integer" size="3" value="0" label="Number of allowed barcodes nucleotide deletions" />
+	
+	</inputs>
+	
+	<tests>
+		<test>
+			<!-- Split a FASTQ file -->
+			<param version="1.1" name="BARCODE" value="fastx_barcode_splitter1.txt" />
+			<param version="1.1" name="input" value="fastx_barcode_splitter1.fastq" ftype="fastqsolexa" />
+			<param version="1.1" name="EOL" value="Start of sequence (5' end)" />
+			<param version="1.1" name="mismatches" value="2" />
+			<param version="1.1" name="partial" value="0" />
+			<output version="1.1" name="output" file="fastx_barcode_splitter1.out" />
+		</test>
+	</tests>
+
+	<outputs>
+		<data version="1.1" format="html" name="output" />
+	</outputs>
+<help>
+
+**What it does**
+
+This tool splits a FASTQ or FASTA file into several files, using barcodes as the split criteria.
+
+--------
+
+**Barcode file Format**
+
+Barcode files are simple text files.
+Each line should contain an identifier (descriptive name for the barcode), and the barcode itself (A/C/G/T), separated by a TAB character.
+Example::
+
+    #This line is a comment (starts with a 'number' sign)
+    BC1	GATCT
+    BC2	ATCGT
+    BC3	GTGAT
+    BC4 TGTCT
+    
+For each barcode, a new FASTQ file will be created (with the barcode's identifier as part of the file name).
+Sequences matching the barcode will be stored in the appropriate file.
+
+One additional FASTQ file will be created (the 'unmatched' file), where sequences not matching any barcode will be stored.
+
+The output of this tool is an HTML file, displaying the split counts and the file names.
+In addition, each fastq file produced will be loaded into the galaxy history automatically.
+
+
+------
+
+This tool is based on `FASTX-toolkit`__ by Assaf Gordon.
+
+ .. __: http://hannonlab.cshl.edu/fastx_toolkit/
+ 
+</help>
+<!-- FASTX-barcode-splitter is part of the FASTX-toolkit, by A.Gordon (gordon@cshl.edu) -->
+</tool>