Skip to content

Samtools coverage incorrectly prints coverage when Bam not sorted #2242

Description

@Ge0rges

Are you using the latest version of samtools and HTSlib? IYes

Please specify the steps taken to generate the issue, the command you are running and the relevant output.

When running samtools coverage on a non-sorted BAM or SAM, while a short error line is printed, the command also prints out a coverage table. The error can be interpreted as a warning given that the program seems to execute correctly. The program should not print a coverage table and instead either only print the error, or additionally print a "You must sort " error. This led me to think my mapping was failing for a long while before realizing sortedness was a requirement. Especially since this requirement is also not noted in the docs.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions