RagnarGrootKoerkamp / astar-pairwise-aligner

A pairwise sequence aligner written in Rust
Mozilla Public License 2.0
117 stars 11 forks source link

save cigar string #15

Closed RagnarGrootKoerkamp closed 1 year ago

RagnarGrootKoerkamp commented 2 years ago

write edit distances and cigar strings to a file, similar to wfa

AndreaGuarracino commented 2 years ago

Also an output in PAF format would be quite polite.

RagnarGrootKoerkamp commented 2 years ago

Hmm, what information could I store in there? https://github.com/lh3/miniasm/blob/master/PAF.md

It seems to be useful for mapping only, and pretty much useless for global alignment. It doesn't contain the alignment score and also not the cigar string, which are the only 2 useful pieces of output I have.

AndreaGuarracino commented 2 years ago

After the first 12 columns, the PAF format is a bit wild. Aligners usually put each piece of information in a dedicated column. The CIGAR string becomes cg:Z:3=1X14=1X5=4X1....

But agreed that it is not fundamental. I use scripts that take the output of WFA (query length, target length, score, CIGAR string) and write them in a PAF-like row.

RagnarGrootKoerkamp commented 1 year ago

The binary supports this now via --output file.csv which has one line of the form {cost},{cigar} per input pair.