Skip to content

Commit

Permalink
[MODIF] add CALDER2 compartment caller
Browse files Browse the repository at this point in the history
  • Loading branch information
nservant committed Jul 18, 2024
1 parent c7d999c commit 65f6ee1
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 8 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### `Added`

Add CALDER2 compartments calling (see '--compartments_caller' option)

- Add new '--balancing_opts' to update `cooler balance` arguments

- New subworkflow based on `pairtools` to detect valid pairs. The user
Expand Down
1 change: 1 addition & 0 deletions nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ params {
res_dist_decay = '250000'
tads_caller = 'insulation'
res_tads = '40000'
compartments_caller = 'cooltools'
res_compartments = '250000'

// Workflow
Expand Down
5 changes: 5 additions & 0 deletions nextflow_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,11 @@
"default": "insulation",
"description": "Define methods for TADs calling"
},
"compartments_caller": {
"type": "string",
"default": "cooltools",
"description": "Define methods for compartments calling"
},
"res_tads": {
"type": "string",
"pattern": "^(\\d+)(,\\d+)*$",
Expand Down
28 changes: 20 additions & 8 deletions subworkflows/local/compartments.nf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
include { COOLTOOLS_EIGSCIS } from '../../modules/local/cooltools/eigscis'

include { CALDER2 } from '../../modules/nfcore/calder2/main'
workflow COMPARTMENTS {

take:
Expand All @@ -10,14 +10,26 @@ workflow COMPARTMENTS {
main:
ch_versions = Channel.empty()

COOLTOOLS_EIGSCIS(
cool,
fasta.map{it -> it[1]}.collect(),
chrsize.map{it -> it[1]}.collect()
)
ch_versions = ch_versions.mix(COOLTOOLS_EIGSCIS.out.versions)
if (params.compartments_caller =~ 'cooltools'){
COOLTOOLS_EIGSCIS(
cool,
fasta.map{it -> it[1]}.collect(),
chrsize.map{it -> it[1]}.collect()
)
ch_versions = ch_versions.mix(COOLTOOLS_EIGSCIS.out.versions)
ch_comp = COOLTOOLS_EIGSCIS.out.results
}

if (params.compartments_caller =~ 'calder2'){
CALDER2(
cool,
Channel.value([])
)
ch_versions = ch_versions.mix(CALDER2.out.versions
ch_comp = CALDER2.out.output_folder
}

emit:
versions = ch_versions
compartments = COOLTOOLS_EIGSCIS.out.results
compartments = ch_comp
}

0 comments on commit 65f6ee1

Please sign in to comment.