sourmash icon indicating copy to clipboard operation
sourmash copied to clipboard

document containment direction for `compare` (and standardize for containment ani)

Open bluegenes opened this issue 1 year ago • 1 comments

When running sourmash compare, the matrix will be asymmetric. But which direction is which? And is it the same for containment and containment-ani?

Based on code here: https://github.com/sourmash-bio/sourmash/blob/latest/src/sourmash/compare.py#L75-L90

For --containment, we do containments[i][j] = siglist[j].contained_by(siglist[i]) while for --containment-ani, we do siglist[j].containment_ani(siglist[i])

...which will give accurate values for each but populate the matrix in opposite directions (ref #2193) This directional change will likely be fixed by changes for #2193, but we should document the final shared direction.

Sticking with the --containment direction, with i=row, j=col, the matrix will be the column genome contained by the row genome.

bluegenes avatar Aug 09 '22 17:08 bluegenes

see also #1835 😁

ctb avatar Aug 09 '22 17:08 ctb