To install dependencies and install ctDNAtool, it's recommended to first create a new clean Conda environment, and then run:
$ poetry build
$ pip install dist/ctdnatool-0.1.0-py3-none-any.whl
This will install the dependencies as well as ctDNAtool.
The software has two entrypoints: ctDNAtool
, which contains the core functionality, and ctDNAflow
which defines a set of workflows, with what we consider the most common use cases of the tool.
To see which commands are available and how to use them, use the --help
flag as shown below:
$ ctDNAflow --help
or
$ ctDNAtool --help
To run the test suite with nox, check for formatting and linting errors, run:
$ make test
To run just the linter, run:
$ make lint
To debug an invocation of the ctDNAtool, use the -d flag after ctDNAtool, as shown below.
$ ctDNAtool -d <COMMAND>
ctDNAflow is a tool for running workflows, based on the commands found in ctDNAtool. The workflows are compositions of multiple commands from ctDNAtool, and are designed with usability in mind.
Usage:
$ ctDNAflow length-data-bed-bin <reference_genome_path> <BAM_file_path>
$ ctDNAflow length-data-chr-bin <reference_genome_path> <BAM_file_path>
The following is an example of an invocation of the command length-data-chr-bin. The command generates length data from a BAM file and bins it in chromosomes, then writes the output to a .tsv file.
$ ctDNAflow length-data-chr-bin hg19.2bit sample.bam -o length_data.tsv
In the example above, the output is directed to the length_data.tsv file.
Further documentation can be found by passing --help after ctDNAflow, or after a specific command.
The output of the commands are written to either a .pickle or .tsv file. For the commands concerning only length data, the default action is to write the output to a .tsv file. The output can be written to a .picke file by passing the -p flag. For all other commands, the output is written to .pickle. The output can be directed using the -o option. If this is not provided, the output will be written to a default filename.