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

How to use the traceback for alignment visualization? #73

Open
goodez opened this issue Oct 13, 2023 · 1 comment
Open

How to use the traceback for alignment visualization? #73

goodez opened this issue Oct 13, 2023 · 1 comment

Comments

@goodez
Copy link

goodez commented Oct 13, 2023

Is it possible to visualize the output of a traceback alignment as seen in C version? See below:

image

For reference I'm running this alignment:
result = parasail.sw_trace(seq1, seq2, 5, 1, parasail.blosum62)

What can I do with result.traceback to visualize the alignment?

@jeffdaily
Copy link
Owner

The C function prints to stdout and that didn't seem correct to me to do from python. You weren't getting a python string back to manipulate on your own, or what if you wanted to print that output to something other than the console?

The result.traceback attribute has the properties query, comp, and ref. That should correspond to the 3 character sequences in your sample above. But of course these aren't formatted like that. I agree it would be nice to have similar output like that from python, but written in pure python using the 3 traceback character sequences and outputting to a user-specified output buffer, defaulting to sys.stdout. I would accept a PR. I don't have a ton of time to work on this these days, but I'll keep this issue as a feature request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants