Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
NFCore_ATACseq_Runner
Manage
Activity
Members
Labels
Plan
Issues
0
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
Package Registry
Container Registry
Operate
Environments
Terraform modules
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
Astrocyte
Workflows
Lee Lab
NFCore_ATACseq_Runner
Commits
41d39af1
There was an error fetching the commit references. Please try again later.
Commit
41d39af1
authored
6 months ago
by
Achisha Saikia
Browse files
Options
Downloads
Patches
Plain Diff
Update file atacseq_runner.sh
parent
448c6504
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
atacseq_runner.sh
+20
-20
20 additions, 20 deletions
atacseq_runner.sh
with
20 additions
and
20 deletions
atacseq_runner.sh
+
20
−
20
View file @
41d39af1
...
...
@@ -333,10 +333,10 @@ for key in "${!OPTS[@]}"; do
done
NFCORE_WF
=
"
ATAC
seq"
NFCORE_WF_VERSION
=
"2.
0
"
NFCORE_WF_COMMIT
=
"
971984a48ad4dc5b39fc20b56c5729f4ca20379
a"
# the commit for tags/2.0
CUTANDRUN
_DIR
=
"
$SCRIPTPATH
/
$NFCORE_WF
"
NFCORE_WF
=
"
nfcore_atac
seq"
NFCORE_WF_VERSION
=
"2.
1.2
"
NFCORE_WF_COMMIT
=
"
1a1dbe52ffbd82256c941a032b0e22abbd925b8
a"
# the commit for tags/2.0
#What is this???
ATACseq
_DIR
=
"
$SCRIPTPATH
/
$NFCORE_WF
"
# set max total resources
max_time
=
"480.h"
...
...
@@ -350,20 +350,20 @@ ${max_time}, ${max_cpus} CPUs, ${max_memory} Memory on $(hostname -s).
## Fix the configs
# Comment out email notification part from the configure file
config_
cutandrun
=
"
${
CUTANDRUN_DIR
}
/workflows/cutandrun.nf"
if
[[
-f
$config_
cutandrun
]]
;
then
if
!
grep
"// NfcoreTemplate.email"
$config_
cutandrun
>
/dev/null
;
then
config_
atacseq
=
"
${
ATACseq_DIR
}
/workflows/atacseq.nf"
##Check this??
if
[[
-f
$config_
atacseq
]]
;
then
if
!
grep
"// NfcoreTemplate.email"
$config_
atacseq
>
/dev/null
;
then
sed
-i
"s/NfcoreTemplate.email/
\/\/
NfcoreTemplate.email/g"
$config_cutandrun
fi
if
!
grep
"// NfcoreTemplate.summary"
$config_cutandrun
>
/dev/null
;
then
sed
-i
"s/NfcoreTemplate.summary/
\/\/
NfcoreTemplate.summary/g"
$config_cutandrun
fi
else
echo
"Could not find
$config_
cutandrun
!"
echo
"Could not find
$config_
atacseq
!"
exit
1
fi
base_config
=
"
${
CUTANDRUN
_DIR
}
/conf/base.config"
base_config
=
"
${
ATACseq
_DIR
}
/conf/base.config"
sed
-i
"s/maxRetries = 1/maxRetries = 3/g"
$base_config
sed
-i
"s/ check_max( 4.h / check_max( 40.h /g"
$base_config
...
...
@@ -381,7 +381,7 @@ sed -i "s/ 12.GB / $max_memory /g" $base_config
sed
-i
"s/ 36.GB /
$max_memory
/g"
$base_config
sed
-i
"s/ 72.GB /
$max_memory
/g"
$base_config
resources_config
=
"
${
CUTANDRUN
_DIR
}
/conf/resources.config"
resources_config
=
"
${
ATACseq
_DIR
}
/conf/resources.config"
sed
-i
"s/ check_max( 1.h / check_max( 10.h /g"
$resources_config
sed
-i
"s/ check_max( 4.h / check_max( 40.h /g"
$resources_config
...
...
@@ -395,7 +395,7 @@ sed -i "s/ 8.GB / $max_memory /g" $resources_config
sed
-i
"s/ 32.GB /
$max_memory
/g"
$resources_config
sed
-i
"s/ 64.GB /
$max_memory
/g"
$resources_config
nextflow_config
=
"
${
CUTANDRUN
_DIR
}
/nextflow.config"
nextflow_config
=
"
${
ATACseq
_DIR
}
/nextflow.config"
sed
-i
"s/max_cpus = 16/max_cpus =
$max_cpus
/g"
$nextflow_config
sed
-i
"s/128.GB/
$max_memory
/g"
$nextflow_config
sed
-i
"s/240.h/
$max_time
/g"
$nextflow_config
...
...
@@ -474,17 +474,17 @@ export NXF_SINGULARITY_CACHEDIR="${workdir}/images/singularity"
# run the pipeline
echo
""
echo
"The working folder is:
${
Pwd
}
"
|
tee
cutandrun
_runner.debug.log
echo
"The running command is:"
|
tee
-a
cutandrun
_runner.debug.log
echo
nextflow run
-w
${
workdir
}
/work
${
CUTANDRUN
_DIR
}
$RUN_OPTIONS
|
tee
-a
cutandrun
_runner.debug.log
echo
""
|
tee
-a
cutandrun
_runner.debug.log
echo
"The working folder is:
${
Pwd
}
"
|
tee
nfcore_atacseq
_runner.debug.log
echo
"The running command is:"
|
tee
-a
nfcore_atacseq
_runner.debug.log
echo
nextflow run
-w
${
workdir
}
/work
${
ATACseq
_DIR
}
$RUN_OPTIONS
|
tee
-a
nfcore_atacseq
_runner.debug.log
echo
""
|
tee
-a
nfcore_atacseq
_runner.debug.log
cd
${
Pwd
}
# output for debugging
nextflow config
-profile
${
OPTS
[
"profile"
]
}
-flat
-sort
${
CUTANDRUN
_DIR
}
&>>
cutandrun
_runner.debug.log
nextflow config
-profile
${
OPTS
[
"profile"
]
}
-flat
-sort
${
ATACseq
_DIR
}
&>>
nfcore_atacseq
_runner.debug.log
# run
nextflow run
-w
${
workdir
}
/work
${
CUTANDRUN
_DIR
}
$RUN_OPTIONS
|
tee
.nextflow.
cutandrun
.log &
nextflow run
-w
${
workdir
}
/work
${
ATACseq
_DIR
}
$RUN_OPTIONS
|
tee
.nextflow.
atac
.log &
nextflowPID
=
$!
update_trace
()
{
...
...
@@ -496,10 +496,10 @@ update_trace() {
if
[[
-f
$from_trace
]]
&&
[[
-f
$to_trace
]]
;
then
# from to_trace
grep
-v
"
CUTANDRUN
:"
$to_trace
>
./.trace.tmp
grep
-v
"
ATACseq
:"
$to_trace
>
./.trace.tmp
#check
echo
-e
"
\n\n
"
>>
./.trace.tmp
# from from_trace
grep
"
CUTANDRUN
:"
$from_trace
|
awk
-F
"
\t
"
'BEGIN {OFS="\t"}; {if ($19) print $1,$2,$3,$4,$5,$6,$7,$10,$11,$15,$16,$17,$18,$19}'
|
sort
-un
|
sed
s
"/NFCORE_
CUTANDRUN
://g"
>>
./.trace.tmp
grep
"
ATACseq
:"
$from_trace
|
awk
-F
"
\t
"
'BEGIN {OFS="\t"}; {if ($19) print $1,$2,$3,$4,$5,$6,$7,$10,$11,$15,$16,$17,$18,$19}'
|
sort
-un
|
sed
s
"/NFCORE_
ATACseq
://g"
>>
./.trace.tmp
#Check
# update to_trace
cat
./.trace.tmp
>
$to_trace
# rm tmp file
...
...
@@ -518,7 +518,7 @@ while sleep 2; do
update_trace
$from_trace
$to_trace
# workflow finished
if
grep
"Completed at:"
.nextflow.
cutandrun
.log &> /dev/null
;
then
if
grep
"Completed at:"
.nextflow.
atac
.log &> /dev/null
;
then
kill
-9
$nextflowPID
&> /dev/null
sleep
5
# update the trace file before leaving
...
...
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