Skip to content

Relative abundance of unmapped is negative #256

@LukCR

Description

@LukCR

Hi,
Thanks in advance for this amazing tool. I am using coverm to calculate the relative abundance of my MAGs.

I am running into something that confused me a bit, the command I used was this:

coverm genome -b 13.mapped.bam -d dereplicated_genomes/rename13 -x fa -o bin_abund_13.tsv -m relative_abundance

The log for this is the following:

[2025-06-29T00:06:29Z INFO coverm::genome] Of 4085 reference IDs, 3556 were assigned to a genome and 529 were not
[2025-06-29T00:11:58Z INFO coverm::genome] In sample '13.mapped', found 23188520 reads mapped out of 20083103 total (115.46%)

What confused me was the fact that there were more reads found than the total of reads. Then in the tsv file, I got this:

Genome 13.mapped Relative Abundance (%)
unmapped -15.462828
Nuevo13.bin.1.10 1.9023643
Nuevo13.bin.1.103 0.6393372

I noticed the negative value is the same excedent from the reads found, (-15.46%, 115.46%).

Is this due to a mistake I made in the mapping? or is normal

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions