File: index.rst

package info (click to toggle)
augur 24.4.0-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 25,312 kB
  • sloc: python: 14,253; sh: 227; makefile: 35
file content (51 lines) | stat: -rw-r--r-- 1,672 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
============
augur index
============

.. contents:: Table of Contents
   :local:

----

.. argparse::
    :module: augur
    :func: make_parser
    :prog: augur
    :path: index

Speed up filtering with a sequence index
========================================

As we describe in :doc:`the phylogenetic workflow tutorial <docs.nextstrain.org:tutorials/creating-a-phylogenetic-workflow>`, augur index precalculates the composition of the sequences (e.g., numbers of nucleotides, gaps, invalid characters, and total sequence length) prior to filtering.
The resulting sequence index speeds up subsequent filter steps especially in more complex workflows.

.. code-block:: bash

    mkdir -p results/
    augur index \
        --sequences data/sequences.fasta \
        --output results/sequence_index.tsv

The first lines in the sequence index look like this.

.. code-block:: bash

    strain	length	A	C	G	T	N	other_IUPAC	-	?	invalid_nucleotides
    PAN/CDC_259359_V1_V3/2015	10771	2952	2379	3142	2298	0	0	0	0	0
    COL/FLR_00024/2015	10659	2921	2344	3113	2281	0	0	0	0	0
    PRVABC59	10675	2923	2351	3115	2286	0	0	0	0	0
    COL/FLR_00008/2015	10659	2924	2344	3110	2281	0	0	0	0	0

We then provide the sequence index as an input to augur filter commands to speed up filtering on sequence-specific attributes.

.. code-block:: bash

    augur filter \
        --sequences data/sequences.fasta \
        --sequence-index results/sequence_index.tsv \
        --metadata data/metadata.tsv \
        --exclude config/dropped_strains.txt \
        --output results/filtered.fasta \
        --group-by country year month \
        --sequences-per-group 20 \
        --min-date 2012