# HG changeset patch # User devteam # Date 1506797927 14400 # Node ID 462abc5618ba2000a30134eb46f46cd314713c99 # Parent f0949bc49926f6fcd591c075301abae4ec5b89ae planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tool_collections/galaxy_sequence_utils/fastq_paired_end_deinterlacer commit f2582539542b33240234e8ea6093e25d0aee9b6a diff -r f0949bc49926 -r 462abc5618ba fastq_paired_end_deinterlacer.py --- a/fastq_paired_end_deinterlacer.py Mon Jan 27 09:27:16 2014 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,66 +0,0 @@ -#Florent Angly -import sys -from galaxy_utils.sequence.fastq import fastqReader, fastqWriter, fastqNamedReader, fastqJoiner - -def main(): - input_filename = sys.argv[1] - input_type = sys.argv[2] or 'sanger' - mate1_filename = sys.argv[3] - mate2_filename = sys.argv[4] - single1_filename = sys.argv[5] - single2_filename = sys.argv[6] - - type = input_type - input = fastqNamedReader( open( input_filename, 'rb' ), format = type ) - mate1_out = fastqWriter( open( mate1_filename, 'wb' ), format = type ) - mate2_out = fastqWriter( open( mate2_filename, 'wb' ), format = type ) - single1_out = fastqWriter( open( single1_filename, 'wb' ), format = type ) - single2_out = fastqWriter( open( single2_filename, 'wb' ), format = type ) - joiner = fastqJoiner( type ) - - i = None - skip_count = 0 - found = {} - for i, read in enumerate( fastqReader( open( input_filename, 'rb' ), format = type ) ): - - if read.identifier in found: - del found[read.identifier] - continue - - mate1 = input.get( read.identifier ) - - mate2 = input.get( joiner.get_paired_identifier( mate1 ) ) - - if mate2: - # This is a mate pair - found[mate2.identifier] = None - if joiner.is_first_mate( mate1 ): - mate1_out.write( mate1 ) - mate2_out.write( mate2 ) - else: - mate1_out.write( mate2 ) - mate2_out.write( mate1 ) - else: - # This is a single - skip_count += 1 - if joiner.is_first_mate( mate1 ): - single1_out.write( mate1 ) - else: - single2_out.write( mate1 ) - - if i is None: - print "Your input file contained no valid FASTQ sequences." - else: - if skip_count: - print 'There were %i reads with no mate.' % skip_count - print 'De-interlaced %s pairs of sequences.' % ( (i - skip_count + 1)/2 ) - - input.close() - mate1_out.close() - mate2_out.close() - single1_out.close() - single2_out.close() - - -if __name__ == "__main__": - main() diff -r f0949bc49926 -r 462abc5618ba fastq_paired_end_deinterlacer.xml --- a/fastq_paired_end_deinterlacer.xml Mon Jan 27 09:27:16 2014 -0500 +++ b/fastq_paired_end_deinterlacer.xml Sat Sep 30 14:58:47 2017 -0400 @@ -1,35 +1,37 @@ - - on paired end reads - - galaxy_sequence_utils - - fastq_paired_end_deinterlacer.py '$input_file' '${input_file.extension[len( 'fastq' ):]}' '$output1_pairs_file' '$output2_pairs_file' '$output1_singles_file' '$output2_singles_file' - - - - - - - - - - - - - - - - - - - - - - - - - - + + on paired end reads + + galaxy_sequence_utils + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ]]> + + 10.1093/bioinformatics/btq281 + diff -r f0949bc49926 -r 462abc5618ba tool_dependencies.xml --- a/tool_dependencies.xml Mon Jan 27 09:27:16 2014 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,6 +0,0 @@ - - - - - -