Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Mixed up output string. #52

Closed
Irallia opened this issue Feb 8, 2021 · 1 comment · Fixed by #53
Closed

[BUG] Mixed up output string. #52

Irallia opened this issue Feb 8, 2021 · 1 comment · Fixed by #53
Assignees
Labels
bug Something isn't working

Comments

@Irallia
Copy link
Collaborator

Irallia commented Feb 8, 2021

This bug came out of an discussion of: #49 (comment)

eldariont:
test/api/junction_detection_test.cpp lines +17 to +20:

// Reference\tm2257/8161/CCS\t41972616\tForward\tRead \t0\t2294\tForward\tchr21
// INS from Primary Read - Sequence Type: Reference; Sequence Name: m2257/8161/CCS; Position: 41972616; Orientation: Reverse
//                         Sequence Type: Read; Sequence Name: 0; Position: 3975; Orientation: Reverse
//                         Chromosome: chr21

I'm confused by this string:
// Reference\tm2257/8161/CCS\t41972616\tForward\tRead \t0\t2294\tForward\tchr21
It should consist of breakend1, breakend2 and the read name it was detected from. However, the read name here is chr21 and the reference chromosome of breakend1 is m2257/8161/CCS\t41972616. Those are swapped but I don't immediately see why 😕


These output is coming from:
iGenVar/src/detect_breakends/junction_detection.cpp
and are built in:
iGenVar/include/junction.hpp lines 41 to 46:

template <typename stream_t>
inline stream_t operator<<(stream_t && stream, junction const & junc)
{
    stream << junc.get_mate1() << '\t' << junc.get_mate2() << '\t' << junc.get_read_name();
    return stream;
}

iGenVar/include/breakend.hpp lines 35 to 43:

template <typename stream_t>
inline stream_t operator<<(stream_t && stream, breakend const & b)
{
    stream << ((b.seq_type == sequence_type::reference) ? "Reference" : "Read ") << '\t'
           << b.seq_name << '\t'
           << b.position  << '\t'
           << ((b.orientation == strand::forward) ? "Forward" : "Reverse");
    return stream;
}

Probably there is a mixup in the passing of chromosome and read in `retrieve_aligned_segments` or `analyze_cigar`.
@Irallia Irallia added the bug Something isn't working label Feb 8, 2021
@eldariont eldariont self-assigned this Feb 8, 2021
@Irallia
Copy link
Collaborator Author

Irallia commented Feb 9, 2021

I found the problem. I made a mix up, when I changed the order of the analyze_cigar() parameters. I can open a PR for it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants