Skip to content

segfault using --score-N option for ambiguous nucleotide score #1226

Open
@nrizzo

Description

@nrizzo

Hi! I am testing minimap2 (69e3629) with base alignment on a hard masked reference and trying to penalize the matching of Ns. I discovered that choosing --score-N values of 13 or higher results in a segfault:

./minimap2 --score-N 13 -a test/MT-human.fa test/MT-orang.fa > test.sam
[M::mm_idx_gen::0.005*0.96] collected minimizers
[M::mm_idx_gen::0.007*0.81] sorted minimizers
[M::main::0.007*0.81] loaded/built the index for 1 target sequence(s)
[M::mm_mapopt_update::0.007*0.82] mid_occ = 10
[M::mm_idx_stat] kmer size: 15; skip: 10; is_hpc: 0; #seq: 1
[M::mm_idx_stat::0.007*0.82] distinct minimizers: 3111 (100.00% are singletons); average occurrences: 1.000; average spacing: 5.326; total length: 16569
Segmentation fault (core dumped)

Also, it is unclear to me if --score-N defines a bonus or a penalty from reading the man page and this closed issue, but looking at the source code it seems that positive --score-N values get turned into negative values, so it is always a score penalty, right? Also, the score matrix accepts int8 values, so scores should only be in the range [-128,127]! Can you confirm this? Thank you in advance.

Best,
~Nicola

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