Skip to content

Commit

Permalink
replace loop with named algorithm
Browse files Browse the repository at this point in the history
  • Loading branch information
frederic-mahe committed Feb 2, 2025
1 parent 9947551 commit 0410e0d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/fastq_stats.cc
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,6 @@ auto fastq_stats(struct Parameters const & parameters) -> void

progress_init("Reading FASTQ file", filesize);

uint64_t seq_count = 0;
uint64_t symbols = 0;
auto read_length_alloc = initial_memory_allocation;

Expand All @@ -169,7 +168,6 @@ auto fastq_stats(struct Parameters const & parameters) -> void

while (fastq_next(input_handle, false, chrmap_upcase_vector.data()))
{
++seq_count;

auto const length = fastq_get_sequence_length(input_handle);
auto * quality_symbols = fastq_get_quality(input_handle);
Expand Down Expand Up @@ -246,6 +244,7 @@ auto fastq_stats(struct Parameters const & parameters) -> void

/* compute various distributions */

auto const seq_count = std::accumulate(read_length_table.begin(), read_length_table.end(), std::uint64_t{0});
auto const len_min = find_smallest_length(read_length_table);
auto const len_max = find_largest_length(read_length_table);
auto const length_dist = compute_cumulative_sum(read_length_table);
Expand Down

0 comments on commit 0410e0d

Please sign in to comment.