# MetaboDirect traning session ### 6/10/2021 ## User Manual MetaboDirect user manual can be accesed [here](https://coayala.github.io/MetaboDirect/). ## Setting up ### 1. Install Anaconda Download and install the Anaconda distribution of Python from [here](https://www.anaconda.com/products/individual-b). ### 2. Setting up the command prompt **(For Windows Users)** Open the *Anaconda Prompt* in Administrator Mode, and enter the following commands: ``` conda install m2-base conda install -c menpo wget ``` **(Mac Users)** Open your defaul terminal.`ls` and `wget` should already be installed by default ### 3. Python package installation Install the required packages specified in the **MetaboDirect** GitHub [repository](https://github.com/Coayala/MetaboDirect). ``` pip install <package-name> ``` ### 4. MetaboDirect Installation To install MetaboDirect use: ``` pip install metabodirect ``` To install the latest version you can use ``` pip install --upgrade metabodirect ``` You can check metabodirect version using ``` metabodirect -v ``` Current version 0.1.12 (as of 6/21/2021) ### 5. Download test data Move to your Desktop using the Anaconda prompt ``` cd Desktop mkdir MetaboDirect_training cd MetaboDirect_training ``` Download test data form the Github repository **Report file** ``` wget https://raw.githubusercontent.com/Coayala/MetaboDirect/main/example/Report.csv --no-check-certificate ``` **Metadata file** ``` wget https://raw.githubusercontent.com/Coayala/MetaboDirect/main/example/metadata.csv --no-check-certificate ``` ### 6. Put R in your path ## Quick start MetaboDirect requires at least one data file (`DATA`), one metadata file (`METADATA`) and at least one grouping variable to be defined with `-g` option. ``` metabodirect -g STR DATA METADATA ``` ## HOMEWORK Please paste your figures and plots. Also let me know any feedback or bugs that you find. **Linnea** For the exploratory graphs, I always have to open Rstudio and run all the commands again in order to get all the graphs. Also, just a small thing, but if any of my metadata are numbers, it won't do the graphs because it can't plot continuous values. To fix this I assign the columns to character values in r studio, but I wonder if there would be a way to specify in commandline whether data is continuous or categorical? And to adjust graphs accordingly? ![](https://i.imgur.com/RcifskK.png) Also, the new updated version seems to be working on Mac without having to add python -m! > Hi Linnea. I was having the same issue, so the new version of metabodirect will assume all the values in the metadata to be factors, so it does not hav any issues when plotting and coloring. Since the metadata is mostly comprised of categorical values (even time points can be considered factors) I think it should work well this way. Let me know what do you think. > I imagine that you had to open RStudio tog et the plots because R was encountering and error (most likely because of the continuous values). Always check that you have metabodirect last version (above is the command to udate it). **Gina** ~'C13' key error **Anna** I keep on getting an error that says "metabodirect: error: the following arguments are required: DATA, METADATA" but I am putting the name of the files at the end of the metabodirect code. I'm unsure if I am writing the data/metadata names incorrectly or if there is a coding error. > Hi Anna. Check that you are putting the names of the files correctly and that you are in the same directory where the files are. You can check which directory you are using `pwd` in the command line. You can also use `ls` to see what files are in your current directory. If it keeps failing send me a screenshoot for me to see what is happening. **Matthew** **Paris** **Roya** **Moira** It would be great to have a bit more documentation on the automatically generated files in the help somewhere. For example, looking at the class and elemental composition files but I'm not sure what the units are for the numbers or how they were obtained, and in the error distribution file in diagnostics I'm not certain what the colum labeled "mean" is (I'm guessing "mean error" but it would be nice to have that spelled out somewhere). You might also consider expanding a bit on the explanation of things like SPANS. I know you cite the paper, so anyone who wants to understand thoroughly can read it, but maybe you could give a 1-2 sentence definition of what it is/how to use it to get people started if they are completely new to the concept. > Thanks a lot for your suggestions Moira, I will definitely work on expanding the User Guide to provide a better description for the output files. **Tyler** **Vivi**