thomasp85 / mzID

An mzIdentML parser for R
6 stars 3 forks source link

Support for mzIdentML 1.0 #1

Closed lgatto closed 11 years ago

lgatto commented 11 years ago

The namespace used to parse the mzid file is hard coded in the mzID constructor. Would it be possible to (1) add support for mzIdentML 1.0 and, if yes, (2) implement a mechanism to detect the version automatically by extracting the information from the xml file?

thomasp85 commented 11 years ago

That should indeed be possible - I did think about putting in some more error checking and version control at some point.

Any comment on the chosen structure of the mzID class is also appreciated...

Best

Thomas

Den 01/05/2013 kl. 21.11 skrev Laurent Gatto notifications@github.com:

The namespace used to parse the mzid file is hard coded in the mzID constructor. Would it be possible to (1) add support for mzIdentML 1.0 and, if yes, (2) implement a mechanism to detect the version automatically by extracting the information from the xml file?

— Reply to this email directly or view it on GitHub.

thomasp85 commented 11 years ago

The new version now fetches the namespace directly from the file and does a version check. At the moment everything except 1.1.x will throw a warning until I have investigated whether 1.0.0 files will break anything... Do you have access to some old files under the old schema for testing?

lgatto commented 11 years ago

Looks good! Going to send you an mzID version 1.0 generated with Mascot 2.3.02.

thomasp85 commented 11 years ago

The main problem is that the root node is called mzIdentML instead of MzIdentML. I have replaced all roots in the xpaths with * and hopes this ambiguity doesn't cause any trouble. Furthermore the Peptide evidences are stored in a different place, so I look there if it is not found in the normal 1.1.0 place. Also the modification list is slightly different.

The parser can now import the file you send me (have kept the warning for now) - you are welcome to try it on some different 1.0.0 files if you have them, to see if any errors arise.

lgatto commented 11 years ago

Yes, v 1.0 and 1.1 are different - it is not a trivial work to support both. I will pull the latest changes and test with 1.0 files. Thanks!

thomasp85 commented 11 years ago

Have you had any success reading some v1.0 files - can the package be said to be mzIdentML 1.0 compliant? : )

lgatto commented 11 years ago

Sending a pull request...