Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
chipseq_analysis
Manage
Activity
Members
Labels
Plan
Issues
19
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
3
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
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
BICF
Astrocyte
chipseq_analysis
Commits
5ca30c98
Commit
5ca30c98
authored
5 years ago
by
Venkat Malladi
Browse files
Options
Downloads
Patches
Plain Diff
Update for bats testing.
parent
ef5feb0b
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!67
Resolve "Rename Plot profile to be consistent with naming"
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
workflow/main.nf
+1
-1
1 addition, 1 deletion
workflow/main.nf
workflow/scripts/plot_profile.sh
+74
-13
74 additions, 13 deletions
workflow/scripts/plot_profile.sh
workflow/tests/plot_profile.bats
+19
-0
19 additions, 0 deletions
workflow/tests/plot_profile.bats
with
94 additions
and
14 deletions
workflow/main.nf
+
1
−
1
View file @
5ca30c98
...
...
@@ -496,7 +496,7 @@ process plotProfile {
script:
"""
module load deeptools/2.5.0.1
bash $baseDir/scripts/plot_profile.sh
$gtfFile
bash $baseDir/scripts/plot_profile.sh
"""
}
...
...
This diff is collapsed.
Click to expand it.
workflow/scripts/plot_profile.sh
100644 → 100755
+
74
−
13
View file @
5ca30c98
#!/bin/bash
#plot_profile.sh
bws
=
$(
ls
*
.bw
)
gtf
=
$(
ls
*
.gtf
*
.bed
)
computeMatrix reference-point
\
--referencePoint
TSS
\
-S
$bws
\
-R
$gtf
\
--skipZeros
\
-o
computeMatrix.gz
-p
max/2
plotProfile
-m
computeMatrix.gz
\
-out
plotProfile.png
\
raise
()
{
echo
"
${
1
}
"
>
&2
}
check_tools
()
{
raise
"
Checking for required libraries and components on this system
"
deeptools
--version
&> version_deeptools.txt
if
[
$?
-gt
0
]
then
raise
"Missing deeptools"
return
1
fi
}
compute_matrix
()
{
raise
"
Computing matrix on
${
1
}
using
${
2
}
"
computeMatrix reference-point
\
--referencePoint
TSS
\
-S
${
1
}
\
-R
${
2
}
\
--skipZeros
\
-o
computeMatrix.gz
\
-p
max/2
if
[
$?
-gt
0
]
then
raise
"Problem building matrix"
return
1
fi
}
plot_profile
()
{
raise
"
Plotting profile
"
plotProfile
-m
computeMatrix.gz
\
-out
plotProfile.png
if
[
$?
-gt
0
]
then
raise
"Problem plotting"
return
1
fi
}
run_main
()
{
bws
=
$(
ls
*
.bw
)
gtf
=
$(
ls
*
.gtf
*
.bed
)
check_tools
||
exit
1
compute_matrix
"
${
bws
}
"
"
${
gtf
}
"
||
return
1
plot_profile
||
return
1
raise
"ALL COMPLETE"
}
if
[[
"
${
BASH_SOURCE
[0]
}
"
==
"
${
0
}
"
]]
then
run_main
if
[
$?
-gt
0
]
then
exit
1
fi
fi
This diff is collapsed.
Click to expand it.
workflow/tests/plot_profile.bats
0 → 100644
+
19
−
0
View file @
5ca30c98
#!/opt/bats/libexec/bats-core/ bats
profile_script="./worflow/scripts/plot_profile.sh"
setup() {
module load deeptools/2.5.0.1
}
@test "Test deeptools present" {
source ${profile_script}
run check_tools
assert_success
}
@test "Test matrix generation" {
source ${profile_script}
run check_tools
assert_success
}
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