Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge additional data during phylogenetic (instead of ingest) workflow #68

Merged
merged 7 commits into from
Mar 3, 2025

Conversation

j23414
Copy link
Collaborator

@j23414 j23414 commented Feb 24, 2025

Description of proposed changes

This PR refines our approach to merging private data—such as latitude and longitude annotations for samples collected at mosquito traps—into state-level phylogenetic trees (e.g. Washington). Previously, we merged private data during the ingest workflow by extending an annotations.tsv file. This led to a convoluted phylogenetic config file that varied depending on whether data was sourced from S3 or from the ingest/results/* merged files.

In this update, private user data is incorporated directly during the phylogenetic workflow. We adopt a variation of the config.additional_inputs method (copied and modified from these lines in avian-flu) and further advocates for a generic pattern for including additional user data as being explored in the pathogen-repo-guide#72.

Config changes

Before

sequences_url: "https://data.nextstrain.org/files/workflows/WNV/sequences.fasta.zst"
metadata_url: "https://data.nextstrain.org/files/workflows/WNV/metadata.tsv.zst"

# Pull in metadata and sequences from the ingest directory after it has been annotated with Washington state-specific metadata
input_metadata: "../ingest/results/metadata.tsv"
input_sequences: "../ingest/results/sequences.fasta"

After

inputs:
  - name: ncbi
    metadata: "s3://nextstrain-data/files/workflows/WNV/metadata.tsv.zst"
    sequences: "s3://nextstrain-data/files/workflows/WNV/sequences.fasta.zst"

additional_inputs:
  - name: private-lat-longs
    metadata: "data-private/metadata.tsv"
    sequences: "data-private/sequences.fasta"

This updated configuration greatly simplifies our documentation, making it easier for other states to modify the Washington state builds and incorporate their own private data.

Related issue(s)

Checklist

  • Checks pass

@j23414 j23414 changed the title WIP: Refactor to merge additional data during phylogenetic (instead of ingest) workflow Merge additional data during phylogenetic (instead of ingest) workflow Feb 25, 2025
@j23414 j23414 marked this pull request as ready for review February 25, 2025 17:14
@DOH-LMT2303
Copy link
Collaborator

I tested these changes in my instance and it ran without issues. Proceeded to check the JSON file in Auspice and the locations specified in the phylogenetic/data-private/metadata.tsv file were displayed in the map as expected when specifying the map geographic location to "location."

@j23414 j23414 force-pushed the 65-refactor-merging-private-data branch from 490d744 to 51c3da1 Compare March 3, 2025 22:56
@j23414 j23414 merged commit 4e83871 into main Mar 3, 2025
4 checks passed
@j23414 j23414 deleted the 65-refactor-merging-private-data branch March 3, 2025 23:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Optional enhancement: Revisit current way of merging private data (via annotations.tsv)
3 participants