-
Notifications
You must be signed in to change notification settings - Fork 868
Cooltools insulation #3634
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
nservant
wants to merge
31
commits into
nf-core:master
Choose a base branch
from
nservant:cooltools_insulation
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Cooltools insulation #3634
Changes from all commits
Commits
Show all changes
31 commits
Select commit
Hold shift + click to select a range
9952de7
[cooltools/insulation] init
nservant 7c87026
[cooltools/insulation] new module
nservant 3d667f2
[cooltools/insulation] lint
nservant ade58e6
Merge branch 'master' into cooltools_insulation
adamrtalbot 709e007
update env with cooltools 0.5.4 and bedgraphtobigwig
nservant 481b8e4
Merge branch 'cooltools_insulation' of github.com:nservant/modules in…
nservant ecc1da9
Merge branch 'master' into cooltools_insulation
SPPearce ce87e34
Merge branch 'master' into cooltools_insulation
SPPearce 41a3efb
Swap to nf-test
SPPearce d7336e8
Update meta
SPPearce 5162643
update version
SPPearce 5e34af5
Merge branch 'master' into cooltools_insulation
SPPearce b77feb2
Merge branch 'master' into cooltools_insulation
SPPearce 454a80f
lint .yml files
Thibault-Poinsignon 8da86ab
update test dataset
Thibault-Poinsignon 8237103
Merge pull request #2 from Thibault-Poinsignon/cooltools_insulation
nservant 3c3aef5
Merge branch 'master' into cooltools_insulation
SPPearce 3bc0d60
Update modules/nf-core/cooltools/insulation/tests/main.nf.test
Thibault-Poinsignon b5f1da9
Update file path
Thibault-Poinsignon 33c4abc
add edam ontologies
Thibault-Poinsignon c32add8
Merge pull request #3 from Thibault-Poinsignon/cooltools_insulation
nservant 3812060
Merge branch 'master' into cooltools_insulation
SPPearce 4ba6899
Merge branch 'master' into cooltools_insulation
Thibault-Poinsignon 72304e3
fix testdata_path param
Thibault-Poinsignon 70cd9cc
Merge pull request #4 from Thibault-Poinsignon/cooltools_insulation
nservant ea7b764
fix params in main.nf
Thibault-Poinsignon 2e77fc8
Merge pull request #5 from Thibault-Poinsignon/cooltools_insulation
nservant 05bf340
Merge branch 'master' into cooltools_insulation
Thibault-Poinsignon ae51186
update cooltools version
Thibault-Poinsignon 84e4a74
Merge pull request #6 from Thibault-Poinsignon/cooltools_insulation
nservant c1b8d51
Fix cooltools version
Thibault-Poinsignon File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
channels: | ||
- conda-forge | ||
- bioconda | ||
- defaults | ||
dependencies: | ||
- bioconda::cooltools=0.7.1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
process COOLTOOLS_INSULATION { | ||
tag "${meta.id}" | ||
label 'process_medium' | ||
|
||
conda "${moduleDir}/environment.yml" | ||
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? | ||
'https://depot.galaxyproject.org/singularity/cooltools:0.7.1--py39hff726c5_2' : | ||
'biocontainers/cooltools:0.7.1--py39hff726c5_2' }" | ||
|
||
input: | ||
tuple val(meta), path(cool) | ||
|
||
output: | ||
tuple val(meta), path("*tsv"), emit:tsv | ||
tuple val(meta), path("*.bw"), optional: true, emit: bigwig | ||
nservant marked this conversation as resolved.
Show resolved
Hide resolved
|
||
path("versions.yml"), emit:versions | ||
|
||
when: | ||
task.ext.when == null || task.ext.when | ||
|
||
script: | ||
def args = task.ext.args ?: '' | ||
def prefix = task.ext.prefix ?: "${meta.id}" | ||
""" | ||
cooltools insulation \\ | ||
-p ${task.cpus} \\ | ||
SPPearce marked this conversation as resolved.
Show resolved
Hide resolved
|
||
-o ${prefix}_insulation.tsv \\ | ||
${cool} \\ | ||
${args} \\ | ||
|
||
cat <<-END_VERSIONS > versions.yml | ||
"${task.process}": | ||
cooltools: \$(cooltools --version 2>&1 | grep version | sed 's/cooltools, version //') | ||
END_VERSIONS | ||
""" | ||
|
||
stub: | ||
def args = task.ext.args ?: '' | ||
def prefix = task.ext.prefix ?: "${meta.id}" | ||
""" | ||
touch ${prefix}_insulation.tsv | ||
|
||
cat <<-END_VERSIONS > versions.yml | ||
"${task.process}": | ||
cooltools: \$(cooltools --version 2>&1 | grep version | sed 's/cooltools, version //') | ||
END_VERSIONS | ||
""" | ||
|
||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
name: "cooltools_insulation" | ||
description: Calculate the diamond insulation scores and call insulating boundaries | ||
keywords: | ||
- cool | ||
- insulation | ||
- Hi-C | ||
tools: | ||
- "cooltools": | ||
description: "Analysis tools for genomic interaction data stored in .cool format" | ||
homepage: "https://cooltools.readthedocs.io" | ||
documentation: "https://cooltools.readthedocs.io" | ||
tool_dev_url: "https://github.com/open2c/cooltools/" | ||
doi: "10.5281/zenodo.5214125" | ||
licence: ["MIT"] | ||
identifier: biotools:cooltools | ||
|
||
input: | ||
- - meta: | ||
type: map | ||
description: Groovy Map containing sample information e.g. id:'test' | ||
- cool: | ||
type: file | ||
description: cool file | ||
pattern: "*.cool" | ||
|
||
output: | ||
- tsv: | ||
- meta: | ||
type: map | ||
description: Groovy Map containing sample information e.g. id:'test' | ||
- "*tsv": | ||
type: file | ||
description: tsv file with insulation score and boundaries for several window sizes | ||
ontologies: | ||
- edam: "http://edamontology.org/format_3475" # TSV | ||
- bigwig: | ||
- meta: | ||
type: map | ||
description: Groovy Map containing sample information e.g. id:'test' | ||
- "*.bw": | ||
type: file | ||
description: bigwig file for different window sizes | ||
ontologies: | ||
- edam: "http://edamontology.org/format_3006" # bigWig | ||
- versions: | ||
- versions.yml: | ||
type: file | ||
description: File containing software versions | ||
pattern: "versions.yml" | ||
authors: | ||
- "@nservant" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
nextflow_process { | ||
|
||
name "Test Process COOLTOOLS_INSULATION" | ||
script "../main.nf" | ||
process "COOLTOOLS_INSULATION" | ||
|
||
tag "modules" | ||
tag "modules_nfcore" | ||
tag "cooltools" | ||
tag "cooltools/insulation" | ||
|
||
test("homo_sapiens - bam") { | ||
|
||
when { | ||
params { | ||
modules_testdata_base_path = "https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/" | ||
} | ||
process { | ||
""" | ||
input[0] = [ [ id:'test' ], | ||
file(params.modules_testdata_base_path + '/genomics/homo_sapiens/cooler/merge/toy/toy.symm.upper.balanced.2.cool', checkIfExists: true) | ||
] | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assertAll( | ||
{ assert process.success }, | ||
{ assert snapshot(process.out).match() } | ||
) | ||
} | ||
|
||
} | ||
|
||
test("homo_sapiens - bam - stub") { | ||
|
||
options "-stub" | ||
|
||
when { | ||
params { | ||
modules_testdata_base_path = "https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/" | ||
} | ||
process { | ||
""" | ||
input[0] = [ [ id:'test' ], | ||
file(params.modules_testdata_base_path + '/genomics/homo_sapiens/cooler/merge/toy/toy.symm.upper.balanced.2.cool', checkIfExists: true) | ||
] | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assertAll( | ||
{ assert process.success }, | ||
{ assert snapshot(process.out).match() } | ||
) | ||
} | ||
|
||
} | ||
|
||
} |
80 changes: 80 additions & 0 deletions
80
modules/nf-core/cooltools/insulation/tests/main.nf.test.snap
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
{ | ||
"homo_sapiens - bam": { | ||
"content": [ | ||
{ | ||
"0": [ | ||
[ | ||
{ | ||
"id": "test" | ||
}, | ||
"test_insulation.tsv:md5,950b848b7be4bbd63e897bd3989871de" | ||
] | ||
], | ||
"1": [ | ||
|
||
], | ||
"2": [ | ||
"versions.yml:md5,49359edc002cbf2d7f08475a768bf565" | ||
], | ||
"bigwig": [ | ||
|
||
], | ||
"tsv": [ | ||
[ | ||
{ | ||
"id": "test" | ||
}, | ||
"test_insulation.tsv:md5,950b848b7be4bbd63e897bd3989871de" | ||
] | ||
], | ||
"versions": [ | ||
"versions.yml:md5,49359edc002cbf2d7f08475a768bf565" | ||
] | ||
} | ||
], | ||
"meta": { | ||
"nf-test": "0.9.2", | ||
"nextflow": "25.04.2" | ||
}, | ||
"timestamp": "2025-06-04T17:09:54.801181735" | ||
}, | ||
"homo_sapiens - bam - stub": { | ||
"content": [ | ||
{ | ||
"0": [ | ||
[ | ||
{ | ||
"id": "test" | ||
}, | ||
"test_insulation.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" | ||
] | ||
], | ||
"1": [ | ||
|
||
], | ||
"2": [ | ||
"versions.yml:md5,49359edc002cbf2d7f08475a768bf565" | ||
], | ||
"bigwig": [ | ||
|
||
], | ||
"tsv": [ | ||
[ | ||
{ | ||
"id": "test" | ||
}, | ||
"test_insulation.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" | ||
] | ||
], | ||
"versions": [ | ||
"versions.yml:md5,49359edc002cbf2d7f08475a768bf565" | ||
] | ||
} | ||
], | ||
"meta": { | ||
"nf-test": "0.9.2", | ||
"nextflow": "25.04.2" | ||
}, | ||
"timestamp": "2025-06-04T17:10:08.339260848" | ||
} | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.