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
b4be1926
Commit
b4be1926
authored
5 years ago
by
Gervaise Henry
Browse files
Options
Downloads
Plain Diff
Merge branch '3-trimming' into 'develop'
Added trimming step using trimGalore and logging. Closes
#3
See merge request
!3
parents
f6b9f1f2
b00a62fe
Branches
Branches containing commit
Tags
Tags containing commit
4 merge requests
!37
v0.0.1
,
!6
Develop
,
!4
Develop
,
!3
Added trimming step using trimGalore and logging.
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
workflow/conf/biohpc.config
+6
-2
6 additions, 2 deletions
workflow/conf/biohpc.config
workflow/rna-seq.nf
+49
-24
49 additions, 24 deletions
workflow/rna-seq.nf
with
55 additions
and
26 deletions
workflow/conf/biohpc.config
+
6
−
2
View file @
b4be1926
...
...
@@ -5,10 +5,14 @@ process {
//
Process
specific
configuration
withName
:
splitData
{
container
=
'docker://bicf/
bdbag
:1.0'
container
=
'docker://bicf/
gudmaprbkfilexfer
:1.0'
}
withName
:
getData
{
container
=
'docker://bicf/bdbag:1.0'
container
=
'docker://bicf/gudmaprbkfilexfer:1.0'
}
withName
:
trimData
{
container
=
'docker://bicf/trimgalore:1.0'
queue
=
'256GB,256GBv1,384GB'
}
}
...
...
This diff is collapsed.
Click to expand it.
workflow/rna-seq.nf
+
49
−
24
View file @
b4be1926
...
...
@@ -13,12 +13,15 @@ bdbag = Channel
.ifEmpty { exit 1, "bdbag zip file not found: ${params.bdbag}" }
outDir = params.outDir
logsDir = "${outDir}/Logs"
/*
* splitData: split bdbag files by replicate so fetch can occure in parallel, and rename files to replicate rid
*/
process splitData {
tag "${bdbag.baseName}"
executor 'local'
publishDir "${logsDir}/splitData", mode: 'symlink', pattern: "${bdbag.baseName}.splitData.err"
input:
file bdbag
...
...
@@ -29,23 +32,24 @@ process splitData {
file("${bdbag.baseName}/data/File.csv") into fileMeta
file("${bdbag.baseName}/data/Experiment Settings.csv") into experimentSettingsMeta
file("${bdbag.baseName}/data/Experiment.csv") into experimentMeta
file ("${bdbag.baseName}.splitData.err")
script:
"""
hostname
ulimit -a
ln -sf `readlink -e cookies.txt` ~/.bdbag/deriva-cookies.txt
echo "LOG: deriva cookie linked"
study=`echo "${bdbag}" | cut -d '.' -f1`
echo "LOG: \${study}"
unzip ${bdbag}
echo "LOG: bdgag unzipped"
python3 ${baseDir}/scripts/modifyFetch.py --fetchFile \${study}
echo "LOG: fetch file filtered for only .fastq.gz"
python3 ${baseDir}/scripts/splitFetch.py --fetchFile \${study}
echo "LOG: fetch file split by replicates"
sh ${baseDir}/scripts/splitBag.sh \${study}
echo "LOG: bag recreated with replicate split fetch file"
hostname
>> ${bdbag.baseName}.splitData.err
ulimit -a
>> ${bdbag.baseName}.splitData.err
ln -sf `readlink -e cookies.txt` ~/.bdbag/deriva-cookies.txt
2>>${bdbag.baseName}.splitData.err
echo "LOG: deriva cookie linked"
>> ${bdbag.baseName}.splitData.err
study=`echo "${bdbag}" | cut -d '.' -f1`
2>>${bdbag.baseName}.splitData.err
echo "LOG: \${study}"
>> ${bdbag.baseName}.splitData.err
unzip ${bdbag}
2>>${bdbag.baseName}.splitData.err
echo "LOG: bdgag unzipped"
>> ${bdbag.baseName}.splitData.err
python3 ${baseDir}/scripts/modifyFetch.py --fetchFile \${study}
2>>${bdbag.baseName}.splitData.err
echo "LOG: fetch file filtered for only .fastq.gz"
>> ${bdbag.baseName}.splitData.err
python3 ${baseDir}/scripts/splitFetch.py --fetchFile \${study}
2>>${bdbag.baseName}.splitData.err
echo "LOG: fetch file split by replicates"
>> ${bdbag.baseName}.splitData.err
sh ${baseDir}/scripts/splitBag.sh \${study}
2>>${bdbag.baseName}.splitData.err
echo "LOG: bag recreated with replicate split fetch file"
>> ${bdbag.baseName}.splitData.err
"""
}
...
...
@@ -54,24 +58,45 @@ process splitData {
*/
process getData {
tag "${rep.baseName}"
publishDir "${
out
Dir}/
tempOut/fastqs
", mode:
"
symlink"
publishDir "${
logs
Dir}/
getData
", mode:
'
symlink
', pattern: "${rep.baseName}.getData.err
"
input:
each rep from bdbagSplit
output:
path
("*.R
*
.fastq.gz"
, type: 'file', maxDepth: '0') into fastq
set val ("${rep.baseName}"), file
("*.R
{1,2}
.fastq.gz"
) into trimming
script:
"""
hostname
ulimit -a
hostname
>>${rep.baseName}.getData.err
ulimit -a
>>${rep.baseName}.getData.err
export https_proxy=\${http_proxy}
replicate=\$(basename "${rep}" | cut -d '.' -f1)
echo "LOG: \${replicate}"
unzip ${rep}
echo "LOG: replicate bdbag unzipped"
sh ${baseDir}/scripts/bdbagFetch.sh \${replicate}
echo "LOG: replicate bdbag fetched"
echo "LOG: \${replicate}"
>>${rep.baseName}.getData.err
unzip ${rep}
2>>${rep.baseName}.getData.err
echo "LOG: replicate bdbag unzipped"
>>${rep.baseName}.getData.err
sh ${baseDir}/scripts/bdbagFetch.sh \${replicate}
2>>${rep.baseName}.getData.err
echo "LOG: replicate bdbag fetched"
>>${rep.baseName}.getData.err
"""
}
}
/*
* trimData: trims any adapter or non-host sequences from the data
*/
process trimData {
tag "trim-${repID}"
publishDir "${outDir}/tempOut/trimmed", mode: "symlink", pattern: "*_val_{1,2}.fq.gz"
publishDir "${logsDir}/trimData", mode: 'symlink', pattern: "\${rep}.trimData.*"
input:
set repID, reads from trimming
output:
path ("*_val_{1,2}.fq.gz", type: 'file', maxDepth: '0')
script:
"""
rep=`echo ${repID} | cut -f2- -d '_'`;
trim_galore --gzip --max_n 1 --paired --basename \${rep} -j `nproc` ${reads[0]} ${reads[1]} 1>>\${rep}.trimData.log 2>>\${rep}.trimData.err;
"""
}
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