Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
nextflow
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
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
LBMC
nextflow
Commits
66d36c04
Verified
Commit
66d36c04
authored
Oct 25, 2021
by
Laurent Modolo
Browse files
Options
Downloads
Patches
Plain Diff
uscs: modify wig_to_bedgraph
parent
a287ac99
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/nf_modules/danpos/main.nf
+6
-3
6 additions, 3 deletions
src/nf_modules/danpos/main.nf
src/nf_modules/ucsc/main.nf
+49
-15
49 additions, 15 deletions
src/nf_modules/ucsc/main.nf
with
55 additions
and
18 deletions
src/nf_modules/danpos/main.nf
+
6
−
3
View file @
66d36c04
...
...
@@ -12,12 +12,13 @@ params.dpos_out = ""
workflow
dpos_bam_bg
{
take:
fasta
fastq
bam
main:
dpos_bam
(
fastq
,
bam
)
wig2_to_bedgraph2
(
dpos_bam
.
out
.
wig
)
wig2_to_bedgraph2
(
fasta
,
dpos_bam
.
out
.
wig
)
emit:
bedgraph
=
wig2_to_bedgraph2
.
out
.
bedgraph
...
...
@@ -249,10 +250,11 @@ awk -v FS='\t' -v OFS='\t' 'FNR > 1 { print \$1, \$4-1, \$4, "Interval_"NR-1, \$
workflow
dpeak_bw
{
take:
fasta
fastq
bw
main:
dpeak_wig
(
fastq
,
bigwig2_to_wig2
(
bw
))
dpeak_wig
(
fasta
,
fastq
,
bigwig2_to_wig2
(
bw
))
wig2_to_bedgraph2
(
dpeak_wig
.
out
.
wig
)
emit:
...
...
@@ -311,6 +313,7 @@ awk -v FS='\t' -v OFS='\t' 'FNR > 1 { print \$1, \$4-1, \$4, "Interval_"NR-1, \$
workflow
dpeak_bwvsbw
{
take:
fasta
fastq
bw_a
bw_b
...
...
@@ -320,7 +323,7 @@ workflow dpeak_bwvsbw {
bigwig2_to_wig2
(
bw_a
),
bigwig2_to_wig2
(
bw_b
),
)
wig2_to_bedgraph2
(
dpeak_wigvswig
.
out
.
wig
)
wig2_to_bedgraph2
(
fasta
,
dpeak_wigvswig
.
out
.
wig
)
emit:
bedgraph
=
wig2_to_bedgraph2
.
out
.
bedgraph
...
...
This diff is collapsed.
Click to expand it.
src/nf_modules/ucsc/main.nf
+
49
−
15
View file @
66d36c04
...
...
@@ -37,46 +37,80 @@ sort -T ./ -k1,1 -k2,2n ${bg} > \
params
.
wig_to_bedgraph
=
""
params
.
wig_to_bedgraph_out
=
""
process
wig_to_bedgraph
{
workflow
wig_to_bedgraph
{
take:
fasta
wig
main:
wig_to_bigwig
(
fasta
,
wig
)
wig_to_bedgraph
(
wig_to_bigwig
.
out
.
bw
)
emit:
bg
=
wig_to_bigwig
.
out
.
bg
}
workflow
wig2_to_bedgraph2
{
take:
fasta
wig
main:
wig2_to_bigwig2
(
fasta
,
wig
)
wig2_to_bedgraph2
(
wig2_to_bigwig2
.
out
.
bw
)
emit:
bg
=
wig2_to_bigwig2
.
out
.
bg
}
params
.
bigwig_to_bedgraph
=
""
params
.
bigwig_to_bedgraph_out
=
""
process
bigwig_to_bedgraph
{
container
=
"${container_url}"
label
"big_mem_mono_cpus"
tag
"${file_id}"
if
(
params
.
wig_to_bedgraph_out
!=
""
)
{
publishDir
"results/${params.wig_to_bedgraph_out}"
,
mode:
'copy'
if
(
params
.
big
wig_to_bedgraph_out
!=
""
)
{
publishDir
"results/${params.
big
wig_to_bedgraph_out}"
,
mode:
'copy'
}
input:
tuple
val
(
file_id
)
,
path
(
w
ig
)
tuple
val
(
file_id
)
path
(
b
w
)
output:
tuple
val
(
file_id
),
path
(
"
${wig.simpleName}
.bg"
),
emit:
b
edgraph
tuple
val
(
file_id
),
path
(
"
*
.bg"
),
emit:
b
g
script:
"""
awk '{print \$1"\\t"\$2-1"\\t"\$2"\\t"\$3}' ${wig} > ${wig
.simpleName}.bg
bigWigToBedGraph ${bw} ${bw
.simpleName}.bg
"""
}
params
.
wig2_to_bedgraph2
=
""
params
.
wig2_to_bedgraph2_out
=
""
process
wig2_to_bedgraph2
{
params
.
big
wig2_to_bedgraph2
=
""
params
.
big
wig2_to_bedgraph2_out
=
""
process
big
wig2_to_bedgraph2
{
container
=
"${container_url}"
label
"big_mem_mono_cpus"
tag
"${file_id}"
if
(
params
.
wig
2
_to_bedgraph
2
_out
!=
""
)
{
publishDir
"results/${params.wig
2
_to_bedgraph
2
_out}"
,
mode:
'copy'
if
(
params
.
big
wig_to_bedgraph_out
!=
""
)
{
publishDir
"results/${params.
big
wig_to_bedgraph_out}"
,
mode:
'copy'
}
input:
tuple
val
(
file_id
),
path
(
w
ig
_a
),
path
(
w
ig
_b
)
tuple
val
(
file_id
),
path
(
b
w_a
),
path
(
b
w_b
)
output:
tuple
val
(
file_id
),
path
(
"${w
ig
_a.simpleName}.bg"
),
path
(
"${w
ig
_b.simpleName}.bg"
),
emit:
b
edgraph
tuple
val
(
file_id
),
path
(
"${
b
w_a.simpleName}.bg"
),
path
(
"${
b
w_b.simpleName}.bg"
),
emit:
b
g
script:
"""
awk '{print \$1"\\t"\$2-1"\\t"\$2"\\t"\$3}' ${wig
_a}
>
${w
ig
_a.simpleName}.bg
awk '{print \$1"\\t"\$2-1"\\t"\$2"\\t"\$3}' ${wig
_b}
>
${w
ig
_b.simpleName}.bg
bigWigToBedGraph ${bw
_a} ${
b
w_a.simpleName}.bg
bigWigToBedGraph ${bw
_b} ${
b
w_b.simpleName}.bg
"""
}
...
...
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