Configure External Tool Custom Report to Use .tsv?

support
Configure External Tool Custom Report to Use .tsv? philip remes  2022-09-19 16:10
 

I have an external tool configured according to the nice documentation in https://skyline.ms/_webdav/home/software/Skyline/@files/docs/Skyline External Tools-2_1.pdf. The custom report has the Raw Times and Raw Intensities columns defined, which use comma delimited lists. It is more convenient to parse this report with tab delimiting, allowing to parse the Raw Times lists easily: the alternative I've found is to use regular expressions to tell the difference between the commas for columns and the commas in the Raw Times, and this is orders of magnitude slower than a simple line.Trim().Split('\t'). Therefore I'd like to request some way to specify the delimiting of these external reports, either in the tool.properties files, or else in the custom report .skyr file itself.

Thanks
Philip

 
 
Nick Shulman responded:  2022-09-20 14:19
There is no way to change the format of the report that is fed to an external tool.

Which language are you writing your tool in?

It is usually a good idea to use a library to parse CSV files, because it's tricky to get the parsing rules correct in all cases, especially when fields might contain newlines. (I don't think you're likely to have a newline in the middle of any of the fields that you are working with, but it's theoretically possible).
-- Nick
 
philip remes responded:  2022-09-20 14:39
I'm using C#. Can you recommend a good library to use?

~P
 
Nick Shulman responded:  2022-09-20 14:44
The consensus seems to be that for C# you should use the class "TextFieldParser" in "Microsoft.VisualBasic.dll" which works fine in C# despite its name:
https://stackoverflow.com/questions/2081418/parsing-csv-files-in-c-with-header

-- Nick
 
philip remes responded:  2022-09-20 15:07
That library works great! Very fast on the .csv files, very easy to use. I had tried this regex solution FYI, don't do this.

https://stackoverflow.com/questions/18893390/splitting-on-comma-outside-quotes

Thanks
Philip