diff --git a/ingest/defaults/config.yaml b/ingest/defaults/config.yaml index 8cc4a43..fcdf0d4 100644 --- a/ingest/defaults/config.yaml +++ b/ingest/defaults/config.yaml @@ -34,10 +34,6 @@ ncbi_datasets_fields: # Config parameters related to the curate pipeline curate: - # URL pointed to public generalized geolocation rules - # For the Nextstrain team, this is currently - # 'https://raw.githubusercontent.com/nextstrain/ncov-ingest/master/source-data/gisaid_geoLocationRules.tsv' - geolocation_rules_url: 'https://raw.githubusercontent.com/nextstrain/ncov-ingest/master/source-data/gisaid_geoLocationRules.tsv' # The path to the local geolocation rules within the pathogen repo # The path should be relative to the ingest directory. local_geolocation_rules: 'defaults/geolocation-rules.tsv' diff --git a/ingest/rules/curate.smk b/ingest/rules/curate.smk index d890038..130be50 100644 --- a/ingest/rules/curate.smk +++ b/ingest/rules/curate.smk @@ -13,29 +13,6 @@ Parameters are expected to be defined in `config.curate`. """ -rule fetch_general_geolocation_rules: - output: - general_geolocation_rules="data/general-geolocation-rules.tsv", - params: - geolocation_rules_url=config["curate"]["geolocation_rules_url"], - shell: - """ - curl {params.geolocation_rules_url} > {output.general_geolocation_rules} - """ - - -rule concat_geolocation_rules: - input: - general_geolocation_rules="data/general-geolocation-rules.tsv", - local_geolocation_rules=config["curate"]["local_geolocation_rules"], - output: - all_geolocation_rules="data/all-geolocation-rules.tsv", - shell: - """ - cat {input.general_geolocation_rules} {input.local_geolocation_rules} >> {output.all_geolocation_rules} - """ - - def format_field_map(field_map: dict[str, str]) -> str: """ Format dict to `"key1"="value1" "key2"="value2"...` for use in shell commands. @@ -46,7 +23,7 @@ def format_field_map(field_map: dict[str, str]) -> str: rule curate: input: sequences_ndjson="data/sequences.ndjson", - all_geolocation_rules="data/all-geolocation-rules.tsv", + geolocation_rules=config["curate"]["local_geolocation_rules"], annotations=config["curate"]["annotations"], output: metadata="data/all_metadata.tsv", @@ -90,7 +67,7 @@ rule curate: --authors-field {params.authors_field} \ --default-value {params.authors_default_value} \ | augur curate apply-geolocation-rules \ - --geolocation-rules {input.all_geolocation_rules} \ + --geolocation-rules {input.geolocation_rules} \ | ./scripts/fix-zika-strain-names.py \ | augur curate apply-record-annotations \ --annotations {input.annotations} \