Automating NGS Projects
With Basepair, you can fully automate an NGS project—create a project, add multiple samples, run analyses, and share everything with another user. Here are the steps:
-
Sign in to your Basepair account →
https://{domain}/ -
Download your API config file — follow the steps in Setup to download it from your dashboard. Then make it available to the CLI using one of:
# Option A — environment variable (persists for the session)
export BP_CONFIG_FILE=/path/to/basepair.config.json
# Option B — per-command flag
basepair -c /path/to/basepair.config.json <subcommand> -
Install the Basepair package
pip install basepair -
Create a new project for this data (note the returned project ID)
basepair project create --name desired_project_name -
Add your samples (note each sample ID)
basepair sample create --name Treat_1 --genome hg19 --type rna-seq \
--file1 /path/to/file1_R1.fq.gz --file2 /path/to/file1_R2.fq.gz
basepair sample create --name Control_1 --genome hg19 --type rna-seq \
--file1 /path/to/file2_R1.fq.gz --file2 /path/to/file2_R2.fq.gz
# <add all your other samples> -
Run differential-expression analysis (pipeline ID 8) using the sample and control IDs from step 4
basepair analysis create --pipeline 8 \
--sample 30754 30755 30756 \
--control 30757 30758 30759 -
Share the project with another user (example: give edit permission; you can also use view or admin)
basepair project update -u 1926 --team <team_id> \
--emails collaborator@example.com --perm edit