Skip to content

Commit

Permalink
Update preprocessing workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
robomics committed Mar 7, 2024
1 parent 4a72149 commit e9bf42a
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 0 deletions.
4 changes: 4 additions & 0 deletions preprocessing/configs/preprocess_data.config
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ process {
container = 'ghcr.io/paulsengroup/2023-hictk-paper/hic-tools:3.30.00'
memory = 750.GB
}
withName:pairs_to_single_res_hic9 {
container = 'ghcr.io/paulsengroup/2023-hictk-paper/hic-tools:3.30.00'
memory = 750.GB
}
withName:hictk_convert {
container = 'ghcr.io/paulsengroup/2023-hictk-paper/hictk-bench:1.0.0'
}
Expand Down
38 changes: 38 additions & 0 deletions preprocessing/workflows/preprocess_data.nf
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ workflow {
pairs
)

pairs_to_single_res_hic9(
process_chrom_sizes.out.chrom_sizes,
prepare_pairs_for_juicer.out.txt.collect(),
Channel.fromList(params.resolutions)
)

pairs_to_hic8(
process_chrom_sizes.out.chrom_sizes,
prepare_pairs_for_juicer.out.txt,
Expand Down Expand Up @@ -214,6 +220,38 @@ process cooler_zoomify {
'''
}


process pairs_to_single_res_hic9 {
publishDir params.data_dir, mode: 'copy'

label 'process_medium'
label 'process_very_long'

tag "${pairs.simpleName}"

input:
path chrom_sizes
path pairs
val resolution

output:
path "*.hic9", emit: hic

shell:
memory_gb=task.memory.toGiga()
dest="${pairs.simpleName}.${resolution}.hic9"
'''
java -Xmx!{memory_gb}G -Xms!{memory_gb}G -jar "$HICTOOLS_JAR" \\
pre '!{pairs}' \\
'!{dest}' \\
'!{chrom_sizes}' \\
-j !{task.cpus} \\
--threads !{task.cpus} \\
-r '!{resolution}' \\
-n
'''
}

process hictk_convert {
publishDir "${params.data_dir}/input/matrices", mode: 'copy'

Expand Down

0 comments on commit e9bf42a

Please sign in to comment.