Skip to content

samtools 1.15 become very slow when I set maxcnt to 8,000,000 #1654

Open
@ymcki

Description

@ymcki

I want to use samtools to handle extremely high depth data. So I changed
iter->maxcnt = 8000;
in sam.c to 8000000.
Then it becomes very slow that it becomes not unusable.
I changed the same place in samtools 1.12 and it works like a charm.
Upon doing some debugging and compare the differences between 1.12 and 1.15,
I noticed that
ks_introsort(node, tv->n_nodes, tv->aux);
in bam_lpileup.c of 1.12 is replaced by
splaysort(node, tv->n_nodes, tv->aux);
in 1.15. After rename splaysort with
ks_introsort, 1.15 works as expected.

So my conclusion is that splaysort doesn't work
when maxcnt is large. Is this a bug or is it expected?
Why was ks_introsort replaced by splaysort in 1.15?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions