Giter VIP home page Giter VIP logo

seasonal-flu's Introduction

nextstrain.org/flu

Build Status

This is the Nextstrain build for seasonal influenza viruses, available online at nextstrain.org/flu.

The build encompasses fetching data, preparing it for analysis, doing quality control, performing analyses, and saving the results in a format suitable for visualization (with auspice). This involves running components of Nextstrain such as fauna and augur.

All influenza virus specific steps and functionality for the Nextstrain pipeline should be housed in this repository.

This build is more complicated than other standard nextstrain build because all four currently circulating seasonal influenza lineages (A/H3N2, A/H1N1pdm, B/Vic and B/Yam) are analyzed using the same Snakefile with appropriate wildcards. In addition, we run analyses of both the HA and NA segments of the influenza virus genome and analyze datasets that span different time intervals (eg 2, 3, 6 years). Furthermore, the Nextstrain analysis of influenza virus evolution also uses antigenic and serological data from different WHO collaborating centers.

The different builds for the general public and the different WHO collaborating centers are configured via separate config files. The Nextstrain build configs (upload, nextstrain-public, private.nextflu.org) are used for our semi-automated builds through our GitHub Action workflows.

Example build

You can run an example build using the example data provided in this repository.

First follow the standard installation instructions for Nextstrain's suite of software tools.

Then run the example build via:

nextstrain build .  --configfile profiles/example/builds.yaml

When the build has finished running, view the output Auspice trees via:

nextstrain view auspice/

Quickstart with GISAID data

Navigate to GISAID. Select the "EpiFlu" link in the top navigation bar and then select "Search" from the EpiFlu navigation bar. From the search interface, select A/H3N2 human samples collected in the last six months, as shown in the example below.

Search for recent A/H3N2 data

Also, under the "Required Segments" section at the bottom of the page, select "HA". Then select the "Search" button. Select the checkbox in the top-left corner of the search results (the same row with the column headings), to select all matching records as shown below.

Select all matching records from search results

Select the "Download" button. From the "Download" window that appears, select "Isolates as XLS (virus metadata only)" and then select the "Download" button.

Download metadata

Create a new directory for these data in the seasonal-flu working directory.

mkdir -p data/h3n2/

Save the XLS file you downloaded (e.g., gisaid_epiflu_isolates.xls) as data/h3n2/metadata.xls. Return to the GISAID "Download" window, and select "Sequences (DNA) as FASTA". In the "DNA" section, select the checkbox for "HA". In the "FASTA Header" section, enter only Isolate name. Leave all other sections at the default values.

Download sequences

Select the "Download" button. Save the FASTA file you downloaded (e.g., gisaid_epiflu_sequences.fasta) as data/h3n2/raw_sequences_ha.fasta.

Run the Nextstrain workflow for these data to produce an annotated phylogenetic tree of recent A/H3N2 HA data with the following command.

nextstrain build . --configfile profiles/gisaid/builds.yaml

When the workflow finishes running, visualize the resulting tree with the following command.

nextstrain view auspice

Explore the configuration file for this workflow by opening profiles/gisaid/builds.yaml in your favorite text editor. This configuration file determines how the workflow runs, including how samples get selected for the tree. Try changing the number of maximum sequences retained from subsampling from 100 to 500 and the geographic grouping from region to country. Rerun your analysis by adding the --forceall flag to the end of the nextstrain build command you ran above. How did those changes to the configuration file change the tree?

Explore the other configuration files in profiles/, to see other examples of how you can build your own Nextstrain workflows for influenza.

History

  • Prior to March 31, 2023, we selected strains for each build using a custom Python script called select_strains.py. With the merge of the refactored workflow, we have since used a configuration file to define the augur filter query logic we want for strain selection per build.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.