BCCDC-DSI / RADD

Consult at the BCCDC for Mass Spectrometry
MIT License
1 stars 0 forks source link
mass-spectrometry r slurm

RADD

Notes:

One time setup

  1. Apply for Sockeye allocation: https://flex.redcap.ubc.ca/surveys/?s=7MKJT898LK
  2. Setup Multi-factor authentication. This is mandatory step or you will not be able to SSH.
  3. Install myVPN:
    • Set up guide for Mac users
    • Window users may need to email and request OneDrive link to download an installer, as Lisa did in April, 2024

One time setup

  1. Connect to myvpn.ubc.ca through myVPN app

  2. Connect to to Sockey through terminal using Secure Socket Shell protocol (SSH):

    ssh username@sockeye.arc.ubc.ca
  3. Navigate to project folder:

    cd /arc/project/st-username-1/RADD

4a. Build virtual environment

Proposal 1: ``` cd $HOME wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh bash Miniconda3-latest-Linux-x86_64.sh $HOME/miniconda3/bin/conda create --prefix nps-screen; $HOME/miniconda3/bin/conda activate nps-screen; $HOME/miniconda3/bin/conda install R r-tidyverse r-magrittr r-argparse; $HOME/miniconda3/bin/conda install -c bioconda bioconductor-xcms ``` Proposal 2: https://www.biostars.org/p/450316/ [tested on ComputeCanada 2024-04-16] ``` cd $HOME wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh bash Miniconda3-latest-Linux-x86_64.sh base_dir=$(echo $PWD) export PATH=$base_dir/miniconda/bin:$PATH source ~/.bashrc echo -e "$base_dir/miniconda/etc/profile.d/conda.sh" >> ~/.profile conda init bash # installing Mamba for fasta downloading of packages in conda conda install mamba -n base -c conda-forge -y conda update conda -y conda update --all # Creating R environment in conda mamba create -n R -c conda-forge r-base -y # Activating R environment conda activate R mamba install -c conda-forge r-essentials ``` Note: To undo initialization of conda upon startup, issue: ```conda init --reverse $SHELL```

4b. Use apptainer prepared by Chris see logs

To launch the appatainer prepared by Chris - navigate to the folder which has the apptainer. On Sockeye:

cd /arc/project/st-cfjell-1/apptainer
module load gcc apptainer
apptainer shell ubuntu.sandbox

Then you should see something like:

Apptainer>

If you can see this there is a common troubleshooting step involving the locale:

export LC_ALL=C; unset LANGUAGE

When all of this is done, you can confirm the repo is working by doing:

R
source('arc/project/st-cfjell-1/git/mass_spec/go.R')
go('arc/project/st-cfjell-1/data/ms_data/expedited_2023_tmp/mzML/2023-0001BG01.mzML')

If this runs and produces the following output:

Detecting mass traces at 25 ppm ... OK
Detecting chromatographic peaks in 41125 regions of interest ... OK: 9122 found.

[1/83] 2-Fluorodeschloroketamine ...
[2/83] 2-Methyl AP-237 ...
[3/83] 3,4-Difluoro-U-47700 ...
[4/83] 3-Hydroxyphenazepam ...
[5/83] 4-Trifluoromethyl-U-47700 ...
[6/83] 4F-ABINACA ...
[7/83] 4F-Ethylphenidate ...
[8/83] 4F-MDMB-BICA ...
[9/83] 5-Methoxy MiPT ...
[10/83] 5F-CUMYL-PINACA ...
[11/83] 5F-EDMB-PICA ...
[12/83] 5F-EMB-PICA ...
[13/83] 5F-MDMB PICA ...
[14/83] 8-Aminoclonazolam ...
[15/83] AB-FUBINACA ...
[16/83] ADB-4en-PINACA ...
[17/83] ADB-BINACA ...
[18/83] ADB-FUBIATA ...
[19/83] ADB-HEXINACA ...
[20/83] ADB-PHENITACA ...
[21/83] Adinazolam ...
[22/83] Alpha-PCYP ...
[23/83] Alpha-PiHP ...
[24/83] AP-237 ...
[25/83] AP-238 ...
[26/83] Benocyclidine ...
[27/83] Bentazepam ...
[28/83] Bromazolam ...
[29/83] Bromofentanyl ...
[30/83] Brorphine ...
[31/83] Brotizolam ...
[32/83] Butonitazene ...
[33/83] BZO-HEXOXIZID ...
[34/83] Chlorofentanyl ...
[35/83] Ciclotizolam ...
[36/83] Cl-PCP ...
[37/83] Clonazolam ...
[38/83] Clotiazepam ...
[39/83] Delorazepam ...
[40/83] Desalkylgidazepam ...
[41/83] Deschloroetizolam ...
[42/83] Diclazepam ...
[43/83] Dipyanone ...
[44/83] EDMB-PINACA ...
[45/83] Estazolam ...
[46/83] Etaqualone ...
[47/83] Etodesnitazene ...
[48/83] Etonitazene ...
[49/83] Eutylone ...
[50/83] F-PCP ...
[51/83] Flubromazepam ...
[52/83] Flubromazolam ...
[53/83] Fluclotizolam ...
[54/83] Flunitazene ...
[55/83] Fluorofentanyl ...
[56/83] FUB-144 ...
[57/83] Furanyl UF-17 ...
[58/83] Gidazepam ...
[59/83] Loprazolam ...
[60/83] Lormetazepam ...
[61/83] MDMB-4en-BINACA ...
[62/83] MDMB-5Br-INACA ...
[63/83] Meclonazepam ...
[64/83] MeO-PCE ...
[65/83] Methoxpropamine ...
[66/83] Methylenedioxy-PV8 ...
[67/83] Metizolam ...
[68/83] Metonitazene ...
[69/83] N,N-Dimethylpentylone ...
[70/83] N-Ethyl-U-47700 ...
[71/83] N-Ethylpentedrone ...
[72/83] N-methyl-U-47931E ...
[73/83] N-Methylhexylone ...
[74/83] n-Piperidinyl etonitazene ...
[75/83] N-Pyrrolidino Etonitazene ...
[76/83] Napthyl-U-47700 ...
[77/83] Nitrazolam ...
[78/83] para-Methyl AP-237 ...
[79/83] Phenazepam ...
[80/83] Pyrazolam ...
[81/83] Tenocyclidine ...
[82/83] U-47931E ...
[83/83] Zapizolam ...
[1] "writing to /scratch/st-cfjell-1/output/ms_data/expedited_2023//2023-0001BG01.rds"

The script is working perfectly fine and you can run all the tests.

Summary of tasks

Tasks Status
Part 1: replicate analysis on data under /arc/project/st-cfjell-1/ms_data/expedited_2023/mzML
Step A: data processing + feature extraction
Step B: figure generations for analyses
Part 2: generative model TBD