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
e533f0a5
Commit
e533f0a5
authored
4 years ago
by
nservant
Browse files
Options
Downloads
Patches
Plain Diff
[MODIF] add zoomify
parent
e9207c34
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide 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 {
// Chromosome size
if ( params.chromosome_size ){
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 ){
Channel.fromPath( params.fasta )
...
...
@@ -438,7 +438,7 @@ if(!params.chromosome_size && params.fasta){
file fasta from fasta_for_chromsize
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:
"""
...
...
@@ -681,7 +681,7 @@ if (!params.dnase){
process get_valid_interaction{
tag "$sample"
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"}
input:
...
...
@@ -720,7 +720,7 @@ else{
process get_valid_interaction_dnase{
tag "$sample"
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"}
input:
...
...
@@ -753,7 +753,7 @@ else{
process remove_duplicates {
tag "$sample"
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"}
input:
...
...
@@ -799,7 +799,7 @@ process remove_duplicates {
process merge_stats {
tag "$ext"
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:
set val(prefix), file(fstat) from all_mapstat.groupTuple().concat(all_pairstat.groupTuple(), all_rsstat.groupTuple())
...
...
@@ -820,14 +820,14 @@ process merge_stats {
/*
* HiC-Pro build matrix processes
*
TODO
- TO REPLACED BY COOLER ?
*
ONGOING VALIDATION
- TO REPLACED BY COOLER ?
*/
process build_contact_maps{
tag "$sample - $mres"
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:
!params.skip_maps
...
...
@@ -848,7 +848,7 @@ process build_contact_maps{
process run_ice{
tag "$rmaps"
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:
!params.skip_maps && !params.skip_ice
...
...
@@ -884,7 +884,7 @@ process cooler_build {
file chrsize from chrsize_build.collect()
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:
"""
...
...
@@ -915,7 +915,7 @@ process cooler_raw {
"""
cooler makebins ${chrsize} ${res} > ${sample}_${res}.bed
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 {
"""
cp ${cool} ${sample}_${res}_norm.cool
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 {
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
...
...
@@ -990,7 +1002,7 @@ chddecay = h5maps_ddecay.combine(ddecay_res).filter{ it[1] == it[3] }.dump(tag:
process dist_decay {
tag "$sample"
label 'process_medium'
publishDir "${params.outdir}/
hic_results/dist
", mode: 'copy'
publishDir "${params.outdir}/
dist_decay
", mode: 'copy'
when:
!params.skip_dist_decay
...
...
@@ -1065,7 +1077,6 @@ process tads_insulation {
}
/*
* 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