Skip to content

merge gives warning on unsorted output but header says it is sorted #2159

Description

@fgvieira

Are you using the latest version of samtools and HTSlib? If not, please specify.

Yes (v1.21)

Please describe your environment.

  • OS: Linux 4.18.0-553.16.1.el8_10.x86_64
  • machine architecture: x86_64
  • compiler: gcc (GCC) 8.5.0 20210514 (Red Hat 8.5.0-22)

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

When merging several BAM files with different headers, I get the warning message:

[bam_merge_core] Order of targets in file FILE1.bam caused coordinate sort to be lost

but the header of the output file still says it is sorted:

@HD     VN:1.5	SO:coordinate
[...]

shouldn't it be?

@HD     VN:1.5	SO:unsorted
[...]

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