File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2828#include < cstdint>
2929#include < future>
3030#include < map>
31- #include < ranges>
3231#include < string>
3332#include < vector>
3433
@@ -1355,11 +1354,11 @@ void TileDBVCFDataset::SampleHeaders::set_sample_header(
13551354 Indexes& indexes = sample_index_lookup[sample_name];
13561355 return indexes.header_idx == hdr_idx;
13571356 };
1358- auto samples_view = std::views::keys (sample_index_lookup );
1357+ auto samples = samples_view ( );
13591358 std::vector<std::string> unique_hdr_samples;
13601359 std::copy_if (
1361- samples_view .begin (),
1362- samples_view .end (),
1360+ samples .begin (),
1361+ samples .end (),
13631362 std::back_inserter (unique_hdr_samples),
13641363 unique_hdr_filter);
13651364 std::string unqiue_hdr_samples_str = utils::join (unique_hdr_samples, ' ,' );
Original file line number Diff line number Diff line change 2929
3030#include < map>
3131#include < memory>
32+ #include < ranges>
3233#include < string>
3334#include < thread>
3435#include < unordered_set>
@@ -281,6 +282,16 @@ class TileDBVCFDataset {
281282 */
282283 SafeBCFHdr get_sample_header (const std::string& sample) const ;
283284
285+ /* *
286+ * Returns the sample names stored as a view of the internal lookup map.
287+ *
288+ * @param sample The name of the sample to get the header for
289+ * @return The first header
290+ */
291+ auto samples_view () {
292+ return std::views::keys (sample_index_lookup);
293+ };
294+
284295 /* *
285296 * Gets sample names in the order their heaeders are returned by the
286297 * TileDB header array query.
You can’t perform that action at this time.
0 commit comments