parasail icon indicating copy to clipboard operation
parasail copied to clipboard

parasail_aligner: NW - output all best alignments

Open psheth-twist opened this issue 3 years ago • 2 comments

Using parasail_aligner with NW: nw_trace_scan_64 REF: GAACACGAGTGCCTTGAATAACAAGTTCGAACGATGGTTATTAATCCTAATAACGGAACGCTAAGTCCATTACCAAGGAGTGCGATGCAGTCTGGAGGATGAGTCTGACGGAGTGTAACTCGATCAGTCGTTATTCTCTCGCCAGCACTG QRY: GACACGAGTGCCTTGAATAACAAGTTCGAACGATGGTTATTAATCCTAATAACGGAACGCTAAGTCCATTACCAAGGAGTGCGATGCAGTCTGGAGGATGAGTCTGACGGAGTGTAACTCGATCAGTCGTTATTCTCTCGCCAGCACTG

the qry has two possible best alignments with the same score (either ref position 0-base indexed position 1 or position 2 deleted)

How can we output either all alignments with the best score OR recognize that more than 1 alignment with this best score is possible?

Thanks!

psheth-twist avatar Mar 11 '21 17:03 psheth-twist

biopython.pairwise2 is able to show both tracebacks possible with the best score

psheth-twist avatar Mar 11 '21 20:03 psheth-twist

🤔 Hmm. From the very beginning of parasail development, I didn't consider capturing more than just 1 alignment. I know other tools and libraries support this (I'm thinking of SSW, for example). Capturing more than one possible alignment would be a brand new feature for parasail; it's not trivial to implement. I think what it does currently is attempt to return the longest alignment if there would be ambiguity between two identical-score alignments.

jeffdaily avatar Mar 11 '21 21:03 jeffdaily