Skip to content

Commit

Permalink
[MISC] clang-format
Browse files Browse the repository at this point in the history
  • Loading branch information
seqan-actions committed Oct 24, 2022
1 parent 92e5a5e commit 26fd4c4
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 20 deletions.
2 changes: 1 addition & 1 deletion include/seqan3/io/sam_file/format_bam.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ format_bam::read_alignment_record(stream_type & stream,

auto stream_view = seqan3::detail::istreambuf(stream);

[[maybe_unused]] int32_t offset_tmp{}; // needed in case the cigar string was stored in the tag dictionary
[[maybe_unused]] int32_t offset_tmp{}; // needed in case the cigar string was stored in the tag dictionary
[[maybe_unused]] int32_t ref_length{0}; // needed in case the cigar string was stored in the tag dictionary

// Header
Expand Down
3 changes: 2 additions & 1 deletion include/seqan3/io/sam_file/input.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,8 @@ class sam_file_input
"seqan3::alignment_from_cigar on how to get an alignment from the cigar information.");

static_assert(
[]() constexpr {
[]() constexpr
{
for (field f : selected_field_ids::as_array)
if (!field_ids::contains(f))
return false;
Expand Down
3 changes: 2 additions & 1 deletion include/seqan3/io/sam_file/output.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,8 @@ class sam_file_output
field::header_ptr>;

static_assert(
[]() constexpr {
[]() constexpr
{
for (field f : selected_field_ids::as_array)
if (!field_ids::contains(f))
return false;
Expand Down
5 changes: 1 addition & 4 deletions test/unit/io/sam_file/format_bam_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -590,7 +590,6 @@ TEST_F(bam_format, too_long_cigar_string_write)
}
too_long_cigar.push_back({1, 'M'_cigar_operation});


// Expected output. ATTENTION this could not be validated by samtools as it does not support too long cigar strings
std::string expected =
std::string /*the beginning*/
Expand Down Expand Up @@ -658,9 +657,7 @@ TEST_F(bam_format, issue2417)

std::istringstream stream{input};

seqan3::sam_file_input fin{stream,
seqan3::format_bam{},
seqan3::fields<seqan3::field::id, seqan3::field::cigar>{}};
seqan3::sam_file_input fin{stream, seqan3::format_bam{}, seqan3::fields<seqan3::field::id, seqan3::field::cigar>{}};

std::vector<seqan3::gapped<seqan3::dna5>> const empty_sequence{};

Expand Down
20 changes: 9 additions & 11 deletions test/unit/io/sam_file/sam_file_input_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -536,11 +536,10 @@ TEST_F(sam_file_input_bam_format_f, construct_by_filename)
filecreator << binary_input;
}

seqan3::sam_file_input fin{
filename,
ref_ids,
ref_seqs,
seqan3::fields<seqan3::field::id, seqan3::field::seq, seqan3::field::qual>{}};
seqan3::sam_file_input fin{filename,
ref_ids,
ref_seqs,
seqan3::fields<seqan3::field::id, seqan3::field::seq, seqan3::field::qual>{}};

EXPECT_EQ(fin.header().ref_ids(), ref_ids);
EXPECT_EQ(fin.header().comments[0], std::string{"This is a comment."});
Expand All @@ -562,12 +561,11 @@ TEST_F(sam_file_input_bam_format_f, construct_by_stream)
{
std::istringstream stream{binary_input};

seqan3::sam_file_input fin{
stream,
ref_ids,
ref_seqs,
seqan3::format_bam{},
seqan3::fields<seqan3::field::id, seqan3::field::seq, seqan3::field::qual>{}};
seqan3::sam_file_input fin{stream,
ref_ids,
ref_seqs,
seqan3::format_bam{},
seqan3::fields<seqan3::field::id, seqan3::field::seq, seqan3::field::qual>{}};

EXPECT_EQ(fin.header().ref_ids(), ref_ids);
EXPECT_EQ(fin.header().comments[0], std::string{"This is a comment."});
Expand Down
3 changes: 1 addition & 2 deletions test/unit/io/sam_file/sam_file_output_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,7 @@ TEST(general, default_template_args_and_deduction_guides)
seqan3::sam_file_output fout{filename, seqan3::fields<seqan3::field::cigar>{}};

using t = decltype(fout);
EXPECT_TRUE(
(std::is_same_v<typename t::selected_field_ids, seqan3::fields<seqan3::field::cigar>>)); // changed
EXPECT_TRUE((std::is_same_v<typename t::selected_field_ids, seqan3::fields<seqan3::field::cigar>>)); // changed
EXPECT_TRUE((std::is_same_v<typename t::valid_formats, comp2>));
EXPECT_TRUE((std::is_same_v<typename t::stream_char_type, comp3>));
}
Expand Down

0 comments on commit 26fd4c4

Please sign in to comment.