C. Titus Brown
C. Titus Brown
On Thu, Feb 03, 2022 at 09:08:10AM -0800, Tessa Pierce Ward wrote: > Ah, just noticed that the output csv from `prefetch` contains info computed from the flattened mh by...
well bummer now I need this... 😆
(and have not implemented it)
adding this as trial functionality over in https://github.com/dib-lab/sourmash-slainte/pull/13, in script `calc-weighted-overlap.py`
I turned `calc-weighted-overlap.py` into a plugin in https://github.com/sourmash-bio/sourmash/issues/2970, which nicely addresses this issue for now. In the future, we should integrate the functionality from that script into `PrefetchResult` objects!
`manysearch` from the branchwater plugin now calculates this information, too.
I think this will happen naturally as long as we pay attention to the Python tests; there are a lot of tests for corner cases at fairly high API levels...
and here's some code: ``` import csv class ContainmentToANI_Converter: def __init__(self, tablefile): with open(tablefile, newline="") as fp: r = csv.DictReader(fp) vals = [] for row in r: highbound = float(row['highContainment'])...
(here's the file for k=21 suitably modified for the code above) [mean-containment-k21-to-ANI.csv](https://github.com/sourmash-bio/sourmash/files/8172814/mean-containment-k21-to-ANI.csv)