Skip to content

unique feature IDs for ConsensusMaps and everything else [21] #21

Closed

Description

@timosachsenberg

Submitted by OpenMS Retreat on 2009-10-07 13:46:19

  • Problem: reordering an input featureMap internally and storing a CM will not produce correct id's in the CM which refers to the untouched FM
  • Solution:
    • Feature UID: Zufalls-Size + Datum eindeutig in Datei => (map,id) unique within consensusxml
    • new member "Size id_" for each Feature
      • preserved when sorting, filtering and in file I/O
      • id is initialized to -1 (=invalid) by default, -1 not accepted upon write to file
    • "Size FeatureMap::indexToId(Size)", converts UIDs to index within vector and which checks back whether hash was valid
    • "FeatureMap::assignIDs(String method)" e.g. override
    • UIDServer for local use, unique within a run

Commented by groepl on 2009-10-07 15:56:56:
Mixed remarks .......

New classes: UniqueIdGenerator; UniqueIdInterface, UniqueIdIndexer

UniqueIdGenerator uses current Date and Time for initialization of a gsl random number generator. Unique ids are UInt64. Class tests and TOPP tests use a fixed moment in time for initialization for reproducible results (TOPPBase, ClassTest).

UniqueIdInterface and UniqueIdIndexer are designed as base classes.

FileConverter supports ConsensusXML to FeatureXML conversion.
Identifications are okay, groups are lost.

New UTIL UniqueIdAssigner can be used to assign new unique ids to ConsensusXML and FeatureXML (with options).

Invalid unique id is represented by 0, not Size(-1).

Sorting and filtering is no longer an issue :-)

File I/O is implemented.

However some xml schema changes are necessary. As for now (20009-10-07) both schemas have version 1.3 but were modified illegally ;-). To do: new versions 1.4 and revert 1.3 to their state of OpenMS 1.5.

Note that the containers have a unique id as well.
This interferes with the lsid approach.
Thus at the container level, the attribute name "unique_id" is used.
At the element level, the name is "id". That's kind of weird.

ConsensusXML uses the old approach internally to link from feature handles to the map list. We cannot use the unique id of the file because "labeled" methods will have the same file with different labels in their map list.

Unique ids are inconsistently written with a prefix (f_12345) or without (12345), depending on the circumstances. Sigh! In the schemas, its always an xs:string.

Note that there are cases when a unique id of a consensus feature is reused for a feature (e.g. FileConverter). In this case, the prefix will change.


Commented by andreas_bertsch on 2009-10-28 16:02:49:

  • fix windows test
  • fix warnings

Commented by aiche on 2009-11-16 08:42:54:
Is there any update on this issue ..


Commented by groepl on 2009-11-16 21:36:52:
XML Schema versions 1.4 for ConsensusXML and FeatureXML were added, and the 1.3 versions were reverted to the state of revision 4231.

Invalid UniqueIds are reported to LOG_INFO but tolerated by store().
That was necessary to deal with older files.

The test on Vista 64 Bit was fixed by Chris. Somehow UInt64 is not parsed correctly by this operating system, so he wrote a hand-crafted solution.

There are at least three related concepts. Attribute names have changed since last posting:

  • unique ids (attribute name in OpenMS: "id" or "unique_id")
  • ids as specified by W3C, xml:id or xs:id (attribute name in OpenMS: "id", maybe other names)
  • lsid, life science identifiers (attribute name in OpenMS: "document_id")

We had to use unique_id within ConsensusXML to remain downward compatible. See xml schema version 1.4.

Usage of UniqueIdAssigner is recommended!

Activity

  1. added a commit that references this issue on Sep 15, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions