BCCDC-DSI / RADD

Consult at the BCCDC for Mass Spectrometry
https://bccdc-dsi.github.io/RADD/
MIT License
1 stars 0 forks source link

Sockeye: replicate inner2.R on HRN csv Aaron shared on July3 gave error... #33

Closed lisatwyw closed 3 months ago

lisatwyw commented 3 months ago
[140/2323] 2C-B aminorex ...
[141/2323] 2C-B-BZP ...
[142/2323] 2C-B-FLY ...
[143/2323] 2C-B-FLY-NBOMe ...
[144/2323] 2C-C ...
[145/2323] 2C-D ...
[146/2323] 2-CDMC ...
[147/2323] 2C-E ...
[148/2323] 2-CEC ...
[149/2323] 2C-E-FLY ...
[150/2323] 2C-F ...
[151/2323] 2C-G ...
[152/2323] 2C-G-4 ...
Error in `map()`:
i In index: 152.
Caused by error in `map_lgl()`:
i In index: 539.
Caused by error in `mutate()`:
i In argument: `match = map2_lgl(...)`.
Caused by error in `map2_lgl()`:
i In index: 1.
Caused by error in `-err_ppm / 1e+06 * theor_mass`:
! non-numeric argument to binary operator
Run `rlang::last_trace()` to see where the error occurred.
> 
lisatwyw commented 3 months ago
[1] "theor_mass 212.0837 err 10"
[149/2323] 2C-E-FLY ...
[1] "theor_mass 234.1488 err 10"
[150/2323] 2C-G ...
[1] "theor_mass 210.1488 err 10"
[151/2323] 2C-G-4 ...
[1] "theor_mass 236.1645 err 10"
[1] "theor_mass 189.091 err 20"
Error in `map()`:
i In index: 151.
Caused by error in `map_lgl()`:
i In index: 539.
Caused by error in `mutate()`:
i In argument: `match = map2_lgl(...)`.
Caused by error in `map2_lgl()`:
i In index: 1.
Caused by error in `-err_ppm / 1e+06 * theor_mass`:
! non-numeric argument to binary operator
Run `rlang::last_trace()` to see where the error occurred.
lisatwyw commented 3 months ago

Step 1: After login, copy-paste:

export LC_ALL=C; unset LANGUAGE  # This line is critical !
cd /arc/project/st-ashapi01-1/RADD/library_final/apptainer
module load gcc
module load apptainer
apptainer shell --bind /arc/software,/arc/home,/arc/project,/scratch ubuntu.sandbox
cd /arc/project/st-ashapi01-1/RADD

Step 2: Launch R Studio by typing in "R" (single char):

R

Step 3: Define and call go.R [option 1]

# Define/ update definition
source('/arc/project/st-cfjell-1/git/mass_spec/go.R')
# Call
go( "/arc/project/st-cfjell-1/ms_data/expedited_2023/mzML/2024-0581BG01.mzML" , "/scratch/st-ashapi01-1/RADD/2024-07-03" )

Step 3: Run inner.R script [option 2]

source('/arc/project/st-ashapi01-1/RADD/workflow1/inner.R')
lisatwyw commented 3 months ago

Step 3: Run inner2.R script [option 3]

DEBUG=0;  source('/arc/project/st-ashapi01-1/RADD/workflow1/inner2.R') # fails with new (HighRes) library
DEBUG=1;  source('/arc/project/st-ashapi01-1/RADD/workflow1/inner2.R') # works with old NPS DATABASE-NOV2022.csv library 
lisatwyw commented 3 months ago
[1001/2322] BDB ...
[1002/2322] BDMT ...
[1003/2322] Benocyclidine ...
[1004/2322] Bentazepam ...
Error in `map()`:
i In index: 1004.
Caused by error in `map_lgl()` at RADD/workflow1/inner2.R:127:5:
i In index: 1.
Caused by error:
! Result must be length 1, not 2.
Run `rlang::last_trace()` to see where the error occurred.