Skip to main content

A pipeline implementing TB-Profiler for batch detection and reporting of anti-microbial resistance in TB for public health and clinical use.

Project description

Python 3.7

Troika

Detection of resistance mechanisms in Mycobacterium tuberculosis is dependent upon identification of SNPs that may confer decreased susceptibility to anti-mycobacterial drugs. Troika is a pipeline, which calls SNPs for both phylogenetic analysis and determination of AST. Troika leverages high quality tools, including Snippy and TB-profiler and its related database to detect resistance conferring mutations from Illumina read data and filters these results for reporting for public health and clinical use in Australia.

Motivation

There are many tools and databases available, however, for the purposes of reporting genomic AST for M. tuberculosis in the context of public health and clinical use in Australia customisation is required. Rather than reinventing the wheel, Troika leverages a high quality database and a detection tool which is highly customisable.

Pipeline

Troika is designed for batch reporting of AST in M. tuberculosis isolates generated from Illumina reads and phylogenetic analysis and clustering to identify potentially related isolates. This pipeline is in use at MDU Victoria Australia for Tuberculosis surveillance and AST reporting.

Installation

Conda (Recomended)

TO COME

PyPi

pip3 install Troika-Tb

Running Troika

input

Input for troika is a tab-delimited file containing three columns (no header) <sample_name> <path_to_read1> <path_to_read2>

troika -h

usage: troika_tb.py [-h] [-v] [--input_file INPUT_FILE] [--detect_species]
                    [--resistance_only] [--Singularity]
                    [--profiler_singularity_path PROFILER_SINGULARITY_PATH]
                    [--snippy_singularity_path SNIPPY_SINGULARITY_PATH]
                    [--workdir WORKDIR] [--resources RESOURCES] [--jobs JOBS]
                    [--profiler_threads PROFILER_THREADS]
                    [--kraken_threads KRAKEN_THREADS] [--kraken_db KRAKEN_DB]
                    [--snippy_threads SNIPPY_THREADS] [--mode {mdu,normal}]
                    [--positive_control POSITIVE_CONTROL]
                    [--db_version DB_VERSION] [--min_cov MIN_COV]
                    [--min_aln MIN_ALN]

Troika - a pipeline for phylogenentic analysis, detection and reporting of
genomic AST in Mtb If an arg is specified in more than one place, then
commandline values override environment variables which override defaults.

optional arguments:
  -h, --help            show this help message and exit
  -v, --version         show program's version number and exit
  --input_file INPUT_FILE, -i INPUT_FILE
                        Input file tab-delimited file 3 columns isolate_id
                        path_to_r1 path_to_r2 (default: )
  --detect_species, -d  Set if you would like to detect species - note if not
                        set troika may include non-tuberculosis species in the
                        analysis. (default: False)
  --resistance_only     If detection of resistance mutations only is needed.
                        Phylogeny will not be performed. (default: False)
  --Singularity, -S     If singularity is to be used for troika. (default:
                        False)
  --profiler_singularity_path PROFILER_SINGULARITY_PATH, -ps PROFILER_SINGULARITY_PATH
                        URL for TB-profiler singularity container. (default:
                        docker://mduphl/mtbtools)
  --workdir WORKDIR, -w WORKDIR
                        Working directory, default is current directory
                        (default: /home/khhor/dev/troika_tb)
  --resources RESOURCES, -r RESOURCES
                        Directory where templates are stored (default:
                        troika_tb)
  --jobs JOBS, -j JOBS  Number of jobs to run in parallel. (default: 8)
  --profiler_threads PROFILER_THREADS, -t PROFILER_THREADS
                        Number of threads to run TB-profiler (default: 1)
  --kraken_threads KRAKEN_THREADS, -kt KRAKEN_THREADS
                        Number of threads for kraken (default: 4)
  --kraken_db KRAKEN_DB, -k KRAKEN_DB
                        Path to DB for use with kraken2, if no DB present
                        speciation will not be performed. [env var:
                        KRAKEN2_DEFAULT_DB] (default: None)
  --snippy_threads SNIPPY_THREADS, -st SNIPPY_THREADS
                        Number of threads for snippy (default: 8)
  --mode {mdu,normal}, -m {mdu,normal}
                        If running for MDU service use 'mdu', else use
                        'normal' (default: normal)
  --positive_control POSITIVE_CONTROL, -pc POSITIVE_CONTROL
                        Path to positive control - REQUIRED if running for MDU
                        service (default: )
  --db_version DB_VERSION
                        The version of database being used. (default:
                        TBProfiler-20190820)
  --min_cov MIN_COV, -mc MIN_COV
                        Minimum coverage for quality checks, isolates with
                        coverage below this threshold will not be used in the
                        analysis. (default: 40)
  --min_aln MIN_ALN, -ma     MIN_ALN
                        Minimum alignment for phylogenetic analysis,
                        alignments lower than this threshold will not be
                        included in the calculation of core-genome. (default:
                        80)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

Troika_TB-0.0.5.tar.gz (1.3 MB view hashes)

Uploaded Source

Built Distribution

Troika_TB-0.0.5-py3-none-any.whl (1.3 MB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page