-
Notifications
You must be signed in to change notification settings - Fork 14
Open
Description
Hey Joshua,
I am afraid that the linearcode.dumps() function might have inconsistency with the linear code rule.
For example, if we have a glycan as below:
RES
1b:x-dglc-HEX-1:5
2s:n-acetyl
3b:b-dglc-HEX-1:5
4s:n-acetyl
5b:b-dman-HEX-1:5
6b:a-dman-HEX-1:5
7b:a-dman-HEX-1:5
8b:a-dman-HEX-1:5
9b:a-dman-HEX-1:5
LIN
1:1d(2+1)2n
2:1o(4+1)3d
3:3d(2+1)4n
4:3o(4+1)5d
5:5o(3+1)6d
6:5o(6+1)7d
7:7o(3+1)8d
8:7o(6+1)9d
We should get 'Ma3(Ma3(Ma6)Ma6)Mb4GNb4GN?'
But the dumps() returns 'Ma6(Ma3)Ma6(Ma3)Mb4GNb4GN?'.
I believe it only needs a slight modification. When the code traverses the glycan, it need sort the glycan.index descendingly to make the monosaccharide with the highest linkage-index go first.
Metadata
Metadata
Assignees
Labels
No labels