Skip to content

missunderstanding of -p and -N options #1354

Description

@mariabernard

Hello,

I am playing with -p option to limit the number of secondary alignment to those that have the same alignment score:

minimap2 -ax map-ont GCF_002863925.1_EquCab3.0_genomic.mmi test.fastq > test_default.sam
minimap2 -p 1.0 -ax map-ont GCF_002863925.1_EquCab3.0_genomic.mmi test.fastq > test_p1.sam
minimap2 -p 0 -ax map-ont GCF_002863925.1_EquCab3.0_genomic.mmi test.fastq > test_p0.sam
minimap2 -p 0 -N5 -ax map-ont  GCF_002863925.1_EquCab3.0_genomic.mmi test.fastq > test_p0_N5.sam
  • Default setting (-p 0.8) and -p1 give the same results
f3bdc742-6667-4b62-85ea-8edc42d1218c	0	NW_019643253.1	154	0	121M1S	*	0	0	GCT...CGA NQN...KFD	NM:i:0	ms:i:242	AS:i:242	nn:i:0	tp:A:P	cm:i:20	s1:i:110	s2:i:110	de:f:0	rl:i:0
f3bdc742-6667-4b62-85ea-8edc42d1218c	256	NW_019643246.1	2461	0	121M1S	*	0	0	*	*	NM:i:0ms:i:242	AS:i:242	nn:i:0	tp:A:S	cm:i:20	s1:i:110	de:f:0	rl:i:0
f3bdc742-6667-4b62-85ea-8edc42d1218c	272	NW_019643250.1	3054	0	1S121M	*	0	0	*	*	NM:i:0ms:i:242	AS:i:242	nn:i:0	tp:A:S	cm:i:20	s1:i:110	de:f:0	rl:i:0
f3bdc742-6667-4b62-85ea-8edc42d1218c	272	NW_019645690.1	3623	0	1S121M	*	0	0	*	*	NM:i:0ms:i:242	AS:i:242	nn:i:0	tp:A:S	cm:i:20	s1:i:110	de:f:0	rl:i:0
f3bdc742-6667-4b62-85ea-8edc42d1218c	272	NW_019643245.1	6918	0	1S121M	*	0	0	*	*	NM:i:0ms:i:242	AS:i:242	nn:i:0	tp:A:S	cm:i:20	s1:i:110	de:f:0	rl:i:0
f3bdc742-6667-4b62-85ea-8edc42d1218c	256	NC_009174.3	1	0	24S55M1D42M1S	*	0	0	*	*	NM:i:1	ms:i:188	AS:i:188	nn:i:0	tp:A:S	cm:i:14	s1:i:85	de:f:0.0102	rl:i:0

This give me 6 alignements 1 primary and 5 secondary. 4 of them seems to be equivalent same ciga, same AS.
But the last one as AS=188 and chain score s2=85, compare to the primary alignment AS=242 and s1=110.

even with -p 0.8 (default value), why this last alignment is returned ? secondary-to-primary score give ~77% (on AS or on s1).

  • p0 and p0 & N5 give ce same results
    We could expect that as the default value of N is 5, but in that cas minimap2 returned à 6th alignment which indeed is woorst in terms of chain score, s1=83 compare to s1 =110 (or 85).
f3bdc742-6667-4b62-85ea-8edc42d1218c	272	NC_009146.3	X	0	1S103M1I9M8S	*	0	0	*	*	NM:i:3	ms:i:206	AS:i:206	nn:i:0	tp:A:S	cm:i:14	s1:i:83	de:f:0.0265	rl:i:0

So I am not sure to understand how -p and -N work?
Is there any possibility to return only "equivalent best alignments" ?

Kind regards

Maria

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