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/7e22f3579852/ Changeset: 7e22f3579852 Branch: stable User: dan Date: 2014-08-21 21:52:35 Summary: Fix for FASTQ datasets peek/display of sequence counts. Affected #: 1 file diff -r b6c8afd2c2a1a214ef96c4ccf05aab8c8bc826f2 -r 7e22f35798522100ff03e1fdd4eced962b292360 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