nanostream-dataflow-simulator
1.7K
In a healthcare setting, being able to access data quickly is vital. For example, a sepsis patient’s survival rate decreases by 6% for every hour we fail to diagnose the species causing the infection and its antibiotic resistance profile.
Typical genomic analyses are too slow, taking weeks or months to complete. You transport DNA samples from the collection point to a centralized facility to be sequenced and analyzed in a batch process. Recently, nanopore DNA sequencers have become commercially available, such as those from Oxford Nanopore Technologies, streaming raw signal-level data as they are collected and providing immediate access to it. However, processing the data in real-time remains challenging, requiring substantial compute and storage resources, as well as a dedicated bioinformatician. Not only is the process is too slow, it’s also failure-prone, expensive, and doesn’t scale.
This source repo contains a prototype implementation of a scalable, reliable, and cost effective end-to-end pipeline for fast DNA sequence analysis using Dataflow on Google Cloud.


There is an installation script install.py that
Before run automatic setup scripts or perform manual steps make sure you
resistance_genes mode you should provide "gene list" file stored in GCS.
You can find sample file in nanostream-dataflow-demo-data bucket. See "Available Reference databases" section below.
Expected "resistance gene list" location is gs://<your project id>-reference-db/gene_info/resistance_genes_list.txt.Open Google Cloud Shell
Clone the project from Github
Set your Cloud Platform project in your session:
gcloud config set project <your project id>
PROJECT_ID=`gcloud config get-value project`
~/.config/gcloud_keys/gcloud_credentials.json JSON file: https://cloud.google.com/docs/authentication/production#obtaining_and_providing_service_account_credentials_manually.
You can do it from the shell as well:gcloud iam service-accounts create nanostream
gcloud projects add-iam-policy-binding ${PROJECT_ID} --member "serviceAccount:nanostream@${PROJECT_ID}.iam.gserviceaccount.com" --role "roles/owner"
gcloud iam service-accounts keys create gcloud_credentials.json --iam-account nanostream@${PROJECT_ID}.iam.gserviceaccount.com
mkdir -p ~/.config/gcloud_keys/
mv gcloud_credentials.json ~/.config/gcloud_keys/gcloud_credentials.json
docker build -t launcher .
docker run \
-v ~/.config/gcloud_keys/:/root/.config/gcloud_keys/ \
-e GOOGLE_CLOUD_PROJECT=${PROJECT_ID} \
-e GOOGLE_APPLICATION_CREDENTIALS=/root/.config/gcloud_keys/gcloud_credentials.json \
launcher
Create a Cloud Firestore database: https://firebase.google.com/docs/firestore/quickstart#create
Upload Reference Databases to a place available to your project. You may use a bucket gs://<your project id>-reference-db created by installation script.
Open Nanostream management application, create New Pipeline.
Start upload your data to upload bucket (gs://<your project id>-upload-bucket/<your folder data>)
Make sure you have installed
gcloud init
gcloud auth application-default login
Download a service account credentials to ~/.config/gcloud_keys/gcloud_credentials.json JSON file: https://cloud.google.com/docs/authentication/production#obtaining_and_providing_service_account_credentials_manually
Clone the project from Github
Build docker launcher
docker build -t launcher .
docker run \
-v ~/.config/gcloud_keys/:/root/.config/gcloud_keys/ \
-v ~/.config/gcloud/:/root/.config/gcloud/ \
-e GOOGLE_CLOUD_PROJECT=<your project id> \
-e GOOGLE_APPLICATION_CREDENTIALS=/root/.config/gcloud_keys/gcloud_credentials.json \
launcher
You can run installation script install.py directly.
Make sure you have installed:
gcloud initpython3 launcher/install.pyFor this project the bucket nanostream-dataflow-demo-data was created
with reference databases of species and antibiotic resistance genes.
The bucket has a structure like:
gs://nanostream-dataflow-demo-data/
|- reference-sequences/
|-- antibiotic-resistance-genes/
|--- DB.fasta
|--- DB.fasta.[amb,ann,bwt,pac,sa]
|-- species/
|--- DB.fasta
|--- DB.fasta.[amb,ann,bwt,pac,sa]
|-- taxonomy
|--- resistance_genes_tree.txt
|--- species_tree.txt
|-- gene-info
|--- resistance_genes_list.txt
where:
bwa in order to improve performance, see details in this SEQanswers answernanostream-dataflow-demo-data - is a public bucket with requester pays option enabled.
You can copy these references to your project with:
gsutil -u <your project id> cp -r gs://nanostream-dataflow-demo-data/reference-sequences gs://<your project id>-reference-db/reference-sequences
Taxonomy files samples required to process data are in taxonomy folder:
gsutil -u <your project id> cp -r gs://nanostream-dataflow-demo-data/taxonomy gs://<your project id>-reference-db/taxonomy
Resistance gene list required to run process data in resistance_gene mode.
Expected location is gs://<your project id>-reference-db/gene_info/resistance_genes_list.txt.
You can find a sample in gene-info folder:
gsutil -u <your project id> cp -r gs://nanostream-dataflow-demo-data/gene-info/resistance_genes_list.txt gs://<your project id>-reference-db/gene_info/resistance_genes_list.txt
Content type
Image
Digest
Size
1.5 GB
Last updated
over 5 years ago
docker pull allenday/nanostream-dataflow-simulator:dependabot_npm_and_yarn_NanostreamDataflowMain_webapp_src_main_app-vue-js_postcss-7.0.36