User's Guide

for the APEX Postprocessor

 

Introduction

The APEX Postprocessor is designed to read simple ASCII text files produced by the TRIM.Expo-Inhalation executable, extract out the information required for risk processing by TRIM.Risk-HH and enter that data into a MySQL database. TRIM.Risk-HH then uses that information as input to compute human health risk estimates. There are no calculations or computations performed by the Postprocessor.

The APEX Postprocessor can be used to ingest a single APEX run or multiple runs. To ingest a single run, all the necessary parameters need to be specified on the command line. To ingest multiple runs, a control file is used that lists the parameters for each run. The APEX Postprocessor can be downloaded at http://www.cep.unc.edu/empd/projects/trim/04release/apexpostproc.zip

 

A. SINGLE APEX RUN PROCESSING:

%> java gov.epa.trim.expo.inhalation.ApexProcessor -db apexcheck -params D:\models\apex330\p-LACOnewpopfiles.txt -cas 71-43-2 -popdb  apexpopdb -source Leaking -facility Plant -exportfile D:/exportsummary.txt

 

-db   The name of database that contains APEX results
-params   The location of the params file for this APEX run
-cas   The CAS number for the chemical in the APEX run
-popdb   The APEX Population database name that contains population information for this APEX run
-source OPTIONAL The Source defined for this particular APEX run
-facility OPTIONAL The Facility defined for this particular APEX run
-exportfile OPTIONAL The location of a file where a summary can be exported
-psum OPTIONAL The location of the psum (persons) file for this APEX run
-sites OPTIONAL The location of the sites file for this APEX run

Notes:

  1. The db, params, cas, popdb parameters are required.
  2. If the psum or the sites options are specified, then they will override the locations in the params file.
  3. The exportfile is optional. If a location is specified, a summary file will be exported to that location.
  4. The source and facility are optional. If a source and/or facility are not specified here, but are included in the scenario name in the params file, then those would be used. If they are specified in both places, then the ones on the command line will be used. If they are not specified in either location, then they will be tagged as unspecified with an ID of 0.


B. MULTIPLE APEX RUNS PROCESSING:

%> java gov.epa.trim.expo.inhalation.ApexProcessor -control D:\trim\apexdbproc\control.txt

-control                                                             A control file to ingest multiple APEX runs


An example control file is provided below:


ApexOutputDB = apextesting2

ApexPopDB = apexpopdb2

ExportFile = D:/trash/risksummary.txt

CAS = 71-43-2, 7440-47-3

Params Files = D:/models/apex_epa/Params_oth3sources.txt, D:/models/apex_epa/Params_Chromium.txt

Sources = Leaking, Leaking

Facilities = Plant, Plant


Notes:

  1. The ApexOutputDB, ApexPopDB, CAS and Params Files parameters are required. ExportFile, Sources, Facilities are optional.
  2. CAS, Params Files, and Sources/Facilities (when they are specified) need to have same number of values delimited by commas.
  3. The processor will loop through each combination of CAS, Params File, Source and Facility in the given order. Please recheck the values and their order before starting the processor.
  4. If Sources and/or Facilities are not specified here, but are included in the scenario name in the each params file, then those would be used. If they are specified in both places, then the ones in the control file will be used. If they are not specified in either location, then they will be tagged as unspecified with an ID of 0.
  5. The multiple run processing setup can be used to process a single run as well.

An example output summary file:

----------------------------------------------------------------------------------------------------------

RunID RandomSeed #prof start_date end_date risk_t year cas  SAID StudyArea FID Facili SID SourceType  param_file

725284000 547862400 50000 1996-01-01 1996-12-31 1996 1 71-43-2 1 Houston 1 Plant 1 Leaking D:/models/apex_epa/Param_Files/P322_Benzene.txt

725344000 547862400 50000 1996-01-01 1996-12-31 1996 1 7440-47-3 1 Houston 1 Plant 1 Leaking D:/models/apex_epa/Param_Files/P322_Chromium.txt

455284000 547862400 50000 1996-01-01 1996-12-31 1996 1 71-43-2 1 Houston 2 Factory 1 Leaking D:/models/apex_epa/Param_Files/P322_Benzene.txt

455284000 547862400 50000 1996-01-01 1996-12-31 1996 1 7440-47-3 1 Houston 2 Factory 1 Leaking D:/models/apex_epa/Param_Files/P322_Chromium.txt

455284000 547862400 50000 1996-01-01 1996-12-31 1996 1 71-43-2 1 Houston 2 Factory 2 OffGassing D:/models/apex_epa/Param_Files/P322_Benzene.txt

455284000 547862400 50000 1996-01-01 1996-12-31 1996 1 7440-47-3 1 Houston 2 Factory 2 OffGassing D:/models/apex_epa/Param_Files/P322_Chromium.txt

---------------------------------------------------------------------------------------------------------


The APEX Output Database

A brief description of the schema for the APEX Output Database is provided below. This partial schema provides important details for the tester. Please note, that this schema is NOT complete. For a complete APEX Output Database schema, please refer to the "APEX Output Database Schema" in the ***** document.

Table: Results

Field Description
RunID The Run identifier. Linked into the RunParams and Persons table.
PersonID The Person identifier. Linked into the Persons table.
_Events The number of events
AvgExp The average exposure for the person/chemical/source/facility combination.
AvgDose The average dose for the person/chemical/source/facility combination.
MaxExp The maximum exposure for the person/chemical/source/facility combination.
MaxDose The maximum dose for the person/chemical/source/facility combination.
chemical_num The Chemical identifier. Linked into the Chemicals table.
risk_timestep The Year identifier. Linked into the RunParams table.
SourceTypeID The SourceType identifier. Linked into the SourceTypes table.
FacilityID The Facility identifier. Linked into the Facilities table.
StudyAreaID The StudyArea identifier.Linked into the StudyAreas, RunParams and Facilities tables.

Other tables that are linked to the Results table through keys:

  1. Persons: Contains PersonID and RunID, both linked to the Results table.
  2. Chemicals: Contains chemical_num linked to the Results table.
  3. SourceTypes: Contains SourceTypeID linked to the Results table.
  4. Facilities: Contains FacilityID linked to the Results table.
  5. StudyAreas: Contains StudyAreaID that links into the RunParams, Facilities and Results tables.
  6. RunParams: Lists all the Run parameters and contains the RunID
  7. Sectors: Contains a sector_num linked to the Persons table and an hsectID that links to the APEX Population Database hsectTable table.
  8. AirDistricts: Contains an airdistrict_num linked into the Sectors table.
  9. TempZones: Contains an tempzone_num linked into the Sectors table.
  10. Counties: Lists all the counties included in a run indexed by the RunID
  11. PopulationFiles: Lists all the population files used in a run indexed by the RunID
  12. Races: Contains RaceID that links into the Persons table and to the races table in the APEX Population Database.
  13. Summary: Contains a summary of each run.