# HG changeset patch
# User devteam
# Date 1506794044 14400
# Node ID b849e7c23b435b7a24b657b9e8fff3e02d10dd09
# Parent fdff6f6a8763cfc6dcff42cbbc17a48b51417265
planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tool_collections/galaxy_sequence_utils/fastq_trimmer commit f2582539542b33240234e8ea6093e25d0aee9b6a
diff -r fdff6f6a8763 -r b849e7c23b43 fastq_trimmer.py
--- a/fastq_trimmer.py Fri Dec 18 19:31:05 2015 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,41 +0,0 @@
-#Dan Blankenberg
-import sys
-from galaxy_utils.sequence.fastq import fastqReader, fastqWriter
-
-def main():
- input_filename = sys.argv[1]
- output_filename = sys.argv[2]
- left_offset = sys.argv[3]
- right_offset = sys.argv[4]
- percent_offsets = sys.argv[5] == 'offsets_percent'
- input_type = sys.argv[6] or 'sanger'
- keep_zero_length = sys.argv[7] == 'keep_zero_length'
-
- out = fastqWriter( open( output_filename, 'wb' ), format = input_type )
- num_reads_excluded = 0
- num_reads = None
- for num_reads, fastq_read in enumerate( fastqReader( open( input_filename ), format = input_type ) ):
- if percent_offsets:
- left_column_offset = int( round( float( left_offset ) / 100.0 * float( len( fastq_read ) ) ) )
- right_column_offset = int( round( float( right_offset ) / 100.0 * float( len( fastq_read ) ) ) )
- else:
- left_column_offset = int( left_offset )
- right_column_offset = int( right_offset )
- if right_column_offset != 0:
- right_column_offset = -right_column_offset
- else:
- right_column_offset = None
- fastq_read = fastq_read.slice( left_column_offset, right_column_offset )
- if keep_zero_length or len( fastq_read ):
- out.write( fastq_read )
- else:
- num_reads_excluded += 1
- out.close()
- if num_reads is None:
- print "No valid fastq reads could be processed."
- else:
- print "%i fastq reads were processed." % ( num_reads + 1 )
- if num_reads_excluded:
- print "%i reads of zero length were excluded from the output." % num_reads_excluded
-
-if __name__ == "__main__": main()
diff -r fdff6f6a8763 -r b849e7c23b43 fastq_trimmer.xml
--- a/fastq_trimmer.xml Fri Dec 18 19:31:05 2015 -0500
+++ b/fastq_trimmer.xml Sat Sep 30 13:54:04 2017 -0400
@@ -1,124 +1,112 @@
-
- by column
-
- galaxy_sequence_utils
-
- fastq_trimmer.py '$input_file' '$output_file' '${offset_type['left_column_offset']}' '${offset_type['right_column_offset']}' '${offset_type['base_offset_type']}' '${input_file.extension[len( 'fastq' ):]}' '$keep_zero_length'
-
-
-
-
-
-
-
-
-
-
- int( float( value ) ) == float( value )
-
-
- int( float( value ) ) == float( value )
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+ by column
+
+ galaxy_sequence_utils
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ CBA@>7@7BBCA4-48%<;;%CBA@>7@7BBCA4-4
+
Or you set percent offsets of 6% and 20% (corresponds to absolute offsets of 2,7 for a read length of 36)::
-
+
@Some FASTQ Sanger Read
ATATGTNCTCACTGATAAGTGGATATN
+
- @.@;B-%?8>CBA@>7@7BBCA4-48%
-
+ @.@;B-%?8>CBA@>7@7BBCA4-48%
+
-----
.. class:: warningmark
Trimming a color space read will cause any adapter base to be lost.
-
-------
-
-
-
-
- 10.1093/bioinformatics/btq281
-
-
+ ]]>
+
+ 10.1093/bioinformatics/btq281
+
diff -r fdff6f6a8763 -r b849e7c23b43 tool_dependencies.xml
--- a/tool_dependencies.xml Fri Dec 18 19:31:05 2015 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,6 +0,0 @@
-
-
-
-
-
-