Rethink database to support real-time virus analysis

Flu Pipeline Notes

VDB

Upload documents to VDB

  1. Download sequences and meta information from GISAID
    • In EPIFLU, select host as human, select HA as required segment, select Submission Date >= last upload date to vdb
    • Ideally download about 5000 isolates at a time, may have to split downloads by submission date
    • Download Isolates as XLS with YYYY-MM-DD date format
    • Download Isolates as "Sequences (DNA) as FASTA"
    • Select all DNA
    • Fasta Header as 0: DNA Accession no., 1: Isolate name, 2: Isolate ID, 3: Segment, 4: Passage details/history, 5: Submitting lab
    • DNA Accession no. | Isolate name | Isolate ID | Segment | Passage details/history | Submitting lab
  2. Move files to fauna/data as gisaid_epiflu.xls and gisaid_epiflu.fasta.
  3. Upload to vdb database

Update documents in VDB

  • Update genetic grouping fields

    • python vdb/flu_update.py -db vdb -v flu --update_groupings
    • updates vtype, subtype, lineage
  • Update locations

    • python vdb/flu_update.py -db vdb -v flu --update_locations
    • updates division, country and region from location

Download documents from VDB

  • python vdb/flu_download.py -db vdb -v flu --select locus:HA lineage:seasonal_h3n2 --fstem h3n2
  • python vdb/flu_download.py -db vdb -v flu --select locus:HA lineage:seasonal_h1n1pdm --fstem h1n1pdm
  • python vdb/flu_download.py -db vdb -v flu --select locus:HA lineage:seasonal_vic --fstem vic
  • python vdb/flu_download.py -db vdb -v flu --select locus:HA lineage:seasonal_yam --fstem yam

TDB

Upload documents to TDB

Raw tables from NIMR reports

  1. Convert NIMR report pdfs to csv files
  2. Move csv files to subtype directory in fauna/data/
  3. Upload to tdb database

Flat files

  1. Move line-list tsv files to fauna/data/
  2. Upload to tdb database with python tdb/upload.py -db tdb -v flu --subtype h3n2 --ftype flat --fstem H3N2_HI_titers_upload

CDC files

  1. Move line-list tsv files to fauna/data/
  2. Upload HI titers to tdb database with python tdb/cdc_upload.py -db cdc_tdb -v flu --ftype flat --fstem HITest_Oct2016_to_Sep2017_titers
  3. Upload FRA titers to tdb database with python tdb/cdc_upload.py -db cdc_tdb -v flu --ftype flat --fstem FRA_Oct2016_to_Sep2017_titers

Download documents from TDB

  • python tdb/download.py -db tdb -v flu --subtype h3n2
  • python tdb/download.py -db tdb -v flu --subtype h1n1pdm
  • python tdb/download.py -db tdb -v flu --subtype vic
  • python tdb/download.py -db tdb -v flu --subtype yam