Package: tbpore
TBporeMycobacterium tuberculosisgenomic analysis from Nanopore sequencing dataTable of ContentsSynopsisCitationInstallationConfiguring the decontamination database indexPerformanceUsageSynopsistbporeis a tool with two main goals.
First is to process Nanopore Mycobacterium tuberculosis sequencing data to describe
variants with respect to the
canonical TB strain H37Rv and predict antibiotic resistance (commandtbpore process).
Variant description is done by decontaminating reads, calling variants withbcftoolsand filtering variants.
Antibiotic resistance is predicted
withmykrobe.
Second,tbporecan be used to cluster TB samples based on their genotyping and a given
distance threshold (commandtbpore cluster).CitationTBpore is a slimmed-down version of
thefull pipelineused
in our paper 👇Hall, M. B. et al. Evaluation of Nanopore sequencing for Mycobacterium tuberculosis drug susceptibility testing and outbreak investigation: a genomic analysis.The Lancet Microbe0, (2022) doi:10.1016/S2666-5247(22)00301-9.InstallationcondaPrerequisite:conda(and bioconda channelcorrectly set up)$condainstalltbporepipThe python components oftbporeare availble to install throughPyPI.pipinstalltbporeHowever, you will need to install the following dependencies, which cannot be
installed through PyPI.Dependenciesrasusapsdmversion 0.1.xsamtoolsversion 1.13bcftoolsversion 1.13mykrobeversion 0.12.xminimap2version 2.22seqkitversion 2.xnanoqversion 0.9.xWe make no guarentees about the performance oftbporewith versions other than those
specified above. In particular, thebcftoolsversion is very important. The latest
versions of the other dependencies can likely be used.ContainerDocker images are provided through biocontainers.singularityPrerequisite:singularity$URI="docker://quay.io/biocontainers/tbpore:<tag>"$singularityexec"$URI"tbpore--helpseeherefor valid values for<tag>.dockerPrerequisite:Docker$dockerpullquay.io/biocontainers/tbpore:<tag>
$dockerrunquay.io/biocontainers/tbpore:<tag>tbpore--helpseeherefor valid values for<tag>.Configuring the decontamination database indexAfter installing TBpore, you will need to download the decontamination database index.$ tbpore downloadBy default, this will download the index
to${HOME}/.tbpore/decontamination_db/remove_contam.map-ont.mmi, as this is the
default locationtbpore processwill search for.If you prefer to download the index to another location, this can be done with$ tbpore download -o other/location/db.mmiKeep in mind, if you specify a non-default location, you will need to use the--dboption when runningtbpore process.Performancetbpore processBenchmarked on 151 TB ONT samples with 1 thread:Runtime:2103s avg,4048s max (s = seconds);RAM:12.4GB avg,13.1GB max (GB = Gigabytes);tbpore clusterClustering 151 TB ONT samples:Runtime:286s;RAM:<1GB;UsageGeneral usageUsage: tbpore [OPTIONS] COMMAND [ARGS]...

Options:
  -h, --help     Show this message and exit.
  -V, --version  Show the version and exit.
  -v, --verbose  Turns on debug-level logger. Option is mutually exclusive
                 with quiet.
  -q, --quiet    Turns off all logging except errors. Option is mutually
                 exclusive with verbose.

Commands:
  cluster   Cluster consensus sequences
  download  Download and validate the decontamination database
  process   Single-sample TB genomic analysis from Nanopore sequencing dataprocessUsage: tbpore process [OPTIONS] [INPUTS]...

  Single-sample TB genomic analysis from Nanopore sequencing data

  INPUTS: Fastq file(s) and/or a directory containing fastq files. All files
  will be joined into a single fastq file, so ensure they're all part of the
  same sample/isolate.

Options:
  -h, --help                      Show this message and exit.
  -r, --recursive                 Recursively search INPUTS for fastq files
  -S, --name TEXT                 Name of the sample. By default, will use the
                                  first INPUT file with fastq extensions
                                  removed
  -A, --report_all_mykrobe_calls  Report all mykrobe calls (turn on flag -A,
                                  --report_all_calls when calling mykrobe)
  --db PATH                       Path to the decontaminaton database
                                  [default: ${HOME}/.tbpore/decontamination_db/
                                  remove_contam.map-ont.mmi]
  -m, --metadata PATH             Path to the decontaminaton database metadata
                                  file  [default: /Users/michaelhall/Projects/
                                  tbpore/data/decontamination_db/remove_contam
                                  .tsv.gz]
  -o, --outdir DIRECTORY          Directory to place output files  [default:
                                  .]
  --tmp DIRECTORY                 Specify where to write all (tbpore)
                                  temporary files. [default: <outdir>/.tbpore]
  -t, --threads INTEGER           Number of threads to use in multithreaded
                                  tools  [default: 1]
  -d, --cleanup / -D, --no-cleanup
                                  Remove all temporary files on *successful*
                                  completion  [default: no-cleanup]
  --cache DIRECTORY               Path to use for the cache  [default:
                                  /Users/michaelhall/.cache]clusterUsage: tbpore cluster [OPTIONS] [INPUTS]...

  Cluster consensus sequences

  Preferably input consensus sequences previously generated with tbpore
  process.

  INPUTS: Two or more consensus fasta sequences. Use glob patterns to input
  several easily (e.g. output/sample_*/*.consensus.fa).

Options:
  -h, --help                      Show this message and exit.
  -T, --threshold INTEGER         Clustering threshold  [default: 6]
  -o, --outdir DIRECTORY          Directory to place output files  [default:
                                  .]
  --tmp DIRECTORY                 Specify where to write all (tbpore)
                                  temporary files. [default: <outdir>/.tbpore]
  -t, --threads INTEGER           Number of threads to use in multithreaded
                                  tools  [default: 1]
  -d, --cleanup / -D, --no-cleanup
                                  Remove all temporary files on *successful*
                                  completion  [default: no-cleanup]
  --cache DIRECTORY               Path to use for the cache  [default:
                                  /Users/michaelhall/.cache]downloadUsage: tbpore download [OPTIONS]

  Download and validate the decontamination database

Options:
  -h, --help         Show this message and exit.
  -o, --output PATH  Download database to a specified filepath  [default: ${HOME}/
                     .tbpore/decontamination_db/remove_contam.map-ont.mmi]
  -f, --force        Force overwrite if the database already exists