Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
ChIPster
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Xavier Grand
ChIPster
Commits
7d01e0e0
Verified
Commit
7d01e0e0
authored
4 years ago
by
Laurent Modolo
Browse files
Options
Downloads
Patches
Plain Diff
macs2.nf: fix processes to match macs3
parent
d41a1c90
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/nf_modules/macs2/main.nf
+50
-10
50 additions, 10 deletions
src/nf_modules/macs2/main.nf
with
50 additions
and
10 deletions
src/nf_modules/macs2/main.nf
+
50
−
10
View file @
7d01e0e0
version = "2.1.2"
container_url = "lbmc/macs2:${version}"
params.macs_gsize=3e9
params.macs_mfold=[5, 50]
process peak_calling {
container = "${container_url}"
label "big_mem_m
ulti
_cpus"
label "big_mem_m
ono
_cpus"
tag "${file_id}"
input:
...
...
@@ -16,17 +19,54 @@ process peak_calling {
script:
/* remove --nomodel option for real dataset */
"""
macs2 callpeak \
--treatment ${file_ip} \
--call-summits "True"\
--control ${file_control} \
--keep-dup "auto" \
macs3 callpeak \
--treatment ${bam_ip} \
--call-summits \
--control ${bam_control} \
--keep-dup all \
--mfold params.macs_mfold[0] params.macs_mfold[1]
--name ${bam_ip.simpleName} \
--gsize ${params.genome_size} 2> \
${bam_ip.simpleName}_macs2_report.txt
--gsize ${params.macs_gsize} 2> \
${bam_ip.simpleName}_macs3_report.txt
if grep -q "ERROR" ${bam_ip.simpleName}_macs3_report.txt; then
echo "MACS3 error"
exit 1
fi
"""
}
process peak_calling_bg {
container = "${container_url}"
label "big_mem_mono_cpus"
tag "${file_id}"
input:
tuple val(file_id), path(bg_ip), path(bg_control)
output:
path "*", emit: peak
path "*_report.txt", emit: report
script:
/* remove --nomodel option for real dataset */
"""
awk '{print \$1"\t"\$2"\t"\$3"\t.\t+\t"\$4}' ${bg_ip} > \
${bg_ip.simpleName}.bed
awk '{print \$1"\t"\$2"\t"\$3"\t.\t+\t"\$4}' ${bg_control} > \
${bg_control.simpleName}.bed
macs3 callpeak \
--treatment ${bg_ip.simpleName}.bed \
--call-summits \
--control ${bg_control.simpleName}.bed \
--keep-dup all \
--mfold params.macs_mfold[0] params.macs_mfold[1]
--name ${bg_ip.simpleName} \
--gsize ${params.macs_gsize} 2> \
${bg_ip.simpleName}_macs3_report.txt
if grep -q "ERROR" ${b
am
_ip.simpleName}_macs
2
_report.txt; then
echo "MACS
2
error"
if grep -q "ERROR" ${b
g
_ip.simpleName}_macs
3
_report.txt; then
echo "MACS
3
error"
exit 1
fi
"""
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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