Generation of adm2 from GADM for COG-UK samples.
Create a conda environment from environment.yml file.
conda env create -f environment.yml
Additionally a forked version of sjoin.py is used for spatial point 'rounding' to avoid potential edge-cases with coastal postcodes.
The script can be run on an existing .csv file containing sample metadata. This file can be formatted in the standard COG-UK metadata format - in which case default headings for --sampleID and --outerPC can be used (central_sample_id and adm2_private, respectively).
COG_adm2.py metadataInput.csv --output output.csv
Alternatively the column headings used in a non-standardised .csv containing sample metadata can be specified as below.
COG_adm2.py metadataInput.csv\
--sampleID 'sampleID' --outerPC 'outerPostcode' --output ./output.csv