Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Support for mzTab v1.0 in readMzTabData and writeMzTabData #41
In order to further adoption of the new file format in R workflows, it would be very useful if
A small clarification regarding your issue - the 4 files that do not work are those that encode small molecules (
In the frame of the
@sneumann mentioned that he had plans to work on an updated parser for version 1.0 and move it the
It seems to me that the problems of "reading in mzTab files" and "fitting the contents of mzTab files into an MSnSet object" are slightly different. So I think that readMzTabData should be constructed to read any mzTab file, storing the results as a list of data frames or data tables. Then conversion to
Here's a simple(ish) implementation that works on all the 12 example files. It's fast (took 0.3 seconds to read the largest example file on a three year old laptop) due to the use of
I've kept the code fairly simple since there are some design decisions to be made, especially about what to do with malformed files.
For example, if there are multiple instances of PRT block, should you throw an error, warn the user, or silently read the file concatenating the blocks?
How about if there unknown line identifiers ("ZZZ" or whatever), or commas rather than tabs for delimiting fields? Clearly there are lots of things that could go wrong, and I don't know if there is an official way to proceed, or if you have preferences one way or another. In general it is good practice to read anything (but be strict about the spec when writing).
Anyway, here's the code. Let me know if you think it's worth pursuing further.
though these will obviously go in the package imports once it's done properly. This looks long, but it's mostly comments.
Apologies for taking ages to get back to you. I have adapted your suggestion into
I have also not included the CV parameter parsing at this stage. The
I have added you as a contributor - I hope don't mind and let me know if you prefer otherwise.
To conclude this discussion, I have now added