-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move GEM2S as a step in pipeline (#56)
* refactor wrapper * Added gem2s functions to pipeline * Adapted pipeline to new schema for gem2s * renamed one task * fixes for gem2s * renamed qc-runner to pipeline-runner * fixed tryCatch from rebase * changed pipeline name to qc * init upload-to-aws * init meta_sets * Added sample sets * complete upload-to-aws * add s3/dynamodb functions * add buckets and tables * writing input to meta.json file * changed some pipeline references to gem2s/pipeline * avoiding creating new containers for gem2s or qc if they already exist * attaching both pipeline containers output (qc & gem2s) to pipeline process stdout * just a lonenly runaway letter * added dependencies * typo * make docker build for me * send dynamodb items to api * reflect nan bugfix from data-inegest * temporarily fix for paws.common version 0.3.11 * change SNS messag type * hotfix * fix * fix Co-authored-by: Oliver Gibson <[email protected]> Co-authored-by: Pol Alvarez <[email protected]> Co-authored-by: Anugerah Erlaut <[email protected]>
- Loading branch information
1 parent
b48ae80
commit 4e08fb2
Showing
40 changed files
with
2,476 additions
and
358 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
qc-runner | ||
pipeline-runner | ||
========= | ||
|
||
Docker container for executing dependency-managed tasks. | ||
|
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
require("RJSONIO") | ||
require("paws") | ||
require("zeallot") | ||
require("ids") | ||
|
||
task <- function(input,pipeline_config) { | ||
# you are receiving the full sample object instead of sample names | ||
project_id <- input$projectId | ||
sample_names <- input$sampleNames # extract sample names from samples object | ||
sample_uuids <- input$sampleIds | ||
message("download2") | ||
s3 <- paws::s3(config=pipeline_config$aws_config) | ||
message(pipeline_config$originals_bucket) | ||
|
||
fnames <- c('features.tsv.gz', 'barcodes.tsv.gz', 'matrix.mtx.gz') | ||
unlink("/input",recursive=TRUE) | ||
for (sample in sample_uuids) { | ||
for (fname in fnames) { | ||
gem_key <- file.path(project_id, sample, fname) | ||
message(gem_key) | ||
sample_name = sample_names[[match(sample,sample_uuids)]] | ||
#Preparing directories | ||
local_dir <- file.path('/input',sample_name) | ||
#unlink(local_dir, recursive = TRUE) | ||
dir.create('/input') | ||
dir.create(local_dir) | ||
dir.create("/output") | ||
local_fpath <- file.path(local_dir,fname) | ||
|
||
message("bucket") | ||
message( pipeline_config$originals_bucket) | ||
message("file") | ||
message(gem_key) | ||
# Download the file and store the output in a variable | ||
c(body, ...rest) %<-% s3$get_object( | ||
#Bucket = pipeline_config$originals_bucket, | ||
Bucket = pipeline_config$originals_bucket, | ||
Key = gem_key | ||
) | ||
|
||
# Write output to file | ||
writeBin(body, con = local_fpath) | ||
} | ||
} | ||
# download meta.json | ||
#meta_key = file.path(project_id, "meta.json") | ||
#message(paste("File: ",meta_key)) | ||
#c(body, ...rest) %<-% s3$get_object( | ||
# Bucket = pipeline_config$originals_bucket, | ||
# Key = meta_key | ||
#) | ||
#writeBin(body, con = "/input/meta.json") | ||
config <- list(name = input$experimentName, samples=input$sampleNames, | ||
organism = input$organism, | ||
input = list(type="10x") | ||
) | ||
|
||
exportJSON <- RJSONIO::toJSON(config) | ||
message('Created json config') | ||
message(exportJSON) | ||
write(exportJSON, "/input/meta.json") | ||
message('Written config json') | ||
} |
Oops, something went wrong.