1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/changeset/bb19e940a03c/ changeset: bb19e940a03c user: richard_burhans date: 2012-03-22 21:15:24 summary: fix get_file_peek() to better support datasets with very long lines affected #: 1 file diff -r fa40b8f3f385f67d57294d98a036e483775d873f -r bb19e940a03c7120674b2ba1ebf1588cbea95f74 lib/galaxy/datatypes/data.py --- a/lib/galaxy/datatypes/data.py +++ b/lib/galaxy/datatypes/data.py @@ -433,13 +433,13 @@ if line and not line.startswith( '#' ): data_lines += 1 return data_lines - def set_peek( self, dataset, line_count=None, is_multi_byte=False, skipchars=[] ): + def set_peek( self, dataset, line_count=None, is_multi_byte=False, WIDTH=256, skipchars=[] ): """ Set the peek. This method is used by various subclasses of Text. """ if not dataset.dataset.purged: # The file must exist on disk for the get_file_peek() method - dataset.peek = get_file_peek( dataset.file_name, is_multi_byte=is_multi_byte, skipchars=skipchars ) + dataset.peek = get_file_peek( dataset.file_name, is_multi_byte=is_multi_byte, WIDTH=WIDTH, skipchars=skipchars ) if line_count is None: # See if line_count is stored in the metadata if dataset.metadata.data_lines: @@ -567,6 +567,11 @@ ## >>> get_file_peek(fname) ## 'chr22 30128507 31828507 uc003bnx.1_cds_2_0_chr22_29227_f 0 +\n' """ + # Set size for file.readline() to a negative number to force it to + # read until either a newline or EOF. Needed for datasets with very + # long lines. + if WIDTH == 'unlimited': + WIDTH = -1 lines = [] count = 0 file_type = None 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.