# All file paths below are relative to the `ingest` directory

# taxon for `rubella`
ncbi_taxon_id: "11041"

# entrez search term for `rubella`
entrez_search_term: "txid11041[Primary Organism]"

# The list of NCBI Datasets fields to include from NCBI Datasets output
# These need to be the "mnemonics" of the NCBI Datasets fields, see docs for full list of fields
# https://www.ncbi.nlm.nih.gov/datasets/docs/v2/reference-docs/command-line/dataformat/tsv/dataformat_tsv_virus-genome/#fields
# Note: the "accession" field MUST be provided to match with the sequences
ncbi_datasets_fields:
  - accession
  - isolate-lineage
  - geo-region
  - geo-location
  - release-date
  - update-date
  - length
  - submitter-names
  - submitter-affiliation
  - is-lab-host
  - is-vaccine-strain

# Config parameters related to the curate pipeline
curate:
  # The path to the local geolocation rules within the pathogen repo
  local_geolocation_rules: "defaults/geolocation_rules.tsv"
  # List of field names to change where the key is the original field
  # name and the value is the new field name. The original field names
  # should match the ncbi_datasets_fields provided above. This is the
  # first step in the pipeline, so any references to field names in
  # the configs below should use the new field names.
  field_map:
    accession: accession
    accession_version: accession_version
    isolate-lineage: isolate_lineage
    geo-region: region
    geo-location: location
    release-date: date_released
    update-date: date_updated
    length: length
    submitter-names: full_authors
    submitter-affiliation: institution
    is-lab-host: is_lab_host
    is-vaccine-strain: is_vaccine_strain
    clade: clade
  # List of date fields to standardize to ISO format YYYY-MM-DD
  date_fields: ["date", "date_released", "date_updated"]
  # Field name storing `geo_loc_name` value
  genbank_location_field: "location"
  # List of expected date formats that are present in the date fields
  # provided above. These date formats should use directives expected
  # by datetime.
  # See https://docs.python.org/3.9/library/datetime.html#strftime-and-strptime-format-codes
  expected_date_formats:
    ["%Y", "%Y-%m", "%Y-%m-%d", "%d-%b-%Y", "%b-%Y", "%Y-%m-%dT%H:%M:%SZ"]
  titlecase:
    # List of string fields to titlecase
    fields: ["region", "country", "division", "location"]
    # List of abbreviations not cast to titlecase, keeps uppercase
    abbreviations: ["USA"]
    # Articles that should not be cast to titlecase
    articles:
      - and
      - d
      - de
      - del
      - des
      - di
      - do
      - en
      - l
      - la
      - las
      - le
      - los
      - nad
      - of
      - op
      - sur
      - the
      - y
  # Metadata field that contains the list of authors associated with the sequence
  authors_field: "full_authors"
  # Default value to use if the authors field is empty
  authors_default_value: "?"
  # Name to use for the generated abbreviated authors field
  abbr_authors_field: "authors"
  # Path to the manual annotations file
  annotations: "defaults/annotations.tsv"
  # The ID field in the metadata to use to merge the manual annotations
  annotations_id: "accession"
  # The ID field in the metadata to use as the sequence id in the output FASTA file
  output_id_field: "accession"
  # The field in the NDJSON record that contains the actual genomic sequence
  output_sequence_field: "sequence"
  # The column name to use to join main metadata with GenBank genotype data
  metadata_id_column: "accession"
  # The list of metadata columns to keep in the final output of the curation pipeline.
  metadata_columns:
    - accession
    - accession_version
    - strain
    - isolate_lineage
    - genbank_genotype
    - region
    - country
    - division
    - location
    - date
    - date_released
    - date_updated
    - length
    - full_authors
    - authors
    - institution
    - is_lab_host
    - is_vaccine_strain
    - url
    - clade
nextclade:
  dataset_name: "nextstrain/rubella/E1"
  field_map:
    seqName: "seqName"
    clade: "clade"
    coverage: "coverage"
    totalMissing: "missing_data"
    totalSubstitutions: "divergence"
    totalNonACGTNs: "nonACGTN"
    qc.overallStatus: "QC_overall"
    qc.missingData.status: "QC_missing_data"
    qc.mixedSites.status: "QC_mixed_sites"
    qc.privateMutations.status: "QC_rare_mutations"
    qc.snpClusters.status: "QC_snp_clusters"
    qc.frameShifts.status: "QC_frame_shifts"
    qc.stopCodons.status: "QC_stop_codons"
    frameShifts: "frame_shifts"
    privateNucMutations.reversionSubstitutions: "private_reversion_substitutions"
    privateNucMutations.labeledSubstitutions: "private_labeled_substitutions"
    privateNucMutations.unlabeledSubstitutions: "private_unlabeled_substitutions"
    privateNucMutations.totalReversionSubstitutions: "private_total_reversion_substitutions"
    privateNucMutations.totalLabeledSubstitutions: "private_total_labeled_substitutions"
    privateNucMutations.totalUnlabeledSubstitutions: "private_total_unlabeled_substitutions"
    privateNucMutations.totalPrivateSubstitutions: "private_total_private_substitutions"
    qc.snpClusters.clusteredSNPs: "private_snp_clusters"
    qc.snpClusters.totalSNPs: "private_total_snp_clusters"
  id_field: "seqName"
