-
Notifications
You must be signed in to change notification settings - Fork 2
/
6_profile_data.yml
113 lines (89 loc) · 6.59 KB
/
6_profile_data.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
target_default: 6_profile_data
packages:
- dplyr
- tidyr
- pah
- ggplot2
include:
- 5_compare_data.yml
sources:
- 6_profile_data/src/create_profiles.R
- 6_profile_data/src/find_top_sources.R
targets:
6_profile_data:
depends:
- prepped_for_profiles
- prepped_totals
- profiles
- profiles_nocreosote
- profiles_top_sources
- 6_profile_data/doc/chi2_allsites_nocreosote.png
- 6_profile_data/doc/chi2_allsites.png
- 6_profile_data/doc/conc_vs_sumchi2.png
- 6_profile_data/doc/profiles_all_selectsources.png
- 6_profile_data/doc/chi2_allsites_binnedbypriority16.png
- 6_profile_data/doc/profiles_siteWIMIM_selectsources.png
- 6_profile_data/doc/chi2_allsites_nocreosote.pdf
- 6_profile_data/doc/chi2_allsites.pdf
- 6_profile_data/doc/conc_vs_sumchi2.pdf
- 6_profile_data/doc/profiles_all_selectsources.pdf
- 6_profile_data/doc/chi2_allsites_binnedbypriority16.pdf
- 6_profile_data/doc/profiles_siteWIMIM_selectsources.pdf
prepped_for_profiles:
command: prep_profiles(pah_dat = samples)
# narrows to compounds in the 12-compound profiles, drops samples where any of the
# 12 compounds were < DL, narrows to columns of interest
prepped_totals:
command: prep_totals(pah_dat = samples)
# creates a dataframe of PAH16 totals for each site
# bins samples by low, medium, high concentrations
source_subset:
command: subset_source_profiles(drop_sources = I(c("CTD6", "CTR45", "CTR376")))
profiles:
command: pah_profiler(pah_dat = prepped_for_profiles, compound_column = I("casrn"), sample_column = I("unique_id"), conc_column = I("RESULT"), source_profs = source_subset, creosote = I('interpolated'))
# uses pah::pah_profiler to calculate proportional concentrations
# for samples, merges with source proportional concentration
# profiles is a list, first component ("profiles") is actual profiles with proportionate concentrations
# repeated for every sample-compound-source combination, gives sample (prop_conc) and source (source_prop_conc)
# values in separate columns, along with chi2 difference between the two (chi2).
# The second list component (sum_chi2) is the sum of the chi2 values for every sample-source combination
profiles_nocreosote:
command: pah_profiler(pah_dat = prepped_for_profiles, compound_column = I("casrn"), sample_column = I("unique_id"), conc_column = I("RESULT"), source_profs = source_subset, creosote = I('drop'))
profiles_top_sources:
command: min_sources(prof_dat = profiles)
6_profile_data/doc/chi2_allsites_nocreosote.png:
command: profile_plotter(filename = target_name, profile_dat = profiles_nocreosote, plot_type = I("boxplot"), sources = I(NA), samples_plot = I("all"), sample_column = I("unique_id"))
6_profile_data/doc/chi2_allsites_nocreosote.pdf:
command: profile_plotter(filename = target_name, profile_dat = profiles_nocreosote, plot_type = I("boxplot"), sources = I(NA), samples_plot = I("all"), sample_column = I("unique_id"))
6_profile_data/doc/chi2_allsites.png:
command: profile_plotter(filename = target_name, profile_dat = profiles, plot_type = I("boxplot"), sources = I(NA), samples_plot = I("all"), sample_column = I("unique_id"))
6_profile_data/doc/chi2_allsites.pdf:
command: profile_plotter(filename = target_name, profile_dat = profiles, plot_type = I("boxplot"), sources = I(NA), samples_plot = I("all"), sample_column = I("unique_id"))
6_profile_data/doc/profiles_highsites_selectsources.png:
command: profile_plotter(totals = prepped_totals, filename = target_name, filter = I("High"), profile_dat = profiles, plot_type = I("profile"), I(sources_plot = c("CT_dust_7", "Vehicle_traffic_avg", "Tire_particles", "Residential_heating", "Asphalt", "Pine_combustion_1")), samples_plot = I("all"), sample_column = I("unique_id"))
6_profile_data/doc/profiles_highsites_selectsources.pdf:
command: profile_plotter(totals = prepped_totals, filename = target_name, filter = I("High"), profile_dat = profiles, plot_type = I("profile"), I(sources_plot = c("CT_dust_7", "Vehicle_traffic_avg", "Tire_particles", "Residential_heating", "Asphalt", "Pine_combustion_1")), samples_plot = I("all"), sample_column = I("unique_id"))
6_profile_data/doc/conc_vs_sumchi2.png:
command: plot_conc_chi2(filename = target_name, profile_dat = profiles, totals = prepped_totals)
# shows how chi2 varies by EPA16 concentration for each source
6_profile_data/doc/conc_vs_sumchi2.pdf:
command: plot_conc_chi2(filename = target_name, profile_dat = profiles, totals = prepped_totals)
# shows how chi2 varies by EPA16 concentration for each source
6_profile_data/doc/profiles_all_selectsources.png:
command: profile_plotter(filename = target_name, filter = I(NA), profile_dat = profiles, plot_type = I("profile"), sources_plot = I(c("CTD7", "VAVG", "TIRE", "RESI", "ASP1", "PIN1")), samples_plot = I("all"), sample_column = I("unique_id"))
# shows profiles for select sources
6_profile_data/doc/profiles_all_selectsources.pdf:
command: profile_plotter(filename = target_name, filter = I(NA), profile_dat = profiles, plot_type = I("profile"), sources_plot = I(c("CTD7", "VAVG", "TIRE", "RESI", "ASP1", "PIN1")), samples_plot = I("all"), sample_column = I("unique_id"))
# shows profiles for select sources
6_profile_data/doc/profiles_siteWIMIM_selectsources.png:
command: profile_plotter(filename = target_name, profile_dat = profiles, plot_type = I("profile"), sources_plot = I(c("CTD7", "VAVG", "TIRE", "RESI", "ASP1", "PIN1")), samples_plot = I("WI-MIM"), sample_column = I("unique_id"))
# shows profiles for select sources and a select site
6_profile_data/doc/profiles_siteWIMIM_selectsources.pdf:
command: profile_plotter(filename = target_name, profile_dat = profiles, plot_type = I("profile"), sources_plot = I(c("CTD7", "VAVG", "TIRE", "RESI", "ASP1", "PIN1")), samples_plot = I("WI-MIM"), sample_column = I("unique_id"))
# shows profiles for select sources and a select site
6_profile_data/doc/chi2_allsites_binnedbypriority16.png:
command: facet_by_conc(target_name, profile_dat = profiles, totals = prepped_totals)
# shows sum chi2 for all sites, but now paneled by low vs med vs high EPA16 concentration
6_profile_data/doc/chi2_allsites_binnedbypriority16.pdf:
command: facet_by_conc(target_name, profile_dat = profiles, totals = prepped_totals)
# shows sum chi2 for all sites, but now paneled by low vs med vs high EPA16 concentration