Skip to content
Kevin Bu edited this page Feb 19, 2025 · 1 revision

Welcome to the loclust-analyses wiki!

LOCLUST Tutorial

  1. Merge data file and metadata file into a single ‘traj’ file that should look like this: /sc/arion/projects/clemej05a/kevin/loclust/babies_mg/taxa_trajs/L6__Bacteroides_trajs.out The file needs to have an X and Y column with the values in a ‘list’ format e.g. [1,2.2,3.4]

  2. To run loclust, you first activate the env Source activate loclust This loop assumes you have all the traj files as .txt with the var names in the file name and creates a job file for all of them and creates a directory name dirname for each trajectory python /sc/arion/projects/clemej05a/kevin/Repositories/loclust/analysis_scripts/sc_create_j_clust.py -i "$dirname" -b "$dirname" -s "/sc/arion/projects/clemej05a/kevin/Repositories/loclust/scripts" -o $dirname/jobs.txt python /sc/arion/projects/clemej05a/kevin/Repositories/loclust/analysis_scripts/generate_lsf_loclust.py -e loclust -c $dirname/jobs.txt -o $dirname -py '$PYTHONPATH' --submit

  3. HPC std out files are parsed using python /sc/arion/projects/clemej05a/kevin/Repositories/loclust/analysis_scripts/sc_stdout_parse.py -i $dirname/ -o $dirname/outputs/

  4. And VMS/SS can be computed using python /sc/arion/projects/clemej05a/kevin/Repositories/loclust/analysis_scripts/sc_vmeasure_with_mdata.py -i $dirname/outputs/$base/ -m Study_group -o /sc/arion/projects/clemej05a/kevin/predict/outputs/jobs03/VEGFA/ Python /sc/arion/projects/clemej05a/kevin/Repositories/loclust/analysis_scripts/sc_chiSq.py -i /sc/arion/projects/clemej05a/kevin/predict/outputs/jobs03/VEGFA/outputs/VEGFA/ -m Study_group -o /sc/arion/projects/clemej05a/kevin/predict/outputs/jobs03/VEGFA/outputs/

  5. For R plotting, need to convert traj df IN THE LOCLUST OUTPUT FOLDER for a specific run to R format python /sc/arion/projects/clemej05a/kevin/Repositories/loclust/analysis_scripts/sc_convert_traj_for_R_plotting.py -i /sc/arion/projects/clemej05a/kevin/predict/outputs/jobs03/CXCL1/outputs/CXCL1/CXCL1_pc_3_num_clusters_9/ -m Study_group -m cluster

  6. This will plot the script but hard coded paths need to be modified for now Rscript /sc/arion/projects/clemej05a/kevin/Repositories/loclust-analyses/predict/sc_plot_trajs.R

Clone this wiki locally