Skip to content

Latest commit

 

History

History
139 lines (92 loc) · 3.45 KB

cli.rst

File metadata and controls

139 lines (92 loc) · 3.45 KB

Command Line Interface

The command-line interface (CLI) offers two modes: a self-test mode and a run mode.

This mode is used to predict antibiotic resistance of Mycobacterium tuberculosis. The primary run command has several options:

geno2phenotb run [-h] [--skip-mtbseq] [-p] -i DIR -o DIR
                --sample-id SampleID
                [-d DrugCode]

Options:

  • -h, --help
  • --skip-mtbseq
  • -p, --preprocess
  • -i, --fastq-dir
  • -o, --output
  • --sample-id
  • -d, --drug

Below is a description of each option:

Show the help message and exit.

Skip the MTBseq step. Precomputed output must be present in the specified FASTQ directory.

Run only the preprocessing steps. The FASTQ reads will be assembled using MTBseq and features extracted. This will skip the prediction.

Path to the input directory where the FASTQ files are located.

As input, a directory with FASTQ files is required. The FASTQ files must follow this naming scheme:

[SampleID]_[LibID]_[*]_[Direction].f(ast)q.gz
                    ^- Optional values.
Direction must be one of R1, R2.

Path to the directory where the final output files should be stored.

SampleID (i.e., ERR/SRR run accession). The ID should match with the ID of the FASTQ files.

The drug for which resistance should be predicted. If you want predictions for several drugs, use the argument several times, i.e., --d AMK --d DCS --d STR. If the flag is not set, predictions for all drugs will be performed.

The DrugCode is a 2 / 3 letter code and can be one of:

AMK, CAP, DCS, EMB, ETH, FQ, INH, KAN, PAS, PZA, RIF, STR

Predict the resistance of the sample (ERR551304) against all drugs:

$ geno2phenotb run -i dir_to_ERR551304/ -o output_dir/ --sample-id ERR551304

Predict only the resistance against AMK and RIF:

$ geno2phenotb run -i dir_to_ERR551304/ -o output_dir/ --sample-id ERR551304 -d AMK -d RIF

Skip the MTBseq steps and use the precomputed output:

$ geno2phenotb run -i dir_to_precomputed/ -o output_dir/ --sample-id ERR551304 --skip-mtbseq

To check the integrity of the installation and dependencies, a self-test can be executed. It does NOT guarantee that everything is okay, but is strong evidence:

geno2phenotb test [-h] (-f | -c)

The available options for the self-test mode are:

  • -h, --help
  • -f, --fast
  • -c, --complete

Descriptions of the self-test mode options:

Show the help message and exit.

Fast test of the installation. This will not test the preprocessing / MTBSeq steps.

Complete test of the installation. This will download ~170 MB from the ENA and start a complete run. Depending on your bandwidth / hardware, this may take a few (5-30) minutes.

To run the complete test (recommended) run:

$ geno2phenotb test -c