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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
LBMC
Hub
hic
Commits
e533f0a5
Commit
e533f0a5
authored
Jan 22, 2021
by
nservant
Browse files
Options
Downloads
Patches
Plain Diff
[MODIF] add zoomify
parent
e9207c34
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
main.nf
+29
-18
29 additions, 18 deletions
main.nf
with
29 additions
and
18 deletions
main.nf
+
29
−
18
View file @
e533f0a5
...
@@ -219,7 +219,7 @@ else {
...
@@ -219,7 +219,7 @@ else {
// Chromosome size
// Chromosome size
if
(
params
.
chromosome_size
){
if
(
params
.
chromosome_size
){
Channel
.
fromPath
(
params
.
chromosome_size
,
checkIfExists:
true
)
Channel
.
fromPath
(
params
.
chromosome_size
,
checkIfExists:
true
)
.
into
{
chrsize
;
chrsize_build
;
chrsize_raw
;
chrsize_balance
}
.
into
{
chrsize
;
chrsize_build
;
chrsize_raw
;
chrsize_balance
;
chrsize_zoom
}
}
}
else
if
(
params
.
fasta
){
else
if
(
params
.
fasta
){
Channel
.
fromPath
(
params
.
fasta
)
Channel
.
fromPath
(
params
.
fasta
)
...
@@ -438,7 +438,7 @@ if(!params.chromosome_size && params.fasta){
...
@@ -438,7 +438,7 @@ if(!params.chromosome_size && params.fasta){
file
fasta
from
fasta_for_chromsize
file
fasta
from
fasta_for_chromsize
output:
output:
file
"*.size"
into
chsize
,
chrsize_
c
oo
l
file
"*.size"
into
ch
r
size
,
chrsize_
build
,
chrsize_raw
,
chrsize_balance
,
chrsize_z
oo
m
script:
script:
"""
"""
...
@@ -681,7 +681,7 @@ if (!params.dnase){
...
@@ -681,7 +681,7 @@ if (!params.dnase){
process
get_valid_interaction
{
process
get_valid_interaction
{
tag
"$sample"
tag
"$sample"
label
'process_low'
label
'process_low'
publishDir
"${params.outdir}/
hic_results/data
"
,
mode:
params
.
publish_dir_mode
,
publishDir
"${params.outdir}/
valid_pairs
"
,
mode:
params
.
publish_dir_mode
,
saveAs:
{
filename
->
filename
.
indexOf
(
".stat"
)
>
0
?
"stats/$filename"
:
"$filename"
}
saveAs:
{
filename
->
filename
.
indexOf
(
".stat"
)
>
0
?
"stats/$filename"
:
"$filename"
}
input:
input:
...
@@ -720,7 +720,7 @@ else{
...
@@ -720,7 +720,7 @@ else{
process
get_valid_interaction_dnase
{
process
get_valid_interaction_dnase
{
tag
"$sample"
tag
"$sample"
label
'process_low'
label
'process_low'
publishDir
"${params.outdir}/
hic_results/data
"
,
mode:
params
.
publish_dir_mode
,
publishDir
"${params.outdir}/
valid_pairs
"
,
mode:
params
.
publish_dir_mode
,
saveAs:
{
filename
->
filename
.
indexOf
(
".stat"
)
>
0
?
"stats/$filename"
:
"$filename"
}
saveAs:
{
filename
->
filename
.
indexOf
(
".stat"
)
>
0
?
"stats/$filename"
:
"$filename"
}
input:
input:
...
@@ -753,7 +753,7 @@ else{
...
@@ -753,7 +753,7 @@ else{
process
remove_duplicates
{
process
remove_duplicates
{
tag
"$sample"
tag
"$sample"
label
'process_highmem'
label
'process_highmem'
publishDir
"${params.outdir}/
hic_results/data
"
,
mode:
params
.
publish_dir_mode
,
publishDir
"${params.outdir}/
valid_pairs
"
,
mode:
params
.
publish_dir_mode
,
saveAs:
{
filename
->
filename
.
indexOf
(
".stat"
)
>
0
?
"stats/$sample/$filename"
:
"$filename"
}
saveAs:
{
filename
->
filename
.
indexOf
(
".stat"
)
>
0
?
"stats/$sample/$filename"
:
"$filename"
}
input:
input:
...
@@ -799,7 +799,7 @@ process remove_duplicates {
...
@@ -799,7 +799,7 @@ process remove_duplicates {
process
merge_stats
{
process
merge_stats
{
tag
"$ext"
tag
"$ext"
label
'process_low'
label
'process_low'
publishDir
"${params.outdir}/
hic_results/
stats/${sample}"
,
mode:
params
.
publish_dir_mode
publishDir
"${params.outdir}/stats/${sample}"
,
mode:
params
.
publish_dir_mode
input:
input:
set
val
(
prefix
),
file
(
fstat
)
from
all_mapstat
.
groupTuple
().
concat
(
all_pairstat
.
groupTuple
(),
all_rsstat
.
groupTuple
())
set
val
(
prefix
),
file
(
fstat
)
from
all_mapstat
.
groupTuple
().
concat
(
all_pairstat
.
groupTuple
(),
all_rsstat
.
groupTuple
())
...
@@ -820,14 +820,14 @@ process merge_stats {
...
@@ -820,14 +820,14 @@ process merge_stats {
/*
/*
* HiC-Pro build matrix processes
* HiC-Pro build matrix processes
*
TODO
- TO REPLACED BY COOLER ?
*
ONGOING VALIDATION
- TO REPLACED BY COOLER ?
*/
*/
process
build_contact_maps
{
process
build_contact_maps
{
tag
"$sample - $mres"
tag
"$sample - $mres"
label
'process_highmem'
label
'process_highmem'
publishDir
"${params.outdir}/hic
_results
/matrix/raw"
,
mode:
params
.
publish_dir_mode
publishDir
"${params.outdir}/hic
pro
/matrix/raw"
,
mode:
params
.
publish_dir_mode
when:
when:
!
params
.
skip_maps
!
params
.
skip_maps
...
@@ -848,7 +848,7 @@ process build_contact_maps{
...
@@ -848,7 +848,7 @@ process build_contact_maps{
process
run_ice
{
process
run_ice
{
tag
"$rmaps"
tag
"$rmaps"
label
'process_highmem'
label
'process_highmem'
publishDir
"${params.outdir}/hic
_results
/matrix/iced"
,
mode:
params
.
publish_dir_mode
publishDir
"${params.outdir}/hic
pro
/matrix/iced"
,
mode:
params
.
publish_dir_mode
when:
when:
!
params
.
skip_maps
&&
!
params
.
skip_ice
!
params
.
skip_maps
&&
!
params
.
skip_ice
...
@@ -884,7 +884,7 @@ process cooler_build {
...
@@ -884,7 +884,7 @@ process cooler_build {
file
chrsize
from
chrsize_build
.
collect
()
file
chrsize
from
chrsize_build
.
collect
()
output:
output:
set
val
(
sample
),
file
(
"contacts.sorted.txt.gz"
),
file
(
"contacts.sorted.txt.gz.px2"
)
into
cool_build
set
val
(
sample
),
file
(
"contacts.sorted.txt.gz"
),
file
(
"contacts.sorted.txt.gz.px2"
)
into
cool_build
,
cool_build_zoom
script:
script:
"""
"""
...
@@ -915,7 +915,7 @@ process cooler_raw {
...
@@ -915,7 +915,7 @@ process cooler_raw {
"""
"""
cooler makebins ${chrsize} ${res} > ${sample}_${res}.bed
cooler makebins ${chrsize} ${res} > ${sample}_${res}.bed
cooler cload pairix --nproc ${task.cpus} ${sample}_${res}.bed ${contacts} ${sample}_${res}.cool
cooler cload pairix --nproc ${task.cpus} ${sample}_${res}.bed ${contacts} ${sample}_${res}.cool
cooler dump ${sample}_${res}.cool
--one-based-ids
| awk '{OFS="\t"; print \$1+1,\$2+1,\$3}' > ${sample}_${res}.txt
cooler dump ${sample}_${res}.cool | awk '{OFS="\t"; print \$1+1,\$2+1,\$3}' > ${sample}_${res}.txt
"""
"""
}
}
...
@@ -938,18 +938,30 @@ process cooler_balance {
...
@@ -938,18 +938,30 @@ process cooler_balance {
"""
"""
cp ${cool} ${sample}_${res}_norm.cool
cp ${cool} ${sample}_${res}_norm.cool
cooler balance ${sample}_${res}_norm.cool -p ${task.cpus} --force
cooler balance ${sample}_${res}_norm.cool -p ${task.cpus} --force
cooler dump ${sample}_${res}_norm.cool
--one-based-ids
--balanced --na-rep 0 | awk '{OFS="\t"; print \$1+1,\$2+1,\$4}' > ${sample}_${res}_norm.txt
cooler dump ${sample}_${res}_norm.cool --balanced --na-rep 0 | awk '{OFS="\t"; print \$1+1,\$2+1,\$4}' > ${sample}_${res}_norm.txt
"""
"""
}
}
/*
-- TODO--
process
cooler_zoomify
{
process
cooler_zoomify
{
tag
"$sample"
label
'process_medium'
publishDir
"${params.outdir}/contact_maps/norm/mcool"
,
mode:
'copy'
input:
set
val
(
sample
),
file
(
contacts
),
file
(
index
)
from
cool_build_zoom
file
chrsize
from
chrsize_zoom
.
collect
()
output:
file
(
"*mcool"
)
into
mcool_maps
script:
"""
cooler makebins ${chrsize} 5000 > bins.bed
cooler cload pairix --nproc ${task.cpus} bins.bed contacts.sorted.txt.gz ${sample}.cool
cooler zoomify --nproc ${task.cpus} --balance ${sample}.cool
"""
}
}
*/
/*
/*
* Create h5 file
* Create h5 file
...
@@ -990,7 +1002,7 @@ chddecay = h5maps_ddecay.combine(ddecay_res).filter{ it[1] == it[3] }.dump(tag:
...
@@ -990,7 +1002,7 @@ chddecay = h5maps_ddecay.combine(ddecay_res).filter{ it[1] == it[3] }.dump(tag:
process
dist_decay
{
process
dist_decay
{
tag
"$sample"
tag
"$sample"
label
'process_medium'
label
'process_medium'
publishDir
"${params.outdir}/
hic_results/dist
"
,
mode:
'copy'
publishDir
"${params.outdir}/
dist_decay
"
,
mode:
'copy'
when:
when:
!
params
.
skip_dist_decay
!
params
.
skip_dist_decay
...
@@ -1065,7 +1077,6 @@ process tads_insulation {
...
@@ -1065,7 +1077,6 @@ process tads_insulation {
}
}
/*
/*
* MultiQC
* MultiQC
*/
*/
...
...
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