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

Error prettry print suffix xclip or yclip #47

Open
kwuiee opened this issue Jun 15, 2023 · 2 comments · May be fixed by #63
Open

Error prettry print suffix xclip or yclip #47

kwuiee opened this issue Jun 15, 2023 · 2 comments · May be fixed by #63
Assignees

Comments

@kwuiee
Copy link

kwuiee commented Jun 15, 2023

When xclip or yclip is suffix, pretty print gives wrong sequence, the problem lies in src/alignment.rs file where you should skip x_i and y_i bases before actual clip sequence, I think, like below

图片

@dcroote
Copy link
Contributor

dcroote commented Jun 18, 2023

Thanks for raising this issue @kwuiee. Do you have a simple test case for reproducing it? We could then use the test case in our CI test suite along with the fix.

@kwuiee
Copy link
Author

kwuiee commented Jun 20, 2023

The following should do @dcroote, aligning TCGC against ATCG

 let alignment = Alignment {
    score: -7,
    ystart: 1,
    xstart: 0,
    yend: 4,
    xend: 3,
    ylen: 4,
    xlen: 4,
    operations: vec![Yclip(1), Match, Match, Match, Xclip(1)],
    mode: AlignmentMode::Custom,
};
let pretty = concat!(" TCGC\n ||| \nATCG \n\n\n");
assert_eq!(alignment.pretty(b"TCGC", b"ATCG", 100), pretty);

@dcroote dcroote self-assigned this Jul 14, 2023
@dcroote dcroote linked a pull request Jul 14, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants