Closed LipidAnalysis closed 3 years ago
Hi
It seems you are following the README. I agree it's not very clear, but when running the example code you should edit the line folder_to_stode_priopriatary_code = "/home/matteo" because /home/matteo is just some example folder, and you should replace it with somewhere where you will store the binary (any folder will do, as long as it exists and is writable)
...and that seems to be the error you're getting.
Thank you for your response! I tried to download the file manually and run the following codes successfully, but the problem in the example still exists. I think the error occurs because your code in line 470 in "opentimsr/R/opentimsr.R" file is not correct. I searched the github and found that the url of timsdata.dll is not "raw/main" but "tree/main". I am not completely sure I am right, but I think you can check it out.
OK, just to understand it then now:
matteo@pinguin:~$ wget https://github.com/MatteoLacki/opentims_bruker_bridge/raw/main/opentims_bruker_bridge/libtimsdata.so --2021-06-30 13:42:29-- https://github.com/MatteoLacki/opentims_bruker_bridge/raw/main/opentims_bruker_bridge/libtimsdata.so Resolving github.com (github.com)... 140.82.121.3 Connecting to github.com (github.com)|140.82.121.3|:443... connected. HTTP request sent, awaiting response... 302 Found Location: https://raw.githubusercontent.com/MatteoLacki/opentims_bruker_bridge/main/opentims_bruker_bridge/libtimsdata.so [following] --2021-06-30 13:42:29-- https://raw.githubusercontent.com/MatteoLacki/opentims_bruker_bridge/main/opentims_bruker_bridge/libtimsdata.so Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 185.199.108.133, 185.199.110.133, 185.199.109.133, ... Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|185.199.108.133|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 18668200 (18M) [application/octet-stream] Saving to: ‘libtimsdata.so.1’
libtimsdata.so.1 100%[======================================================================================================>] 17.80M 8.23MB/s in 2.2s
2021-06-30 13:42:31 (8.23 MB/s) - ‘libtimsdata.so.1’ saved [18668200/18668200]
Can you provide more information about your R session please? When in R write: sessionInfo()
and paste us the output.
Hi! 1 It does work when I download the file manually. 2 The code is shown below
> if(accept_Bruker_EULA_and_on_Windows_or_Linux){
+ folder_to_stode_priopriatary_code = "/home/matteo"
+ path_to_bruker_dll = download_bruker_proprietary_code(folder_to_stode_priopriatary_code)
+ setup_bruker_so(path_to_bruker_dll)
+ all_columns = c('frame','scan','tof','intensity','mz','inv_ion_mobility','retention_time')
+ } else {
+ all_columns = c('frame','scan','tof','intensity','retention_time')
+ }
[1] "Detected Windows. Like seriously?" [1] "Assuming 32 bits" [1] "Downloading from: https://github.com/MatteoLacki/opentims_bruker_bridge/raw/main/opentims_bruker_bridge/win32/timsdata.dll" Error in download.file(url, target.file, mode = "wb", ...) : 无法打开目的文件'/home/matteo/timsdata.dll',原因是'No such file or directory'
Here, "无法打开目的文件" means "can not open the targeted file" and "原因是" means "the reason is"
okay, there's the problem. You are supposed to edit the "folder_to_stode_priopriatary_code" to a path that exists on your computer, the 'home/matteo' is provided just as an example. This will download the dll file, and save it there. Right now the code is trying to save it to "/home/matteo", which is an invalid path on Windows. Yours will probably be something like "C:\somewhere\folder". Note: you might need to escape the backslashes (possibly double them).
Thanks a lot for your reply, I learned a lot from it!
An error when running
path_to_bruker_dll = download_bruker_proprietary_code(folder_to_stode_priopriatary_code)
in R. The url of timsdata.dll should be "https://github.com/MatteoLacki/opentims_bruker_bridge/**tree**/main/opentims_bruker_bridge" but not " https://github.com/MatteoLacki/opentims_bruker_bridge/**raw**/main/opentims_bruker_bridge/" and it cause the error: "Error in download.file(url, target.file, mode = "wb", ...) : Cannot open '/home/matteo/timsdata.dll',reason is 'No such file or directory'"