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
b1162124
Commit
b1162124
authored
3 years ago
by
nservant
Browse files
Options
Downloads
Patches
Plain Diff
[MODIF] deal with technical replicates
parent
149e3d82
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
subworkflows/local/hicpro.nf
+10
-10
10 additions, 10 deletions
subworkflows/local/hicpro.nf
subworkflows/local/input_check.nf
+15
-0
15 additions, 0 deletions
subworkflows/local/input_check.nf
workflows/hic.nf
+3
-24
3 additions, 24 deletions
workflows/hic.nf
with
28 additions
and
34 deletions
subworkflows/local/hicpro.nf
+
10
−
10
View file @
b1162124
...
@@ -70,16 +70,16 @@ workflow HICPRO {
...
@@ -70,16 +70,16 @@ workflow HICPRO {
//**************************************
//**************************************
// MERGE AND REMOVE DUPLICATES
// MERGE AND REMOVE DUPLICATES
if
(
params
.
split_fastq
){
//
if (params.split_fastq){
ch_valid_pairs
=
ch_valid_pairs
.
map
{
it
->
removeChunks
(
it
)}.
groupTuple
()
ch_valid_pairs
=
ch_valid_pairs
.
map
{
it
->
removeChunks
(
it
)}.
groupTuple
()
ch_hicpro_stats
=
HICPRO_MAPPING
.
out
.
mapstats
.
map
{
it
->
removeChunks
(
it
)}.
groupTuple
()
ch_hicpro_stats
=
HICPRO_MAPPING
.
out
.
mapstats
.
map
{
it
->
removeChunks
(
it
)}.
groupTuple
()
.
concat
(
HICPRO_MAPPING
.
out
.
pairstats
.
map
{
it
->
removeChunks
(
it
)}.
groupTuple
(),
.
concat
(
HICPRO_MAPPING
.
out
.
pairstats
.
map
{
it
->
removeChunks
(
it
)}.
groupTuple
(),
ch_valid_stats
.
map
{
it
->
removeChunks
(
it
)}.
groupTuple
())
ch_valid_stats
.
map
{
it
->
removeChunks
(
it
)}.
groupTuple
())
}
else
{
//
}else{
ch_hicpro_stats
=
HICPRO_MAPPING
.
out
.
mapstats
.
groupTuple
()
//
ch_hicpro_stats = HICPRO_MAPPING.out.mapstats.groupTuple()
.
concat
(
HICPRO_MAPPING
.
out
.
pairstats
.
groupTuple
(),
//
.concat(HICPRO_MAPPING.out.pairstats.groupTuple(),
ch_valid_stats
.
groupTuple
())
//
ch_valid_stats.groupTuple())
}
//
}
MERGE_VALID_INTERACTION
(
MERGE_VALID_INTERACTION
(
ch_valid_pairs
ch_valid_pairs
...
...
This diff is collapsed.
Click to expand it.
subworkflows/local/input_check.nf
+
15
−
0
View file @
b1162124
...
@@ -30,6 +30,9 @@ workflow INPUT_CHECK {
...
@@ -30,6 +30,9 @@ workflow INPUT_CHECK {
.
splitCsv
(
header:
true
,
sep:
','
)
.
splitCsv
(
header:
true
,
sep:
','
)
.
map
{
create_fastq_channels
(
it
)
}
.
map
{
create_fastq_channels
(
it
)
}
.
map
{
it
->
[
it
[
0
],
[
it
[
1
],
it
[
2
]]]}
.
map
{
it
->
[
it
[
0
],
[
it
[
1
],
it
[
2
]]]}
.
groupTuple
(
by:
[
0
])
.
flatMap
{
it
->
setMetaChunk
(
it
)
}
.
collate
(
2
)
.
set
{
reads
}
.
set
{
reads
}
}
}
...
@@ -53,3 +56,15 @@ def create_fastq_channels(LinkedHashMap row) {
...
@@ -53,3 +56,15 @@ def create_fastq_channels(LinkedHashMap row) {
array
=
[
meta
,
file
(
row
.
fastq_1
),
file
(
row
.
fastq_2
)
]
array
=
[
meta
,
file
(
row
.
fastq_1
),
file
(
row
.
fastq_2
)
]
return
array
return
array
}
}
// Set the meta.chunk value in case of technical replicates
def
setMetaChunk
(
row
){
def
map
=
[]
row
[
1
].
eachWithIndex
()
{
file
,
i
->
meta
=
row
[
0
].
clone
()
meta
.
chunks
=
i
map
+=
[
meta
,
file
]
}
return
map
}
This diff is collapsed.
Click to expand it.
workflows/hic.nf
+
3
−
24
View file @
b1162124
...
@@ -143,16 +143,6 @@ Channel.fromPath( params.fasta )
...
@@ -143,16 +143,6 @@ Channel.fromPath( params.fasta )
// Info required for completion email and summary
// Info required for completion email and summary
def
multiqc_report
=
[]
def
multiqc_report
=
[]
def
setMetaChunk
(
row
){
def
map
=
[]
row
[
1
].
eachWithIndex
()
{
file
,
i
->
meta
=
row
[
0
].
clone
()
meta
.
chunks
=
i
map
+=
[
meta
,
file
]
}
return
map
}
workflow
HIC
{
workflow
HIC
{
ch_versions
=
Channel
.
empty
()
ch_versions
=
Channel
.
empty
()
...
@@ -163,19 +153,8 @@ workflow HIC {
...
@@ -163,19 +153,8 @@ workflow HIC {
INPUT_CHECK
(
INPUT_CHECK
(
ch_input
ch_input
)
)
.
reads
//.map {
// meta, fastq ->
// meta.id = meta.id.split('_')[0..-2].join('_')
// [ meta, fastq ] }
.
groupTuple
(
by:
[
0
])
.
flatMap
{
it
->
setMetaChunk
(
it
)
}
.
collate
(
2
)
.
set
{
ch_fastq
}
ch_fastq
.
view
()
//
INPUT_CHECK.out.reads.view()
INPUT_CHECK
.
out
.
reads
.
view
()
//
//
// SUBWORKFLOW: Prepare genome annotation
// SUBWORKFLOW: Prepare genome annotation
...
@@ -190,7 +169,7 @@ workflow HIC {
...
@@ -190,7 +169,7 @@ workflow HIC {
// MODULE: Run FastQC
// MODULE: Run FastQC
//
//
FASTQC
(
FASTQC
(
ch_fastq
INPUT_CHECK
.
out
.
reads
)
)
ch_versions
=
ch_versions
.
mix
(
FASTQC
.
out
.
versions
)
ch_versions
=
ch_versions
.
mix
(
FASTQC
.
out
.
versions
)
...
@@ -198,7 +177,7 @@ workflow HIC {
...
@@ -198,7 +177,7 @@ workflow HIC {
// SUB-WORFLOW: HiC-Pro
// SUB-WORFLOW: HiC-Pro
//
//
HICPRO
(
HICPRO
(
ch_fastq
,
INPUT_CHECK
.
out
.
reads
,
PREPARE_GENOME
.
out
.
index
,
PREPARE_GENOME
.
out
.
index
,
PREPARE_GENOME
.
out
.
res_frag
,
PREPARE_GENOME
.
out
.
res_frag
,
PREPARE_GENOME
.
out
.
chromosome_size
,
PREPARE_GENOME
.
out
.
chromosome_size
,
...
...
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