Skip to content

1 How to use TraceGroomer

johaGL edited this page Feb 16, 2024 · 15 revisions

How to use TraceGroomer in the command line

The execution of TraceGroomer takes only few seconds. Below we explain how to proceed.

Please prepare your files as explained the section 2 Input files.

Once your input files are ready, and that you have the following structure, you must organize your files as follows:

MyProject
├── data
│   ├── dataset1_data
│   │   ├── metadata_1.csv
│   │   └── TRACER_IsoCor_out_example.tsv
└── groom_files
    └── dataset1
          ├── amount_material_weightorcells.csv
          └── config-1-groom.yml

This structure is recommended to easily re-use the data folder for DIMet.

The command is:

python3 -m tracegroomer --targetedMetabo_path $MY_MEASUREMENTS_FILE \
    --type_of_file $MY_TYPE_OF_INPUT \
    $MY_BASIC_YML_CONFIG_PATH

Command compulsory parameters:

  • --targetedMetabo_path: is the file that contains the measurements, in absolute path.
  • --type_of_file: must be IsoCor_out_tsv, or VIBMEC_xlsx, or generic_xlsx (only one by command)
  • the last positional parameter is the path to the basic configuration in .yml format (content explained in 2 Input files).

We recommend to run a test with the provided examples if this is the first time you use TraceGroomer. Re-use the folder organization and the configuration .yml as template, and modify the command to be suitable to your data.

Running a test with the provided examples

To perform a test using the examples we provide, please download and uncompress our examples from Zenodo. The structure of the folder is:

examples_TraceGroomer
├── data
│   ├── example-isocor_data
│   │   ├── metadata_1.csv
│   │   └── TRACER_IsoCor_out_example.tsv
│   ├── example-sheet_data
│   │   ├── metadata_3.csv
│   │   └── TRACER_generic_sheet.xlsx
│   └── example-vib_data
│       ├── metadata_2.csv
│       └── TRACER_metabo_2.xlsx
└── groom_files
    ├── example-isocor
    │   ├── amount_material_weightorcells.csv
    │   └── config-1-groom.yml
    ├── example-sheet
    │   └── config-3-groom.yml
    └── example-vib
        ├── config-2-groom.yml
        ├── nbcells-or-amountOfMaterial.csv
        └── reject_list.csv

These examples correspond to:

  1. example-isocor_data: IsoCor data (tsv file)
  2. example-vib_data: VIB MEC xlsx file
  3. example-sheet_data: "generic" type of xlsx file

Run the script with the provided examples

The following commands assume that the downloaded examples are in the 'home' directory. Please modify, according to your working directory, the absolute paths in the .yml files and in the bash commands.

For IsoCor data:

python3 -m tracegroomer \
   --targetedMetabo_path ~/examples_TraceGroomer/data/example-isocor_data/TRACER_IsoCor_out_example.tsv \
   --type_of_file IsoCor_out_tsv \
   ~/examples_TraceGroomer/groom_files/example-isocor/config-1-groom.yml

or, for VIB MEC data:

python3 -m tracegroomer \
  --targetedMetabo_path ~/examples_TraceGroomer/data/example-vib_data/TRACER_metabo_2.xlsx \
  --type_of_file VIBMEC_xlsx 
  ~/examples_TraceGroomer/groom_files/example-vib/config-2-groom.yml

or, for the generic case:

python3 -m tracegroomer --targetedMetabo_path ~/examples_TraceGroomer/data/example-sheet_data/TRACER_generic_sheet.xlsx \
   --type_of_file generic_xlsx 
   ~/examples_TraceGroomer/groom_files/example-sheet/config-3-groom.yml

The output

The output files are saved in the folder that you specified in the config .yml file (groom_out_path field). The data/[my_dataset] location is recommended for saving the output. A total of 4 output files are generated if the absolute isotopologues are provided, otherwise 3 files are generated.

In this way you simply copy the entire data/ content to the folder structure that we want to run with DIMet !

The format of these output files is tab-delimited .csv.

Clone this wiki locally