MrOlm / inStrain

Bioinformatics program inStrain
MIT License
145 stars 33 forks source link

missing mean clonality in genomeWide_scaffold_info.tsv #4

Closed palomo11 closed 4 years ago

palomo11 commented 4 years ago

Hi,

I just realised than in some cases the mean clonality value is missing in genomeWide_scaffold_info.tsv. This thing seems to happen in populations with one or more scaffolds having 0 conANI, 0 consensus_SNP, and 0 unmaskedBreadth in the scaffold_info.tsv file. In those scaffolds the mean_clonality | median_clonality | mean_microdiversity | median_microdiversity columns are empty in the scaffold_info.tsv file.

Maybe one solution is to take only into account those scaffolds with coverage > 5, or unmaskedBreadth > 0.5 for the mean clonality calculation?

MrOlm commented 4 years ago

Hello,

Thank you for pointing this out to me. I've introduced a fix in version 1.2.1 whereby NaN values are replaced by 0s, which should fix this problem. If it persists for you please let me know with a specific example and I will perform a more robust fix.

Thank you again, Matt