-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added example_minimal_case.py to examples
- Loading branch information
Showing
25 changed files
with
176 additions
and
130 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
[Header] | ||
Data File Name C:\Users\user\Documents\jla278\T1.qgd | ||
Output Date 3/18/2024 | ||
Output Time 11:00:20 AM | ||
|
||
[MC Peak Table] | ||
# of Peaks 3 | ||
Mass TIC | ||
Peak# Ret.Time Proc.From Proc.To Mass Area Height A/H Conc. Mark Name Ret. Index Area% Height% SI CAS # | ||
1 13.703 13.580 13.900 TIC 20 20 1 0 V Capric Acid 2.59 3.01 97 108-95-2 | ||
2 20.942 20.767 21.020 TIC 200 200 1 0 V Naphthalene 8.11 9.20 98 91-20-3 | ||
3 21.426 21.373 21.500 TIC 2000 2000 1 0 V Dodecane 0.36 0.57 96 112-40-3 | ||
4 22.426 22.373 22.500 TIC 1000 1000 1 0 V NotValidComp 0.36 0.57 96 112-40-3 | ||
5 23.426 22.373 22.500 TIC 1000 100 1 0 V Palmitic Acid 0.36 0.57 96 112-40-3 | ||
6 24.426 22.373 22.500 TIC 1000 200 1 0 V Dichlorobenzene 0.36 0.57 96 112-40-3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
[Header] | ||
Data File Name C:\Users\user\Documents\jla278\T1.qgd | ||
Output Date 3/18/2024 | ||
Output Time 11:00:20 AM | ||
|
||
[MC Peak Table] | ||
# of Peaks 3 | ||
Mass TIC | ||
Peak# Ret.Time Proc.From Proc.To Mass Area Height A/H Conc. Mark Name Ret. Index Area% Height% SI CAS # | ||
1 13.703 13.580 13.900 TIC 40 40 1 0 V Capric Acid 2.59 3.01 97 108-95-2 | ||
2 20.942 20.767 21.020 TIC 400 400 1 0 V Naphthalene 8.11 9.20 98 91-20-3 | ||
3 21.426 21.373 21.500 TIC 4000 4000 1 0 V Dodecane 0.36 0.57 96 112-40-3 | ||
4 24.426 26.373 21.500 TIC 1000 1000 1 0 V Almost Oleic Acid 0.36 0.57 96 112-40-3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
[Header] | ||
Data File Name C:\Users\user\Documents\jla278\T1.qgd | ||
Output Date 3/18/2024 | ||
Output Time 11:00:20 AM | ||
|
||
[MC Peak Table] | ||
# of Peaks 3 | ||
Mass TIC | ||
Peak# Ret.Time Proc.From Proc.To Mass Area Height A/H Conc. Mark Name Ret. Index Area% Height% SI CAS # | ||
1 13.703 13.580 13.900 TIC 20 20 1 0 V Phenol 2.59 3.01 97 108-95-2 | ||
2 20.942 20.767 21.020 TIC 50 50 1 0 V Naphthalene 8.11 9.20 98 91-20-3 | ||
3 21.426 21.373 21.500 TIC 500 500 1 0 V Dodecane 0.36 0.57 96 112-40-3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
[Header] | ||
Data File Name C:\Users\user\Documents\jla278\T2.qgd | ||
Output Date 3/18/2024 | ||
Output Time 11:00:20 AM | ||
|
||
[MC Peak Table] | ||
# of Peaks 3 | ||
Mass TIC | ||
Peak# Ret.Time Proc.From Proc.To Mass Area Height A/H Conc. Mark Name Ret. Index Area% Height% SI CAS # | ||
1 13.703 13.580 13.900 TIC 10 10 1 0 V Phenol 2.59 3.01 97 108-95-2 | ||
2 20.942 20.767 21.020 TIC 100 1000 1 0 V Naphthalene 8.11 9.20 98 91-20-3 | ||
3 21.426 21.373 21.500 TIC 1000 1000 1 0 V Dodecane 0.36 0.57 96 112-40-3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
[Header] | ||
Data File Name C:\Users\user\Documents\jla278\T3.qgd | ||
Output Date 3/18/2024 | ||
Output Time 11:00:20 AM | ||
|
||
[MC Peak Table] | ||
# of Peaks 3 | ||
Mass TIC | ||
Peak# Ret.Time Proc.From Proc.To Mass Area Height A/H Conc. Mark Name Ret. Index Area% Height% SI CAS # | ||
1 13.703 13.580 13.900 TIC 10 10 1 0 V Phenol 2.59 3.01 97 108-95-2 | ||
2 20.942 20.767 21.020 TIC 100 1000 1 0 V Naphthalene 8.11 9.20 98 91-20-3 | ||
3 21.426 21.373 21.500 TIC 1000 1000 1 0 V Dodecane 0.36 0.57 96 112-40-3 |
Binary file not shown.
File renamed without changes.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,112 @@ | ||
# %% Import necessary libraries | ||
import pathlib as plib | ||
from gcms_data_analysis.gcms import Project | ||
|
||
folder_path: plib.Path = plib.Path(__file__).parent | ||
|
||
folder_path = r"/Users/matteo/Projects/gcms_data_analysis/examples/data_minimal_case" | ||
|
||
proj = Project( | ||
folder_path=folder_path, | ||
auto_save_to_excel=False, | ||
compounds_to_rename_in_files={ | ||
"almost oleic acid": "oleic acid", | ||
"dichlorobenzene": "p-dichlorobenzene", | ||
}, | ||
) | ||
|
||
# %% | ||
files_info_created = proj.create_files_info(update_saved_files_info=False) | ||
print(files_info_created.T) | ||
|
||
files_info_loaded = proj.load_files_info(update_saved_files_info=False) | ||
print(files_info_loaded.T) | ||
# %% | ||
files = proj.load_all_files() | ||
print(files["S_1"]) | ||
# %% | ||
class_code_frac = proj.load_class_code_frac() | ||
print(class_code_frac) | ||
# %% | ||
calibrations = proj.load_calibrations() | ||
print(calibrations["cal_minimal"]) | ||
# %% | ||
list_of_all_compounds = proj.create_list_of_all_compounds() | ||
print(list_of_all_compounds) | ||
# %% | ||
compounds_properties_created = proj.create_compounds_properties( | ||
update_saved_files_info=True | ||
) | ||
compounds_properties_loaded = proj.load_compounds_properties() | ||
print(compounds_properties_created) | ||
# %% | ||
dict_names_to_iupac = proj.create_dict_names_to_iupacs() | ||
print(dict_names_to_iupac) | ||
|
||
# %% | ||
files_iupac, calibration_iupac = proj.add_iupac_to_files_and_calibrations() | ||
print(files_iupac["S_1"]) | ||
print(calibration_iupac["cal_minimal"]) | ||
# %% | ||
tanimoto_similarity_df, mol_weight_diff_df = ( | ||
proj.create_tanimoto_and_molecular_weight_similarity_dfs() | ||
) | ||
print(tanimoto_similarity_df) | ||
print(mol_weight_diff_df) | ||
# %% | ||
semi_calibratoin_dict = proj.create_semi_calibration_dict() | ||
print(semi_calibratoin_dict) | ||
# %% | ||
file1 = proj.apply_calib_to_single_file("S_1") | ||
file2 = proj.apply_calib_to_single_file("S_2") | ||
print(file1) | ||
# %% | ||
files_calibrated = proj.apply_calibration_to_files() | ||
print(files_calibrated["S_1"]) | ||
# %% | ||
file_info_with_stats = proj.add_stats_to_files_info() | ||
print(file_info_with_stats) | ||
# %% | ||
samples_info_ave, samples_info_std = proj.create_samples_info() | ||
print(samples_info_ave.T) | ||
print(samples_info_std.T) | ||
# %% | ||
sample1_ave, sample1_std = proj.create_single_sample_from_files( | ||
files_in_sample=[file1, file2], samplename="S" | ||
) | ||
# %% | ||
samples, samples_std = proj.create_samples_from_files() | ||
# %% | ||
reph = proj.create_files_param_report(param="height") | ||
print(reph) | ||
|
||
repc = proj.create_files_param_report(param="conc_vial_mg_L") | ||
print(repc) | ||
# %% | ||
repsh, repsh_d = proj.create_samples_param_report(param="height") | ||
print(repsh) | ||
repsc, repsc_d = proj.create_samples_param_report(param="conc_vial_mg_L") | ||
print(repsc) | ||
# %% | ||
aggh = proj.create_files_param_aggrrep(param="height") | ||
print(aggh) | ||
# %% | ||
aggc = proj.create_files_param_aggrrep(param="conc_vial_mg_L") | ||
|
||
print(aggc) | ||
# %% | ||
aggsh, aggsh_d = proj.create_samples_param_aggrrep(param="height") | ||
print(aggsh) | ||
print(aggsh_d) | ||
# %% | ||
aggsc, aggsc_d = proj.create_samples_param_aggrrep(param="conc_vial_mg_L") | ||
|
||
print(aggsc) | ||
print(aggsc_d) | ||
# %% | ||
proj.save_files_samples_reports() | ||
# %% | ||
|
||
proj.plot_report() | ||
|
||
# %% |
File renamed without changes.
Binary file added
BIN
+11.5 KB
examples/name_to_properties/data_name_to_properties/classifications_codes_fractions.xlsx
Binary file not shown.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters