You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to do a SW alignment and get both a score, and a cigar as output. I have tried the following two methods using the latest pip installed version of parasail-python:
It seems that with the first method, using ssw, I can get the score but can't get the cigar in the standard format (instead, printing result.cigar.decode gives error message "AttributeError: 'numpy.ndarray' object has no attribute 'decode'"). Using the sw_trace method I can get the decoded cigar, but not the score? Is it possible to access the decoded cigar (the number 5447 doesn't mean anything to me? How should I interpret it?) in ssw?
The text was updated successfully, but these errors were encountered:
I had to go back and remind myself why I wrote the ssw python routine. The parasail C library has a parasail_ssw routine that tries to mimic the SSW library using parasail routines. It returns a specific kind of result (parasail_result_ssw). The SSW C library has this comment on their C struct:
@field cigar best alignment cigar; stored the same as that in BAM format, high 28 bits: length, low 4 bits: M/I/D (0/1/2);
cigar = 0 when the best alignment path is not available
@field cigarLen length of the cigar string; cigarLen = 0 when the best alignment path is not available
I did not provide any user-friendly decode of the raw binary cigar from the python wrapper. It might be slower than a C equivalent, but you can write one in Python like so:
I want to do a SW alignment and get both a score, and a cigar as output. I have tried the following two methods using the latest pip installed version of
parasail-python
:which yields
It seems that with the first method, using
ssw
, I can get the score but can't get the cigar in the standard format (instead, printingresult.cigar.decode
gives error message "AttributeError: 'numpy.ndarray' object has no attribute 'decode'"). Using thesw_trace
method I can get the decoded cigar, but not the score? Is it possible to access the decoded cigar (the number 5447 doesn't mean anything to me? How should I interpret it?) inssw
?The text was updated successfully, but these errors were encountered: