commit/galaxy-central: dan: Fix for FASTQ datasets peek/display of sequence counts.
1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/4e51563b62b5/ Changeset: 4e51563b62b5 User: dan Date: 2014-08-21 21:52:35 Summary: Fix for FASTQ datasets peek/display of sequence counts. Affected #: 1 file diff -r 41f9ca7a24c5748f80ed19315786ba51f4cc19b5 -r 4e51563b62b5bf497ad42c53868dc9d48d39146c lib/galaxy/datatypes/sequence.py --- a/lib/galaxy/datatypes/sequence.py +++ b/lib/galaxy/datatypes/sequence.py @@ -460,6 +460,7 @@ """ Set the number of sequences and the number of data lines in dataset. + FIXME: This does not properly handle line wrapping """ if self.max_optional_metadata_filesize >= 0 and dataset.get_size() > self.max_optional_metadata_filesize: dataset.metadata.data_lines = None @@ -470,22 +471,17 @@ seq_counter = 0 # blocks should be 4 lines long for line in file( dataset.file_name ): line = line.strip() - if line and line.startswith( '#' ) and not sequences: + if line and line.startswith( '#' ) and not data_lines: # We don't count comment lines for sequence data types continue + seq_counter += 1 + data_lines += 1 if line and line.startswith( '@' ): if seq_counter >= 4: # count previous block # blocks should be 4 lines long sequences += 1 seq_counter = 1 - else: - # in case quality line starts with @ - seq_counter += 1 - data_lines += 1 - else: - data_lines += 1 - seq_counter += 1 if seq_counter >= 4: # count final block sequences += 1 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)
-
commits-noreply@bitbucket.org