Skip to content

Commit

Permalink
Issue-322: Fix segfault with dumptext when writing out adapter (#323)
Browse files Browse the repository at this point in the history
* Issue-322: Fix segfault with dumptext when writing out adapter, but no adapter present

Resolves #322

* Fix warning

* Update readme
  • Loading branch information
ezralanglois authored May 13, 2023
1 parent 8018b81 commit fe1a5ef
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 5 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,13 @@ Quick Start
[![Coverity_status][covstatus]][covhome]

The Illumina InterOp libraries are a set of common routines used for reading InterOp metric files produced by
Illumina sequencers including **NextSeq 1k/2k**. These libraries are backwards compatible and capable of supporting prior releases of the software,
Illumina sequencers including **NextSeq 1k/2k** and NovaSeqX. These libraries are backwards compatible and capable of supporting prior releases of the software,
with one exception: GA systems have been excluded.

***
> We now support an interface to Python 2.7 (UCS-4) and 3.6-3.10
> Note that 3.10 is CentOS 7 or later while ealier versions support Centos 5 or later
> Note that 3.10 is CentOS 7 or later while earlier versions support Centos 5 or later
> Note: dumptext has been deprecated in favor of imaging_table and will be removed in the next version
***

The InterOp files supported by this library include:
Expand Down
6 changes: 6 additions & 0 deletions docs/src/changes.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changes {#changes}

## v1.2.4

| Date | Description |
|------------|----------------------------------------------------------------------------------------|
| 2023-05-12 | Issue-322: Fix segfault with dumptext when writing out adapter, but no adapter present |

## v1.2.3

| Date | Description |
Expand Down
9 changes: 6 additions & 3 deletions src/interop/model/metrics/error_metric.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -602,14 +602,17 @@ namespace illumina{ namespace interop{ namespace io
*/
static size_t write_metric(std::ostream& out,
const error_metric& metric,
const header_type& header,
const header_type& /*header*/,
const char sep,
const char eol,
const char)
{
out << metric.lane() << sep << metric.tile() << sep << metric.cycle() << sep;
out << metric.error_rate() << sep << metric.phix_adapter_rates()[0];
for(size_t i=1;i<static_cast<size_t>(header.number_adapters());++i)
if(metric.phix_adapter_rates().size() > 0)
out << metric.error_rate() << sep << metric.phix_adapter_rates()[0];
else
out << metric.error_rate();
for(size_t i=1;i<static_cast<size_t>(metric.phix_adapter_rates().size());++i)
out << sep << metric.phix_adapter_rates()[i];
out << eol;
return 0;
Expand Down

0 comments on commit fe1a5ef

Please sign in to comment.