Champion-Lab / PrIntMap-R

https://championlab.shinyapps.io/printmap-r/
MIT License
8 stars 3 forks source link

Loading some PEAKS exported CSV files fails because the test in check_file() doesn't consider enough characters #20

Closed AnotherKiwi closed 1 month ago

AnotherKiwi commented 6 months ago

Trying to open some CSV files exported by PEAKS fails because of the following code block in check_file(): if(search_engine == "PEAKS") { if(!any(store1[1:15] ==",")){ stop("For the search software PEAKS, the expected file type is .csv") }

Some PEAKS output CSV files start with "Protein Group","Accession",etc in which the first comma occurs in position 16, meaning that PrintMap-R stops with the message about the file not being a CSV file. Changing the test for a comma to if(!any(store1[1:30] ==",")) prevents this from happening. The files then load successfully and PrintMap-R works as expected.

Please make the suggested change to check_file().

Thanks Stephen