Skip to content

output_sequence1_id and output_sequence2_id are same #3205

@JappyPing

Description

@JappyPing

Hi there,

Thanks so much for this excellent C++ library for bioinformatics. I had a question when I was using it; please have a look at the following,

Platform

  • SeqAn version: <seqan3.3.0 conda>
  • Operating system:
  • Compiler: <gcc 13.20>

Question

I used the following configurations to get pairwise alignment from a vector. I found the output pairwise sequence id-1 and id-2 are the same. Is this problem a bug?

#include <seqan3/alignment/pairwise/align_pairwise.hpp>
#include <seqan3/alphabet/nucleotide/dna4.hpp>
#include <seqan3/core/debug_stream.hpp>
#include <seqan3/utility/views/pairwise_combine.hpp>

int main()
{
    using namespace seqan3::literals;

    std::vector vec{"ACGTGACTGACT"_dna4, "ACGAAGACCGAT"_dna4, "ACGTGACTGACT"_dna4, "AGGTACGAGCGACACT"_dna4};

    auto config = seqan3::align_cfg::method_global{} | seqan3::align_cfg::edit_scheme | seqan3::align_cfg::min_score{-7}
                | seqan3::align_cfg::output_score{} | seqan3::align_cfg::output_sequence1_id{}
                | seqan3::align_cfg::output_sequence2_id{};

    auto alignment_results = seqan3::align_pairwise(seqan3::views::pairwise_combine(vec), config);
    auto filter_v = std::views::filter(
        [](auto && res)
        {
            return res.score() >= -6;
        });

    for (auto const & result : alignment_results | filter_v)
        seqan3::debug_stream << result << '\n';

    // {sequence1 id: 0, sequence2 id: 0, score: -4}
    // {sequence1 id: 1, sequence2 id: 1, score: 0}
    // {sequence1 id: 3, sequence2 id: 3, score: -4}
}

Thanks for your time.

Best regards,

Jappy

Metadata

Metadata

Assignees

Labels

bugfaulty or wrong behaviour of code

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions