Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
RNA-seq
Manage
Activity
Members
Labels
Plan
Issues
12
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container Registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
GUDMAP_RBK
RNA-seq
Commits
04bbabd5
Commit
04bbabd5
authored
4 years ago
by
Gervaise Henry
Browse files
Options
Downloads
Patches
Plain Diff
Allow override for input bagit
#61
parent
8fae34bd
Branches
Branches containing commit
Tags
Tags containing commit
2 merge requests
!43
Develop
,
!42
0.0.3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
workflow/rna-seq.nf
+21
-4
21 additions, 4 deletions
workflow/rna-seq.nf
with
21 additions
and
4 deletions
workflow/rna-seq.nf
+
21
−
4
View file @
04bbabd5
...
...
@@ -19,6 +19,9 @@ params.refHuVersion = "38.p12.v31"
params.refERCCVersion = "92"
params.outDir = "${baseDir}/../output"
// Define override input variable
params.inputBagForce = ""
// Parse input variables
deriva = Channel
.fromPath(params.deriva)
...
...
@@ -32,6 +35,8 @@ refHuVersion = params.refHuVersion
refERCCVersion = params.refERCCVersion
outDir = params.outDir
logsDir = "${outDir}/Logs"
inputBagForce = params.inputBagForce
// Define fixed files
derivaConfig = Channel.fromPath("${baseDir}/conf/replicate_export_config.json")
...
...
@@ -119,6 +124,9 @@ process getBag {
output:
path ("Replicate_*.zip") into bagit
when:
params.inputBagForce == ""
script:
"""
hostname > ${repRID}.getBag.log
...
...
@@ -137,6 +145,15 @@ process getBag {
"""
}
// Set inputBag to downloaded or forced input
if (inputBagForce != "") {
inputBag = Channel
.fromPath(inputBagForce)
.ifEmpty { exit 1, "override inputBagit file not found: ${inputBagForce}" }
} else {
inputBag = bagit
}
/*
* getData: fetch study files from consortium with downloaded bdbag.zip
*/
...
...
@@ -146,7 +163,7 @@ process getData {
input:
path script_bdbagFetch
path cookies, stageAs: "deriva-cookies.txt" from bdbag
path
bagit
path
inputBag
output:
path ("*.R{1,2}.fastq.gz") into fastqs
...
...
@@ -158,7 +175,7 @@ process getData {
"""
hostname > ${repRID}.getData.log
ulimit -a >> ${repRID}.getData.log
# link deriva cookie for authentication
echo -e "LOG: linking deriva cookie" >> ${repRID}.getData.log
mkdir -p ~/.bdbag
...
...
@@ -166,12 +183,12 @@ process getData {
echo -e "LOG: linked" >> ${repRID}.getData.log
# get bagit basename
replicate=\$(basename "${
bagit
}" | cut -d "." -f1)
replicate=\$(basename "
\
${
inputBag
}" | cut -d "." -f1)
echo -e "LOG: bagit replicate name \${replicate}" >> ${repRID}.getData.log
# unzip bagit
echo -e "LOG: unzipping replicate bagit" >> ${repRID}.getData.log
unzip ${
bagit
}
unzip ${
inputBag
}
echo -e "LOG: unzipped" >> ${repRID}.getData.log
# bagit fetch fastq's only and rename by repRID
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment