Command line interface
CLI utilities in CCBR Tools
Main CLI
Usage: ccbr_tools [OPTIONS] COMMAND [ARGS]...
Utilities for CCBR Bioinformatics Software
For more options, run: ccbr_tools [command] --help
https://ccbr.github.io/Tools/
Options:
-v, --version Show the version and exit.
-h, --help Show this message and exit.
Commands:
send-email Send an email (works on biowulf)
quarto-add Add a quarto extension
install Install a specific version of a CCBR software package,...
cite Print the citation in the desired format
version Print the version of ccbr_tools
All installed tools:
ccbr_tools
gb2gtf
get_hpcname
hf
intersect
jobby
jobinfo
module_list
peek
spooker
send-email
Usage: ccbr_tools send-email [OPTIONS] [TO_ADDRESS] [TEXT]
Send an email (works on biowulf)
Arguments:
to_address The email address of the recipient
text The plain text content of the email
Options:
-s, --subject TEXT The subject line of the email
-a, --attach-html PATH The file path to the HTML attachment
-r, --from-addr TEXT The email address of the sender
-d, --debug Return the Email Message object without sending the
email
-h, --help Show this message and exit.
quarto-add
Usage: ccbr_tools quarto-add [OPTIONS] EXT_NAME
Add a quarto extension
Arguments:
ext_name The name of the extension in ccbr_tools
Examples:
ccbr_tools quarto-add fnl
Options:
-h, --help Show this message and exit.
Available extensions: fnl
install
Usage: ccbr_tools install [OPTIONS] TOOL_NAME VERSION_TAG
Install a specific version of a CCBR software package, tool, or pipeline on
a supported HPC.
Args:
tool_name (str): The name of the software package to install.
version_tag (str): The version tag to install.
Options:
--run Execute the install script; otherwise, just print it. It is a
good idea to dry-run this script first to ensure the commands
are correct, then run again with --run.
--branch TEXT Branch or tag to install from GitHub. Use this option if the
version is not a tag, e.g. for testing development versions.
--type TEXT Type of software to install. Must be a class in
`ccbr_tools.software`. If not specified, the type will be
determined automatically (i.e. for CCBR software).
--hpc TEXT HPC to install on. If not specified, the HPC will be detected
automatically.
-h, --help Show this message and exit.
cite
Usage: ccbr_tools cite [OPTIONS] CITATION_FILE
Print the citation in the desired format
citation_file : Path to a file in Citation File Format (CFF) [default: the
CFF for ccbr_tools]
Options:
-f, --output-format [apalike|bibtex|cff|codemeta|endnote|ris|schema.org|zenodo]
Output format for the citation
-h, --help Show this message and exit.
version
Usage: ccbr_tools version [OPTIONS]
Print the version of ccbr_tools
Options:
-d, --debug Print the path to the VERSION file
-h, --help Show this message and exit.
Additional utilities
gb2gtf
Convert GenBank files to GTF format.
Usage: gb2gtf sequence.gb > sequence.gtf
get_hpcname
hf
Finds homologs in human and mouse.
About:
hf or HomologFinder finds homologs in human and mouse.
if the input gene or genelist is human, then it returns mouse homolog(s) and vice versa
Usage:
$ hf -h
Examples:
$ hf -g ZNF365
$ hf -l Wdr53,Zfp365
$ hf -f genelist.txt
usage: hf [-h] [-v] [-g GENE] [-l GENELIST] [-f GENELISTFILE]
Get Human2Mouse (or Mouse2Human) homolog gene or genelist
options:
-h, --help show this help message and exit
-v, --version show program's version number and exit
-g GENE, --gene GENE single gene name
-l GENELIST, --genelist GENELIST
comma separated gene list
-f GENELISTFILE, --genelistfile GENELISTFILE
genelist in file (one gene per line)
intersect
USAGE:
intersect filename1 filename2 f1ColumnIndex F2ColumnIndex
--Ex. intersect file1 file2 0 0
jobby
Usage:
jobby <jobid1> [jobid2 ...] [--tsv|--json|--yaml] [--outerr] [--include-completed]
jobby <jobid1>,<jobid2> [--tsv|--json|--yaml] [--outerr] [--include-completed]
jobby snakemake.log [--tsv|--json|--yaml] [--outerr] [--include-completed]
jobby .nextflow.log [--tsv|--json|--yaml] [--outerr] [--include-completed]
jobby -v or --version
jobby -h or --help
jobinfo
Get HPC usage metadata for a list of slurm jobids on biowulf
About:
This wrapper script works only on BIOWULF!
This script usage the "dashboard_cli" utility on biowulf to get HPC usage metadata
for a list of slurm jobids. These slurm jobids can be either provided at command
line or extracted from a snakemake.log file. Using snakemake.log file option together
with --failonly option lists path to the STDERR files for failed jobs. This can be
very useful to debug failed Snakemake workflows.
USAGE:
$ jobinfo -h
Example:
$ jobinfo -j 123456,7891011
$ jobinfo -s /path/to/snakemake.log
$ jobinfo -j 123456,7891011 -o /path/to/report.tsv
$ jobinfo -s /path/to/snakemake.log --failonly
usage: jobinfo [-h] [-v] [-j JOBLIST] [-s SNAKEMAKELOG] [-o OUTPUT] [-f]
Get slurm job information using slurm job id or snakemake.log file
options:
-h, --help show this help message and exit
-v, --version show program's version number and exit
-j JOBLIST, --joblist JOBLIST
comma separated list of jobids. Cannot be used
together with -s option.
-s SNAKEMAKELOG, --snakemakelog SNAKEMAKELOG
snakemake.log file. Slurm jobids are extracted from
here. Cannot be used together with -j option.
-o OUTPUT, --output OUTPUT
Path to output file. All jobs (all states) and all
columns are reported in output file.
-f, --failonly output FAILED jobs only (onscreen). Path to the STDERR
files for failed jobs. All jobs are reported with -o
option.
module_list
Usage:
module_list # List all loaded modules in JSON format
module_list <module> # Get version of a specific loaded module
module_list -h | --help # Show this help message
peek
USAGE: peek <file.tsv> [buffer]
Assumptions:
Input file is tab delimited
└── Globbing supported: *.txt
Optional:
buffer = 40 (default)
└── Changing buffer will increase/decrease output justification
spooker
Usage: spooker [OPTIONS]
spooker 👻
This command is designed to be used as part of the
OnComplete/OnSuccess/OnError handlers as part of Snakemake and Nextflow
pipelines. It collects metadata about the pipeline run, bundles it into a
tarball, and saves it to a common location for later retrieval.
Options:
--outdir PATH Output directory for the pipeline run
--name TEXT Name of the pipeline
--version TEXT Version of the pipeline
--path PATH Path to the pipeline source
-h, --help Show this message and exit.