wkumler / RaMS

R-based access to Mass-Spectrometry data
Other
20 stars 7 forks source link

Warning message: xmlSAX2Characters: huge text nod #31

Closed wkumler closed 5 months ago

wkumler commented 5 months ago

Found this error while trying to open direct injection DOM data in RaMS. Makes sense because the single node (accumulation across the entire time of the direct injection) is basically the entire 100MB file. Apparently it's DoS protection but hopefully the MS files are trustworthy.

wkumler commented 5 months ago

The solution is to pass options="HUGE" to the read_xml internally. I have no plans to implement this into the package directly unless someone complains because the code is open-source and can be easily edited and recompiled.

In R/grabMzmlFunctions (or MzxmlFunctions, probably) change

xml_data <- xml2::read_xml(filename)

to

xml_data <- xml2::read_xml(filename, options="HUGE")