Project

General

Profile

VegX to VegCSV

DwC terms for VegX elements

Total: 33

Steps to switch VegX mappings to VegCSV

  • Note that now, mappings/VegX-VegCSV.stems.csv itself will not be in use, but can be used towards a new CTFS mapping
  1. Create mappings/for_review/VegBIEN-DwC2.specimens.csv by inverting mappings/for_review/DwC2-VegBIEN.specimens.csv
  2. Create mappings/VegX-VegCSV.stems.csv:
    make mappings/VegX-VegCSV.stems.csv-remake
    
  3. In mappings/VegX-VegCSV.stems.csv's output column:
    1. Resolve ambiguous names that appear twice
    2. Search-and-replace simplified XPaths with standardized names
    3. Make maps that depend on it: make mappings
  4. Rename all inputs' VegX maps to VegCSV:
    shopt -s nullglob
    for dir in inputs/*/maps/; do
        (cd $dir && { for map in VegX*.csv; do svn mv "$map" "${map/VegX/VegCSV}" || break; done; }) || break
    done
    
  5. For each input:
    1. Create VegCSV.<table>.csv by joining what was VegX.<table>.csv to VegX-VegCSV.stems.csv:
      for map in inputs/*/maps/VegCSV.{plots,organisms,stems}.csv; do
          bin/in_place "$map" env only_one=1 map_1_core_only=1 quiet=1 bin/join mappings/VegX-VegCSV.stems.csv || break
          bin/in_place "$map" bin/cols 0 1 2 || break
      done
      
  6. Clean up the changed maps: make
  7. Check that the test outputs have only minor additions (due to merging of some previously separate XPaths): make test
  8. svn add inputs/*/maps/.*.last_cleanup
  9. In mappings/VegX-VegCSV.stems.csv, remove user-defined VegX terms, which will no longer be in use
    bin/in_place mappings/VegX-VegCSV.stems.csv grep -vF simpleUserdefined