commit/galaxy-central: dan: Do not print summary information in FASTQ groomer when grooming an empty file.
1 new changeset in galaxy-central: http://bitbucket.org/galaxy/galaxy-central/changeset/2af990906c8f/ changeset: r5088:2af990906c8f user: dan date: 2011-02-18 18:07:27 summary: Do not print summary information in FASTQ groomer when grooming an empty file. affected #: 2 files (168 bytes) --- a/lib/galaxy_utils/sequence/fastq.py Fri Feb 18 12:04:26 2011 -0500 +++ b/lib/galaxy_utils/sequence/fastq.py Fri Feb 18 12:07:27 2011 -0500 @@ -314,8 +314,12 @@ rval.append( fastq_format ) return rval def get_ascii_range( self ): + if not self.ascii_values_used: + return None return ( min( self.ascii_values_used ), max( self.ascii_values_used ) ) def get_decimal_range( self ): + if not self.nuc_index_quality: + return None decimal_values_used = [] for scores in self.nuc_index_quality: decimal_values_used.extend( scores.keys() ) --- a/tools/fastq/fastq_groomer.py Fri Feb 18 12:04:26 2011 -0500 +++ b/tools/fastq/fastq_groomer.py Fri Feb 18 12:07:27 2011 -0500 @@ -23,15 +23,16 @@ if read_count is not None: print "Groomed %i %s reads into %s reads." % ( read_count + 1, input_type, output_type ) + if input_type != output_type and 'solexa' in [ input_type, output_type ]: + print "Converted between Solexa and PHRED scores." + if summarize_input: + print "Based upon quality and sequence, the input data is valid for: %s" % ( ", ".join( aggregator.get_valid_formats() ) or "None" ) + ascii_range = aggregator.get_ascii_range() + decimal_range = aggregator.get_decimal_range() + print "Input ASCII range: %s(%i) - %s(%i)" % ( repr( ascii_range[0] ), ord( ascii_range[0] ), repr( ascii_range[1] ), ord( ascii_range[1] ) ) #print using repr, since \x00 (null) causes info truncation in galaxy when printed + print "Input decimal range: %i - %i" % ( decimal_range[0], decimal_range[1] ) else: print "No valid FASTQ reads were provided." - if input_type != output_type and 'solexa' in [ input_type, output_type ]: - print "Converted between Solexa and PHRED scores." - if summarize_input: - print "Based upon quality and sequence, the input data is valid for: %s" % ( ", ".join( aggregator.get_valid_formats() ) or "None" ) - ascii_range = aggregator.get_ascii_range() - decimal_range = aggregator.get_decimal_range() - print "Input ASCII range: %s(%i) - %s(%i)" % ( repr( ascii_range[0] ), ord( ascii_range[0] ), repr( ascii_range[1] ), ord( ascii_range[1] ) ) #print using repr, since \x00 (null) causes info truncation in galaxy when printed - print "Input decimal range: %i - %i" % ( decimal_range[0], decimal_range[1] ) -if __name__ == "__main__": main() \ No newline at end of file + +if __name__ == "__main__": main() Repository URL: https://bitbucket.org/galaxy/galaxy-central/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email.
participants (1)
-
Bitbucket