📖 Documentation: https://sage-bionetworks-challenges.github.io/cnb-tools
👾 Source code: https://github.com/Sage-Bionetworks-Challenges/cnb-tools
cnb-tools is a set of tools and commands that provides an interface for managing crowd-sourced challenges hosted on Synapse.org, including but not limited to, DREAM Challenges.
To fully utilize cnb-tools, you must have a Synapse account and provide your credentials to the tool. First, generate a Synapse Personal Access Token (PAT) with all token permissions enabled.
Next, run the following command, then follow the prompts to enter your Synapse username and PAT:
synapse configThis will create a .synapseConfig file in your home directory. For
security, we recommend updating its permissions so that other users
on your machine do not have read access to your credentials, e.g.
chmod 600 ~/.synapseConfigFor best practice, use a Python environment to install cnb-tools rather than directly into your base env. In our docs, we will be using miniconda, but you can use miniforge, venv, pyenv, etc.
# Create a new env and activate it
conda create -n cnb-tools python=3.12 -y
conda activate cnb-tools
# Install cnb-tools using pip
pip install cnb-toolsⓘ NOTE
cnb-tools builds off of the Synapse Python Client — by installing cnb-tools, you will also be installing synapseclient.
Verify the installation with:
cnb-toolsIf you rather not install cnb-tools onto your machine, you may still use it
via Docker! The package and list of versions are available here.
To provide your Synapse credentials to the Docker container, you must first
create a file with your Synapse PAT as the SYNAPSE_AUTH_TOKEN environment
variable:
SYNAPSE_AUTH_TOKEN=<YOUR PAT>The docker run command will look something like this, assuming the file is
named ~/.synapse-config:
docker run --rm \
--env-file ~/.synapse-config \
ghcr.io/sage-bionetworks-challenges/cnb-tools \
COMMAND [ARGS]cnb-tools is released under the Apache 2.0 license.
