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
b89416b5
Commit
b89416b5
authored
5 years ago
by
Jonathan Gesell
Browse files
Options
Downloads
Patches
Plain Diff
Temporary fix for file naming
parent
813bcb28
Branches
Branches containing commit
Tags
Tags containing commit
3 merge requests
!37
v0.0.1
,
!4
Develop
,
!2
Resolve "process_getData"
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
workflow/conf/biohpc.config
+3
-7
3 additions, 7 deletions
workflow/conf/biohpc.config
workflow/rna-seq.nf
+62
-50
62 additions, 50 deletions
workflow/rna-seq.nf
workflow/scripts/renameFastq.sh
+10
-13
10 additions, 13 deletions
workflow/scripts/renameFastq.sh
with
75 additions
and
70 deletions
workflow/conf/biohpc.config
+
3
−
7
View file @
b89416b5
...
...
@@ -39,11 +39,7 @@ singularity {
}
env
{
http_proxy
=
"http://proxy.swmed.edu:3128"
https_proxy
=
"http://proxy.swmed.edu:3128"
HTTP_PROXY
=
"http://proxy.swmed.edu:3128"
HTTPS_PROXY
=
"http://proxy.swmed.edu:3128"
all_proxy
=
"http://proxy.swmed.edu:3128"
ALL_PROXY
=
"http://proxy.swmed.edu:3128"
http_proxy
=
'http://proxy.swmed.edu:3128'
https_proxy
=
'http://proxy.swmed.edu:3128'
all_proxy
=
'http://proxy.swmed.edu:3128'
}
This diff is collapsed.
Click to expand it.
workflow/rna-seq.nf
+
62
−
50
View file @
b89416b5
...
...
@@ -7,9 +7,11 @@ params.bdbag = "${baseDir}/../test_data/Study_Q-Y4H0.zip"
params.outDir = "${baseDir}/../output"
// Parse input variables
deriva = Channel
.fromPath(params.deriva)
.ifEmpty { exit 1, "deriva cookie file not found: ${params.deriva}" }
deriva = file(params.deriva)
deriva.copyTo('~/.bdbag/deriva-cookies.txt')
//deriva = Channel
// .fromPath(params.deriva)
// .ifEmpty { exit 1, "deriva cookie file not found: ${params.deriva}" }
bdbag = Channel
.fromPath(params.bdbag)
.ifEmpty { exit 1, "bdbag zip file not found: ${params.bdbag}" }
...
...
@@ -20,62 +22,72 @@ outDir = params.outDir
* splitData: split bdbag files by replicate so fetch can occure in parallel
*/
process splitData {
tag "${bdbag.baseName}"
publishDir "${outDir}/temp/${task.process}", mode: "symlink"
tag "${bdbag.baseName}"
publishDir "${outDir}/temp/${task.process}", mode: "symlink"
input:
file bdbag
input:
file bdbag
file deriva
output:
file("Replicate_*.zip") into bdbagSplit mode flatten
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
output:
file("Replicate_*.zip") into bdbagSplit mode flatten
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
script:
"""
hostname
ulimit -a
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
"""
script:
"""
hostname
ulimit -a
ln -sf `readlink -e ${deriva}` ~/.bdbag/deriva-cookies.txt
study=`echo "${bdbag}" | cut -d'.' -f1`
echo LOG: \${study}
unzip ${bdbag}
echo LOG: bdgag unzipped
python3 ${baseDir}/scripts/modifyFetch.py --fetchFile \${study}
cd \${study}
bash ${baseDir}/scripts/fixFetch.sh
cd ..
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
"""
}
println {${http_proxy}}
println {${https_proxy}}
/*
* getData: fetch study files from consortium with downloaded bdbag.zip
*/
process getData {
tag "${rep.baseName}"
publishDir "${outDir}/temp/${task.process}", mode: "symlink"
tag "${rep.baseName}"
publishDir "${outDir}/temp/${task.process}", mode: "symlink"
input:
file deriva
each rep from bdbagSplit
input:
file deriva
each rep from bdbagSplit
output:
file("**/*.R*.fastq.gz") into fastq
output:
file("**/*.R*.fastq.gz") into fastq
script:
"""
hostname
ulimit -a
replicate=\$(echo "${rep}" | cut -d'.' -f1)
echo LOG: \${replicate}
cp "${deriva}" ~/.bdbag/deriva-cookies.txt
echo LOG: deriva cookie loaded
unzip ${rep}
echo LOG: replicate bdbag unzipped
sh ${baseDir}/scripts/bdbagFetch.sh \${replicate}
echo LOG: replicate bdbag fetched
sh ${baseDir}/scripts/renameFastq.sh \${replicate}
echo LOG: fastq.gz files renamed to replicate RID
"""
}
\ No newline at end of file
script:
"""
hostname
ulimit -a
echo LOG:\${http_proxy}
export https_proxy=\${http_proxy}
ln -sf `readlink -e ${deriva}` ~/.bdbag/deriva-cookies.txt
replicate=\$(echo "${rep}" | cut -d'.' -f1 | rev | cut -f1 -d '/' | rev)
echo LOG: \${replicate}
echo LOG: deriva cookie loaded
unzip ${rep}
echo LOG: replicate bdbag unzipped
sh ${baseDir}/scripts/bdbagFetch.sh \${replicate}
echo LOG: replicate bdbag fetched
sh ${baseDir}/scripts/renameFastq.sh \${replicate}
echo LOG: fastq.gz files renamed to replicate RID
"""
}
This diff is collapsed.
Click to expand it.
workflow/scripts/renameFastq.sh
+
10
−
13
View file @
b89416b5
#!/bin
while
read
loc checksum fileLocation
do
file
=
$(
echo
${
fileLocation
##*/
}
)
fileName
=
$(
echo
${
file
%.R*.fastq.gz
}
)
fileExt
=
$(
echo
${
file
##
${
fileName
}
.
}
)
while
IFS
=
","
read
RID Study_RID Experiment_RID Replicate_RID Caption File_Type File_Name URI File_size MD5 GEO_Archival_URL dbGaP_Accession_ID Processed Notes Principal_Investigator Consortium Release_Date RCT RMT Legacy_File_RID GUDMAP_NGF_OID GUDMAP_NGS_OID
do
if
[
${
file
}
==
${
File_Name
}
]
then
find
.
-type
f
-name
${
file
}
-execdir
mv
{}
${
Replicate_RID
}
.
${
fileExt
}
';'
fi
done
<
$1
/data/File.csv
done
<
$1
/fetch.txt
\ No newline at end of file
while
read
loc checksum fileLocation
;
do
file
=
$(
echo
${
fileLocation
##*/
}
)
;
fileName
=
$(
echo
${
file
%.R*.fastq.gz
}
)
;
fileExt
=
$(
echo
${
file
##
${
fileName
}
.
}
)
;
while
IFS
=
","
read
RID Study_RID Experiment_RID Replicate_RID Caption File_Type File_Name URI File_size MD5 GEO_Archival_URL dbGaP_Accession_ID Processed Notes Principal_Investigator Consortium Release_Date RCT RMT Legacy_File_RID GUDMAP_NGF_OID GUDMAP_NGS_OID
;
do
if
[
"
${
file
}
"
==
"
${
File_Name
}
"
]
;
then
find
.
-type
f
-name
"
${
file
}
"
-execdir
mv
{}
${
Replicate_RID
}
.
${
fileExt
}
';'
;
fi
;
done
<
$1
/data/File.csv
;
done
<
$1
/fetch.txt
;
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