ETL pipeline for single-cell RNA-seq data
Project description
scp-ingest-pipeline
File Ingest Pipeline for Single Cell Portal
The SCP Ingest Pipeline is an ETL pipeline for single-cell RNA-seq data.
Prerequisites
- Python 3.7+
- Google Cloud Platform project
- Suitable service account (SA) and MongoDB VM in GCP. SA needs roles "Editor", "Genomics Pipelines Runner", and "Storage Object Admin". Broad Institute engineers: see instructions here.
- SAMTools, if using
ingest/make_toy_data.py
Install
Fetch the code, boot your virtualenv, install dependencies:
git clone git@github.com:broadinstitute/scp-ingest-pipeline.git
cd scp-ingest-pipeline
python3 -m venv env --copies
source env/bin/activate
pip install -r requirements.txt
And if using ingest/make_toy_data.py
:
brew install samtools
Now get secrets from Vault to set environment variables needed to write to the database:
export BROAD_USER="<username in your email address>"
export DATABASE_NAME="single_cell_portal_development"
vault login -method=github token=`~/bin/git-vault-token`
# Get username and password
vault read secret/kdux/scp/development/$BROAD_USER/mongo/user
export MONGODB_USERNAME="<username from Vault>"
export MONGODB_PASSWORD="<password from Vault>"
# Get external IP address for host
vault read secret/kdux/scp/development/$BROAD_USER/mongo/hostname
export DATABASE_HOST="<ip from Vault (omit brackets)>"
Git hooks
After installing Ingest Pipeline, add Git hooks to help ensure code quality:
pre-commit install && pre-commit install -t pre-push
The hooks will expect that git-secrets has been set up. If you are a Broad Institute employee who has not done this yet, please see: broadinstitute/single_cell_portal_configs for specific guidance.
Bypass hooks
In rare cases, you might need to skip Git hooks, like so:
- Skip commit hooks:
git commit ... --no-verify
- Skip pre-push hooks:
git push ... --no-verify
Test
After installing:
source env/bin/activate
cd tests; pytest
Use
Run this every time you start a new terminal to work on this project:
source env/bin/activate
See ingest_pipeline.py
for usage examples.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for scp-ingest-pipeline-1.3.7rc1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0cea64d390b210a12ba7bf97d8f139268e26906d4147968210d3d8f501eb425a |
|
MD5 | b1f6fdda4e6e76f6c7c77488b735a37e |
|
BLAKE2b-256 | 9eccca094aa090f4ec94a7431916df6d21cdb93b533d871ad4dde19dabc631ee |
Hashes for scp_ingest_pipeline-1.3.7rc1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6a70d08cbe66096f16930e2af5738fb88d9747d58c9121fd9f04c7bf0cb27954 |
|
MD5 | f99238572239a6a8a8b6fbc3e6db5d42 |
|
BLAKE2b-256 | dbea3ad1df4ceed0a60c6982c58eeaad27160bf08f5e08bfc50c82c91d1e3aa5 |