Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
hic
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
LBMC
Hub
hic
Commits
b7471088
Verified
Commit
b7471088
authored
1 year ago
by
Mia Croiset
Browse files
Options
Downloads
Patches
Plain Diff
add versions to filter pcr picard subworkflow
parent
c64b19ad
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
modules/local/filterbam/main.nf
+5
-0
5 additions, 0 deletions
modules/local/filterbam/main.nf
subworkflows/local/filter_pcr_dup.nf
+6
-1
6 additions, 1 deletion
subworkflows/local/filter_pcr_dup.nf
subworkflows/local/hicpro_mapping.nf
+2
-5
2 additions, 5 deletions
subworkflows/local/hicpro_mapping.nf
with
13 additions
and
6 deletions
modules/local/filterbam/main.nf
+
5
−
0
View file @
b7471088
...
@@ -12,6 +12,7 @@ process FILTER_PAIR {
...
@@ -12,6 +12,7 @@ process FILTER_PAIR {
output:
output:
tuple
val
(
meta1
),
path
(
"*_1paired.bam"
),
val
(
meta2
),
path
(
"*_2paired.bam"
),
emit:
bam
tuple
val
(
meta1
),
path
(
"*_1paired.bam"
),
val
(
meta2
),
path
(
"*_2paired.bam"
),
emit:
bam
path
"versions.yml"
,
emit:
versions
script:
script:
"""
"""
...
@@ -21,5 +22,9 @@ process FILTER_PAIR {
...
@@ -21,5 +22,9 @@ process FILTER_PAIR {
samtools view -h -N common_reads.txt ${bam1} -O BAM > ${meta1.id}_1paired.bam
samtools view -h -N common_reads.txt ${bam1} -O BAM > ${meta1.id}_1paired.bam
samtools view -h -N common_reads.txt ${bam2} -O BAM > ${meta2.id}_2paired.bam
samtools view -h -N common_reads.txt ${bam2} -O BAM > ${meta2.id}_2paired.bam
cat <<-END_VERSIONS > versions.yml
"${task.process}":
samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//')
END_VERSIONS
"""
"""
}
}
This diff is collapsed.
Click to expand it.
subworkflows/local/filter_pcr_dup.nf
+
6
−
1
View file @
b7471088
...
@@ -16,16 +16,19 @@ workflow FILTER_PCR_DUP {
...
@@ -16,16 +16,19 @@ workflow FILTER_PCR_DUP {
index
index
main:
main:
ch_versions
=
Channel
.
empty
()
SAMTOOLS_SORT
(
SAMTOOLS_SORT
(
bam
bam
)
)
ch_versions
=
ch_versions
.
mix
(
SAMTOOLS_SORT
.
out
.
versions
)
PICARD_MARKDUPLICATES
(
PICARD_MARKDUPLICATES
(
SAMTOOLS_SORT
.
out
.
bam
,
SAMTOOLS_SORT
.
out
.
bam
,
fasta
.
collect
(),
fasta
.
collect
(),
index
.
collect
()
index
.
collect
()
)
)
ch_versions
=
ch_versions
.
mix
(
PICARD_MARKDUPLICATES
.
out
.
versions
)
SAMTOOLS_SORT_N
(
SAMTOOLS_SORT_N
(
PICARD_MARKDUPLICATES
.
out
.
bam
PICARD_MARKDUPLICATES
.
out
.
bam
...
@@ -40,9 +43,11 @@ workflow FILTER_PCR_DUP {
...
@@ -40,9 +43,11 @@ workflow FILTER_PCR_DUP {
meta1
.
id
==
meta2
.
id
&&
meta1
.
chunk
==
meta2
.
chunk
&&
meta1
.
mates
==
"R1"
&&
meta2
.
mates
==
"R2"
?
[
meta1
,
bam1
,
meta2
,
bam2
]
:
null
meta1
.
id
==
meta2
.
id
&&
meta1
.
chunk
==
meta2
.
chunk
&&
meta1
.
mates
==
"R1"
&&
meta2
.
mates
==
"R2"
?
[
meta1
,
bam1
,
meta2
,
bam2
]
:
null
})
})
FILTER_PAIR
.
out
.
bam
.
set
{
new_ch_bam
}
FILTER_PAIR
.
out
.
bam
.
set
{
new_ch_bam
}
ch_versions
=
ch_versions
.
mix
(
FILTER_PAIR
.
out
.
versions
)
emit:
emit:
bam
=
new_ch_bam
bam
=
new_ch_bam
versions
=
ch_versions
}
}
This diff is collapsed.
Click to expand it.
subworkflows/local/hicpro_mapping.nf
+
2
−
5
View file @
b7471088
...
@@ -92,8 +92,6 @@ workflow HICPRO_MAPPING {
...
@@ -92,8 +92,6 @@ workflow HICPRO_MAPPING {
MERGE_BOWTIE2
.
out
.
bam
MERGE_BOWTIE2
.
out
.
bam
.
set
{
ch_bowtie2_merged
}
.
set
{
ch_bowtie2_merged
}
ch_bowtie2_merged
.
view
()
ch_versions
=
ch_versions
.
mix
(
MERGE_BOWTIE2
.
out
.
versions
)
ch_versions
=
ch_versions
.
mix
(
MERGE_BOWTIE2
.
out
.
versions
)
ch_mapping_stats
=
MERGE_BOWTIE2
.
out
.
stats
ch_mapping_stats
=
MERGE_BOWTIE2
.
out
.
stats
...
@@ -113,9 +111,9 @@ workflow HICPRO_MAPPING {
...
@@ -113,9 +111,9 @@ workflow HICPRO_MAPPING {
.
flatten
()
.
flatten
()
.
buffer
(
size:
2
)
.
buffer
(
size:
2
)
.
set
{
ch_bowtie2_merged
}
.
set
{
ch_bowtie2_merged
}
ch_versions
=
ch_versions
.
mix
(
FILTER_PCR_DUP
.
out
.
versions
)
}
}
//TODO add versions
ch_bowtie2_merged
.
view
()
// Combine mates
// Combine mates
ch_bowtie2_merged
ch_bowtie2_merged
...
@@ -123,7 +121,6 @@ workflow HICPRO_MAPPING {
...
@@ -123,7 +121,6 @@ workflow HICPRO_MAPPING {
.
groupTuple
()
.
groupTuple
()
.
set
{
ch_bams
}
.
set
{
ch_bams
}
ch_bams
.
view
()
}
else
{
}
else
{
...
...
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