view sickle.xml @ 0:d883d8d86977 draft default tip

Uploaded
author jjohnson
date Mon, 13 Jan 2014 14:52:59 -0500
parents
children
line wrap: on
line source

<tool id="sickle" name="Sickle">
	<description>Windowed Adaptive Trimming of FastQ data</description>
	<requirements>
		<requirement version="1.210">sickle</requirement>
	</requirements>
	<command>
		sickle $readtype.single_or_paired --quiet

		#if str($readtype.single_or_paired) == "se":
		-f $input_single -o $output_single

		#if $input_single.ext == "fastq":
		-t sanger
		#else if $input_single.ext == "fastqsanger":
		-t sanger
		#else if $input_single.ext == "fastqillumina":
		-t illumina
		#else if $input_single.ext == "fastqsolexa":
		-t solexa
		#end if

		#end if

		#if str($readtype.single_or_paired) == "pe":
		-f $input_paired1 -r $input_paired2 -o $output_paired1 -p $output_paired2 -s $output_paired_single

                #if $input_paired1.ext == "fastq":
                -t sanger
                #else if $input_paired1.ext == "fastqsanger":
                -t sanger
                #else if $input_paired1.ext == "fastqillumina":
                -t illumina
                #else if $input_paired1.ext == "fastqsolexa":
                -t solexa
                #end if

		#end if

		#if str($qual_threshold) != "":
		-q $qual_threshold
		#end if

		#if str($length_threshold) != "":
		-l $length_threshold
		#end if

		#if $no_five_prime:
		-x
		#end if

		#if $discard_n:
		-n
		#end if
	</command>

	<inputs>
		<conditional name="readtype">
			<param name="single_or_paired" type="select" optional="false" label="Single-End or Paired-End reads?" help="Note: Sickle will infer the quality type of the file from its datatype.  I.e., if the datatype is fastqsanger, then the quality type is sanger.  The default is fastqsanger.">
				<option value="se" selected="true">Single-End</option>
				<option value="pe">Paired-End</option>
			</param>

			<when value="se">
				<param format="fastq, fastqsanger, fastqillumina, fastqsolexa" name="input_single" type="data" optional="false" label="Single-End FastQ Reads"/>
			</when>

			<when value="pe">
				<param format="fastq, fastqsanger, fastqillumina, fastqsolexa" name="input_paired1" type="data" optional="false" label="Paired-End Forward Strand FastQ Reads"/>
				<param format="fastq, fastqsanger, fastqillumina, fastqsolexa" name="input_paired2" type="data" optional="false" label="Paired-End Reverse Strand FastQ Reads"/>
			</when>
		</conditional>

		<param name="qual_threshold" value="20" type="integer" optional="true" label="Quality Threshold">
			<validator type="in_range" min="0" message="Minimum value is 0"/>
		</param>

		<param name="length_threshold" value="20" type="integer" optional="true" label="Length Threshold">
			<validator type="in_range" min="0" message="Minimum value is 0"/>
		</param>

		<param name="no_five_prime" type="boolean" label="Don't do 5' trimming"/>
		<param name="discard_n" type="boolean" label="Discard sequences with Ns"/>
	</inputs>

	<outputs>
		<data format_source="input_single" name="output_single" label="Single-End output of ${tool.name} on ${on_string}">
		<filter>(readtype['single_or_paired'] == 'se')</filter>
		</data>

		<data format_source="input_paired1" name="output_paired1" label="Paired-End forward strand output of ${tool.name} on ${on_string}">
		<filter>(readtype['single_or_paired'] == 'pe')</filter>
		</data>

		<data format_source="input_paired2" name="output_paired2" label="Paired-End reverse strand output of ${tool.name} on ${on_string}">
		<filter>(readtype['single_or_paired'] == 'pe')</filter>
		</data>

		<data format_source="input_paired1" name="output_paired_single" label="Singletons from Paired-End output of ${tool.name} on ${on_string}">
		<filter>(readtype['single_or_paired'] == 'pe')</filter>
		</data>
	</outputs>

	<stdio>
		<exit_code range="1"   level="fatal"   description="sickle failed" />
	</stdio>

	<tests>
		<test>
			<param name="single_or_paired" value="se"/>
			<param name="input_single" value="test.fastq" ftype="fastqillumina"/>
			<param name="qual_threshold" value="33"/>
			<param name="length_threshold" value="40"/>
			<param name="no_five_prime" value="False"/>
			<output name="output_single" file="trimmed_output_file.fastq" ftype="fastqillumina"/>
		</test>

		<test>
			<param name="single_or_paired" value="pe"/>
			<param name="input_paired1" value="test.f.fastq" ftype="fastqillumina"/>
			<param name="input_paired2" value="test.r.fastq" ftype="fastqillumina"/>
			<param name="qual_threshold" value="12"/>
			<param name="length_threshold" value="15"/>
			<param name="no_five_prime" value="False"/>
			<output name="output_paired1" file="trimmed_output_file1.fastq" ftype="fastqillumina"/>
			<output name="output_paired2" file="trimmed_output_file2.fastq" ftype="fastqillumina"/>
			<output name="output_paired_single" file="trimmed_singles_file.fastq" ftype="fastqillumina"/>
		</test>
	</tests>

	<help>
Most modern sequencing technologies produce reads that have deteriorating quality towards the 3'-end and some towards the 5'-end as well. Incorrectly called bases in both regions negatively impact assembles, mapping, and downstream bioinformatics analyses.

Sickle is a tool that uses sliding windows along with quality and length thresholds to determine when quality is sufficiently low to trim the 3'-end of reads and also determines when the quality is sufficiently high enough to trim the 5'-end of reads. It will also discard reads based upon the length threshold. It takes the quality values and slides a window across them whose length is 0.1 times the length of the read. If this length is less than 1, then the window is set to be equal to the length of the read. Otherwise, the window slides along the quality values until the average quality in the window rises above the threshold, at which point the algorithm determines where within the window the rise occurs and cuts the read and quality there for the 5'-end cut. Then when the average quality in the window drops below the threshold, the algorithm determines where in the window the drop occurs and cuts both the read and quality strings there for the 3'-end cut. However, if the length of the remaining sequence is less than the minimum length threshold, then the read is discarded entirely. 5'-end trimming can be disabled.

Sickle also has an option to discard reads with any Ns in them.

Sickle supports three types of quality values: Illumina, Solexa, and Sanger. Note that the Solexa quality setting is an approximation (the actual conversion is a non-linear transformation). The end approximation is close. Illumina quality refers to qualities encoded with the CASAVA pipeline between versions 1.3 and 1.7. Illumina quality using CASAVA >= 1.8 is Sanger encoded.  Sickle will get the quality type from the datatype of the file.

Note that Sickle will remove the 2nd fastq record header (on the "+" line) and replace it with simply a "+". This is the default format for CASAVA >= 1.8.

Sickle also supports gzipped file inputs.
	</help>

</tool>