Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

inconsistent ms scores #1146

Closed
xinehc opened this issue Jan 8, 2024 · 4 comments
Closed

inconsistent ms scores #1146

xinehc opened this issue Jan 8, 2024 · 4 comments
Labels

Comments

@xinehc
Copy link

xinehc commented Jan 8, 2024

Hi,

When aligning a sequence to an augmented reference database I got a different ms, I wonder does ms depend on tp?

One reference seq:

minimap2 -cx map-ont one.fa query.fa
[M::mm_idx_gen::0.001*5.95] collected minimizers
[M::mm_idx_gen::0.002*4.99] sorted minimizers
[M::main::0.002*4.98] loaded/built the index for 1 target sequence(s)
[M::mm_mapopt_update::0.002*4.79] mid_occ = 10
[M::mm_idx_stat] kmer size: 15; skip: 10; is_hpc: 0; #seq: 1
[M::mm_idx_stat::0.002*4.63] distinct minimizers: 1848 (100.00% are singletons); average occurrences: 1.000; average spacing: 5.411; total length: 10000
SRR23690005.810506	4901	0	4887	+	NZ_CP060632.1_2416720-2426719:-	10000	1879	6750	4751	4890	60	NM:i:139	ms:i:8942	AS:i:8934	nn:i:0	tp:A:P	cm:i:676	s1:i:4011	s2:i:0	de:f:0.0268	rl:i:0	cg:Z:68M2I31M1I1203M1I1788M1D266M4I33M3I208M1D81M1I311M1I323M1I134M2I233M1D1M2I4M1I184M

Two reference seqs:

minimap2 -cx map-ont two.fa query.fa
[M::mm_idx_gen::0.004*3.47] collected minimizers
[M::mm_idx_gen::0.005*3.31] sorted minimizers
[M::main::0.005*3.31] loaded/built the index for 2 target sequence(s)
[M::mm_mapopt_update::0.005*3.22] mid_occ = 10
[M::mm_idx_stat] kmer size: 15; skip: 10; is_hpc: 0; #seq: 2
[M::mm_idx_stat::0.006*3.15] distinct minimizers: 2397 (45.06% are singletons); average occurrences: 1.549; average spacing: 5.385; total length: 20000
SRR23690005.810506	4901	0	4887	+	CABOHD010000001.1_23218-33217:-	10000	257	5129	4847	4891	60	NM:i:44	ms:i:7856	AS:i:9504	nn:i:0	tp:A:P	cm:i:842	s1:i:4700	s2:i:4011	de:f:0.0074	rl:i:0	cg:Z:67M1I4M1D2M2I1229M1I1788M1D266M4I33M3I208M1D81M1I311M1I323M1I134M2I233M1D1M2I4M1I184M
SRR23690005.810506	4901	0	4887	+	NZ_CP060632.1_2416720-2426719:-	10000	1879	6750	4751	4890	0	NM:i:139	ms:i:2916	AS:i:8934	nn:i:0	tp:A:S	cm:i:676	s1:i:4011	de:f:0.0268	rl:i:0	cg:Z:68M2I31M1I1203M1I1788M1D266M4I33M3I208M1D81M1I311M1I323M1I134M2I233M1D1M2I4M1I184M

AS, de and cg are all identical.

Here are the sequences:
example.zip

@lh3
Copy link
Owner

lh3 commented Jan 8, 2024

tp is determined by ms

@lh3 lh3 closed this as completed Jan 8, 2024
@lh3 lh3 added the question label Jan 8, 2024
@xinehc
Copy link
Author

xinehc commented Jan 8, 2024

thanks for the explanation, but why ms dropped from 8942 to 2916 even if the two alignments can be seen as identical? Is this a feature of ms?

@lh3
Copy link
Owner

lh3 commented Jan 8, 2024

Oh, I missed that. Will have a look.

@lh3 lh3 reopened this Jan 8, 2024
@lh3 lh3 closed this as completed in fcd4df2 Mar 11, 2024
@lh3
Copy link
Owner

lh3 commented Mar 11, 2024

Fixed. Thanks for the example. This is an oversight I have missed for three years.

@lh3 lh3 added bug and removed question labels Mar 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants