KwanLab / Autometa

Autometa: Automated Extraction of Genomes from Shotgun Metagenomes
https://autometa.readthedocs.io
Other
40 stars 15 forks source link

:bug:🪲 Prevent edge case where MAG completeness is incorrectly computed #255

Open evanroyrees opened 2 years ago

evanroyrees commented 2 years ago

Prevent edge case where MAG completeness will be incorrectly computed. This occurs when all single-copy markers are not represented in the respective metagenome assembly. This causes the reference_markers_count value to be lower than its actual count, thereby incorrectly increasing the completeness estimation.

The MAG QA metrics of completeness will be incorrectly assessed if not all of the single-copy markers are represented at least once in the overall metagenome marker annotation

https://github.com/KwanLab/Autometa/blob/f00e67de2869d4ac90226e8a15cabbc7c427b7d3/autometa/binning/utilities.py#L159