- GAMMA data root:
"ResearchDepartment/ResearchProjects/GAMMA/Data/"
- Samples:
GAMMA_DATA_ROOT/Samples/
- Toy graphs (for testing during dev):
GAMMA_DATA_ROOT/ToySamples/
- Results:
GAMMA_DATA_ROOT/Results/
Please create additional folders inside as necessary (but never change an existing file/directory).
Setting an environment variable for the GAMMA data root will allow us to share code across machines without a need to change any code.
Add the following to your .bash_rc
:
export GAMMA_DATA_ROOT="path_to_gamma_root_on_your_machine"
For example, for me it is:
export GAMMA_DATA_ROOT="$HOME/Dropbox/ResearchDepartment/ResearchProjects/GAMMA/Data/"
Notice: the double quotes are required - they allow the spaces in the path while still expanding the $HOME
path environment variable.
Create a symlink to the GAMMA data root on your machine:
$ ln -s "path_to_gamma_root_on_your_machine" .gamma_data_root
Add the following to your .bash_profile
:
export GAMMA_DATA_ROOT=$HOME/.gamma_data_root/
import os
import pandas as pd
data_path = os.environ['GAMMA_DATA_ROOT']
df = pd.read_csv(data_path + 'Samples/enzymes/edges')
import java.io.File;
String dataPath = System.getenv("GAMMA_DATA_ROOT");
File edges = new File(dataPath, "Samples/enzymes/edges");