artedison / Edison_Lab_Shared_Metabolomics_UGA

Official Edison Lab toolboxes and scripts for analyzing metabolomics data.
13 stars 4 forks source link

MATLAB install #19

Closed Gerardwx closed 2 years ago

Gerardwx commented 2 years ago

What paths need to be added to MATLAB to run the metabolomics toolbox?

judgemt commented 2 years ago

@Gerardwx , are you referring to MATLAB dependencies? Otherwise, we usually add the local toolbox clone to the MATLAB path using addpath(genpath('User/path/to/repo'))

Gerardwx commented 2 years ago

When we clone the branch, we get a directory structure structure with matlab script (*.m) files in multiple directories. Don't those have to be on the MATLAB path to work ms.txt ?

Gerardwx commented 2 years ago

Or do we just put ... /metabolomics_toolbox/code in the path?

mikeaalv commented 2 years ago

@Gerardwx Yes. You are right all the paths into subfolders should be added to path, and I believe that will be done by the code @judgemt shared. genpath generate all the paths based on the input.

Gerardwx commented 2 years ago

So I'm including ... /metabolomics_toolbox/code down, and ignoring the Biosorter-Analysis tree?

judgemt commented 2 years ago

@Gerardwx thanks for asking; that is correct. In the future, we may recommend using scripts in the Biosorter-Analysis directory, but this is somewhat specialized and we can work that out if the need arises. We would probably suggest adding it as a separate toolbox in that event. We were wondering- do you have an update frequency in mind for the toolbox in NMRbox?

judgemt commented 2 years ago

Just to clarify- addpath(genpath('path/To/Git')) is a recursive filepath addition command that gets all the files in 'path/To/Git'; no need to worry about listing them all

Gerardwx commented 2 years ago

I've added a wrapper script in the NMRbox package:

function [] = activate_metabolomics_toolbox
    addpath(genpath('/usr/software/metabolomics_toolbox'))
    disp('Metabolomics Toolbox loaded')
    disp('See https://github.com/artedison/Edison_Lab_Shared_Metabolomics_UGA/wiki for usage')
end

Happy to tweak the wording if ya'll prefer.

metabolomics

judgemt commented 2 years ago

@Gerardwx cool! That looks really slick, thanks!