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
9d650a71
Commit
9d650a71
authored
6 years ago
by
Venkat Malladi
Browse files
Options
Downloads
Patches
Plain Diff
Generate software report.
parent
30853393
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!23
Resolve "Output software versions and methods and references"
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
workflow/conf/biohpc.config
+8
-1
8 additions, 1 deletion
workflow/conf/biohpc.config
workflow/main.nf
+6
-3
6 additions, 3 deletions
workflow/main.nf
workflow/scripts/software_report.py
+83
-43
83 additions, 43 deletions
workflow/scripts/software_report.py
with
97 additions
and
47 deletions
workflow/conf/biohpc.config
+
8
−
1
View file @
9d650a71
...
...
@@ -60,7 +60,14 @@ process {
module
= [
'python/3.6.1-2-anaconda'
,
'meme/4.11.1-gcc-openmpi'
,
'bedtools/2.26.0'
]
cpus
=
32
}
withName
:
softwareVersions
{
module
= [
'python/3.6.1-2-anaconda'
]
executor
=
'local'
}
withName
:
softwareReport
{
module
= [
'python/3.6.1-2-anaconda'
]
executor
=
'local'
}
}
params
{
...
...
This diff is collapsed.
Click to expand it.
workflow/main.nf
+
6
−
3
View file @
9d650a71
...
...
@@ -47,6 +47,7 @@ cutoffRatio = params.cutoffRatio
outDir = params.outDir
extendReadsLen = params.extendReadsLen
topPeakCount = params.topPeakCount
references = params.references
// Check design file for errors
process checkDesignFile {
...
...
@@ -478,7 +479,7 @@ process diffPeaks {
}
// Collect Software Versions and references
process software
Versions
{
process software
Report
{
input:
...
...
@@ -495,10 +496,12 @@ process softwareVersions {
experimentQCVersions
output:
file 'software_versions_mqc.yaml' into softwareVersions
file '*_mqc.yaml' into softwareVersions
file '*_mqc.yaml' into softwareReferences
script:
"""
software_report.py > software_versions_mqc.yaml
python3 $baseDir/scripts/software_report.py -o software_versions
python3 $baseDir/scripts/generate_references.py -r $references -o software_references
"""
}
This diff is collapsed.
Click to expand it.
workflow/scripts/software_report.py
+
83
−
43
View file @
9d650a71
...
...
@@ -6,9 +6,22 @@
from
__future__
import
print_function
from
collections
import
OrderedDict
import
re
import
logging
import
argparse
EPILOG
=
'''
For more details:
%(prog)s --help
'''
software_regex
=
{
# SETTINGS
logger
=
logging
.
getLogger
(
__name__
)
logger
.
addHandler
(
logging
.
NullHandler
())
logger
.
propagate
=
False
logger
.
setLevel
(
logging
.
INFO
)
SOFTWARE_REGEX
=
{
'
Trim Galore!
'
:
[
'
version_trimgalore.txt
'
,
r
"
version (\S+)
"
],
'
Cutadapt
'
:
[
'
version_cutadapt.txt
'
,
r
"
Version (\S+)
"
],
'
BWA
'
:
[
'
version_bwa.txt
'
,
r
"
Version: (\S+)
"
],
...
...
@@ -25,45 +38,72 @@ software_regex = {
'
deepTools
'
:
[
'
version_deeptools.txt
'
,
r
"
deeptools (\S+)
"
],
}
results
=
OrderedDict
()
results
[
'
Trim Galore!
'
]
=
'
<span style=
"
color:#999999;
\"
>N/A</span>
'
results
[
'
Cutadapt
'
]
=
'
<span style=
"
color:#999999;
\"
>N/A</span>
'
results
[
'
BWA
'
]
=
'
<span style=
"
color:#999999;
\"
>N/A</span>
'
results
[
'
Trim Galore!
'
]
=
'
<span style=
"
color:#999999;
\"
>N/A</span>
'
results
[
'
Cutadapt
'
]
=
'
<span style=
"
color:#999999;
\"
>N/A</span>
'
results
[
'
BWA
'
]
=
'
<span style=
"
color:#999999;
\"
>N/A</span>
'
results
[
'
Samtools
'
]
=
'
<span style=
"
color:#999999;
\"
>N/A</span>
'
results
[
'
Sambamba
'
]
=
'
<span style=
"
color:#999999;
\"
>N/A</span>
'
results
[
'
BEDTools
'
]
=
'
<span style=
"
color:#999999;
\"
>N/A</span>
'
results
[
'
R
'
]
=
'
<span style=
"
color:#999999;
\"
>N/A</span>
'
results
[
'
SPP
'
]
=
'
<span style=
"
color:#999999;
\"
>N/A</span>
'
results
[
'
MACS2
'
]
=
'
<span style=
"
color:#999999;
\"
>N/A</span>
'
results
[
'
bedGraphToBigWig
'
]
=
'
<span style=
"
color:#999999;
\"
>N/A</span>
'
results
[
'
ChIPseeker
'
]
=
'
<span style=
"
color:#999999;
\"
>N/A</span>
'
results
[
'
MEME-ChIP
'
]
=
'
<span style=
"
color:#999999;
\"
>N/A</span>
'
results
[
'
DiffBind
'
]
=
'
<span style=
"
color:#999999;
\"
>N/A</span>
'
results
[
'
deepTools
'
]
=
'
<span style=
"
color:#999999;
\"
>N/A</span>
'
# Search each file using its regex
for
k
,
v
in
software_regex
.
items
():
with
open
(
v
[
0
])
as
x
:
versions
=
x
.
read
()
match
=
re
.
search
(
v
[
1
],
versions
)
if
match
:
results
[
k
]
=
"
v{}
"
.
format
(
match
.
group
(
1
))
# Dump to YAML
print
(
'''
id:
'
Software Versions
'
section_name:
'
Software Versions
'
section_href:
'
https://git.biohpc.swmed.edu/BICF/Astrocyte/chipseq_analysis/
'
plot_type:
'
html
'
description:
'
are collected at run time from the software output.
'
data: |
<dl class=
"
dl-horizontal
"
>
'''
)
for
k
,
v
in
results
.
items
():
print
(
"
<dt>{}</dt><dd>{}</dd>
"
.
format
(
k
,
v
))
print
(
"
</dl>
"
)
def
get_args
():
'''
Define arguments.
'''
parser
=
argparse
.
ArgumentParser
(
description
=
__doc__
,
epilog
=
EPILOG
,
formatter_class
=
argparse
.
RawDescriptionHelpFormatter
)
parser
.
add_argument
(
'
-o
'
,
'
--output
'
,
help
=
"
The out file name.
"
,
required
=
True
)
args
=
parser
.
parse_args
()
return
args
def
main
():
args
=
get_args
()
output
=
args
.
output
out_filename
=
output
+
'
_mqc.yaml
'
results
=
OrderedDict
()
results
[
'
Trim Galore!
'
]
=
'
<span style=
"
color:#999999;
\"
>N/A</span>
'
results
[
'
Cutadapt
'
]
=
'
<span style=
"
color:#999999;
\"
>N/A</span>
'
results
[
'
BWA
'
]
=
'
<span style=
"
color:#999999;
\"
>N/A</span>
'
results
[
'
Trim Galore!
'
]
=
'
<span style=
"
color:#999999;
\"
>N/A</span>
'
results
[
'
Cutadapt
'
]
=
'
<span style=
"
color:#999999;
\"
>N/A</span>
'
results
[
'
BWA
'
]
=
'
<span style=
"
color:#999999;
\"
>N/A</span>
'
results
[
'
Samtools
'
]
=
'
<span style=
"
color:#999999;
\"
>N/A</span>
'
results
[
'
Sambamba
'
]
=
'
<span style=
"
color:#999999;
\"
>N/A</span>
'
results
[
'
BEDTools
'
]
=
'
<span style=
"
color:#999999;
\"
>N/A</span>
'
results
[
'
R
'
]
=
'
<span style=
"
color:#999999;
\"
>N/A</span>
'
results
[
'
SPP
'
]
=
'
<span style=
"
color:#999999;
\"
>N/A</span>
'
results
[
'
MACS2
'
]
=
'
<span style=
"
color:#999999;
\"
>N/A</span>
'
results
[
'
bedGraphToBigWig
'
]
=
'
<span style=
"
color:#999999;
\"
>N/A</span>
'
results
[
'
ChIPseeker
'
]
=
'
<span style=
"
color:#999999;
\"
>N/A</span>
'
results
[
'
MEME-ChIP
'
]
=
'
<span style=
"
color:#999999;
\"
>N/A</span>
'
results
[
'
DiffBind
'
]
=
'
<span style=
"
color:#999999;
\"
>N/A</span>
'
results
[
'
deepTools
'
]
=
'
<span style=
"
color:#999999;
\"
>N/A</span>
'
# Search each file using its regex
for
k
,
v
in
SOFTWARE_REGEX
.
items
():
with
open
(
v
[
0
])
as
x
:
versions
=
x
.
read
()
match
=
re
.
search
(
v
[
1
],
versions
)
if
match
:
results
[
k
]
=
"
v{}
"
.
format
(
match
.
group
(
1
))
# Dump to YAML
print
(
'''
id:
'
Software Versions
'
section_name:
'
Software Versions
'
section_href:
'
https://git.biohpc.swmed.edu/BICF/Astrocyte/chipseq_analysis/
'
plot_type:
'
html
'
description:
'
are collected at run time from the software output.
'
data: |
<dl class=
"
dl-horizontal
"
>
'''
,
file
=
open
(
out_filename
,
"
w
"
))
for
k
,
v
in
results
.
items
():
print
(
"
<dt>{}</dt><dd>{}</dd>
"
.
format
(
k
,
v
),
file
=
open
(
out_filename
,
"
a
"
))
print
(
"
</dl>
"
,
file
=
open
(
out_filename
,
"
a
"
))
if
__name__
==
'
__main__
'
:
main
()
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