When using MESSES to create deposition file formats you can often accomplish the same task in many different ways. The procedure for this data 
focuses on minimizing manual manipulations done to the files provided by West Coast so that it is likely to be highly reusable for future datasets 
generated by West Coast.


Manual Manipulations:
Sample List:
1. Added the "replicate2" column to identify replicates in a different way.
2. Added the "sex" column to identify the sex of the patients.

Biogenic Amines:
1. In the original biogenic amines file, metabolomics_biogenic_amines.xlsx, the "Data" sheet is renamed to "#export".
2. In the renamed "#export" sheet, "(pos)" was added to "File ID" in cell H8, and "(neg)" was added to "File ID" in cell H9.
3. 2 different versions of the file are saved under new names, one for positive mode and one for negative mode.
4. "#automate" and "#modify" sheets are added to the file and the appropriate tags added. (It is a good idea to copy these and use them for your data from West Coast.)
5. The "biogenic_amines_end_modify.xlsx" file is created. (It is a good idea to use this for your own data from West Coast.)

Lipids:
1. In the original lipidomics file, metabolomics_lipidomics.xlsx, the "Data" sheet is renamed to "#export".
2. In the renamed "#export" sheet, "(pos)" was added to "File ID" in cell G8, and "(neg)" was added to "File ID" in cell G9.
3. The file IDs in the File ID (pos) row were updated with the actual raw file names because the names in the original file were actually the negative mode names. (It is recommended to check all file IDs in all Excel files to make sure they are correct.)
4. 2 different versions of the file are saved under new names, one for positive mode and one for negative mode.
5. "#automate" and "#modify" sheets are added to the file and the appropriate tags added. (It is a good idea to copy these and use them for your data from West Coast.)
6. The "lipids_end_modify.xlsx" file is created. (It is a good idea to use this for your own data from West Coast.)

Metabolism:
1. In the original primary metabolism file, metabolomics_primary_metabolism.xlsx, the "data" sheet is renamed to "#export".
2.  "#automate" and "#modify" sheets are added to the file and the appropriate tags added. (It is a good idea to copy these and use them for your data from West Coast.)
3. The "metabolism_end_modify.xlsx" file is created. (It is a good idea to use this for your own data from West Coast.)



Run Commands:
Below are the commands to run in the terminal to reproduce the _extraction.json files. The commands assume the terminal is in that directory. 
Note that running these commands will overwrite the _extraction.json files unless you rename them or change the --output option for the command.

Biogenic Amines Pos:
Input Files:
sample_list.xlsx 
metabolomics_biogenic_amines_pos.xlsx 
biogenic_amines_end_modify.xlsx

Output Files:
biogenic_amines_pos_extraction.json

Run Command:
messes extract sample_list.xlsx metabolomics_biogenic_amines_pos.xlsx --end-modify biogenic_amines_end_modify.xlsx --output biogenic_amines_pos_extraction --delete "measurement,r'.*-ESI neg'" --delete "protocol,r'.*lipid.*'" --delete "protocol,r'GC-MS.*'" --delete "entity,r'.*(-lipid|-metabolism)'"


Biogenic Amines Neg:
Input Files:
sample_list.xlsx 
metabolomics_biogenic_amines_neg.xlsx 
biogenic_amines_end_modify.xlsx

Output Files:
biogenic_amines_neg_extraction.json

Run Command:
messes extract sample_list.xlsx metabolomics_biogenic_amines_neg.xlsx --end-modify biogenic_amines_end_modify.xlsx --output biogenic_amines_neg_extraction --delete "measurement,r'.*-ESI pos'" --delete "protocol,r'.*lipid.*'" --delete "protocol,r'GC-MS.*'" --delete "entity,r'.*(-lipid|-metabolism)'"



Lipids Pos:
Input Files:
sample_list.xlsx 
metabolomics_lipidomics_pos.xlsx 
lipids_end_modify.xlsx

Output Files:
lipids_pos_extraction.json

Run Command:
messes extract sample_list.xlsx metabolomics_lipidomics_pos.xlsx --end-modify lipids_end_modify.xlsx --output lipids_pos_extraction --delete "measurement,r'.*-ESI neg'" --delete "protocol,r'.*(polar|biogenic_amines).*'" --delete "protocol,r'GC-MS.*'" --delete "entity,r'.*(-amines|-polar_extraction|-metabolism)'"


Lipids Neg:
Input Files:
sample_list.xlsx 
metabolomics_lipidomics_neg.xlsx 
lipids_end_modify.xlsx

Output Files:
lipids_neg_extraction.json

Run Command:
messes extract sample_list.xlsx metabolomics_lipidomics_neg.xlsx --end-modify lipids_end_modify.xlsx --output lipids_neg_extraction --delete "measurement,r'.*-ESI pos'" --delete "protocol,r'.*(polar|biogenic_amines).*'" --delete "protocol,r'GC-MS.*'" --delete "entity,r'.*(-amines|-polar_extraction|-metabolism)'"



Metabolism:
Input Files:
sample_list.xlsx 
metabolomics_primary_metabolism.xlsx 
metabolism_end_modify.xlsx

Output Files:
metabolism_extraction.json

Run Command:
messes extract sample_list.xlsx metabolomics_primary_metabolism.xlsx --end-modify metabolism_end_modify.xlsx --output metabolism_extraction --delete "protocol,r'.*(biogenic_amines|lipid).*'" --delete "protocol,r'LC-MS-MS.*'" --delete "entity,r'.*(-amines|-lipid)'" --delete "entity,r'(Blank.*|Pool_3)'"

