From 1a0a8d9550a9f21900dab7169eca9aea55cd3cf0 Mon Sep 17 00:00:00 2001 From: Lucas Czech Date: Thu, 6 Jun 2024 11:34:38 +0200 Subject: [PATCH] Fix naming scheme for sam without rg splitting --- .../population/stream/variant_input_stream_sources.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/genesis/population/stream/variant_input_stream_sources.cpp b/lib/genesis/population/stream/variant_input_stream_sources.cpp index 25a30a89..e7694359 100644 --- a/lib/genesis/population/stream/variant_input_stream_sources.cpp +++ b/lib/genesis/population/stream/variant_input_stream_sources.cpp @@ -225,8 +225,8 @@ VariantInputStream make_variant_input_stream_from_sam_file( // Scratch that. If we treat the file as a single sample anyway, we just use the file name // as the sample name. Way more intuitive. Unfortunately, there is then the inconsistency // in naming, but it's more in line with what e.g. the sync does if a header is provided. - assert( data.sample_names.size() <= 1 ); - if( data.sample_names.size() == 1 ) { + assert( cur.sample_size() <= 1 ); + if( cur.sample_size() == 1 ) { data.sample_names = std::vector{ data.source_name }; } } else {