Skip to content
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

Update tabix and add threads #5999

Merged
merged 2 commits into from
Jul 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion modules/nf-core/tabix/bgzip/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ channels:
- defaults
dependencies:
- bioconda::tabix=1.11
- bioconda::htslib=1.19.1
- bioconda::htslib=1.20
4 changes: 2 additions & 2 deletions modules/nf-core/tabix/bgzip/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ process TABIX_BGZIP {

conda "${moduleDir}/environment.yml"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/htslib:1.19.1--h81da01d_1' :
'biocontainers/htslib:1.19.1--h81da01d_1' }"
'https://depot.galaxyproject.org/singularity/htslib:1.20--h5efdd21_2' :
'biocontainers/htslib:1.20--h5efdd21_2' }"

input:
tuple val(meta), path(input)
Expand Down
56 changes: 44 additions & 12 deletions modules/nf-core/tabix/bgzip/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
"content": [
"gzi_compress_test.vcf.gz.gzi"
],
"meta": {
"nf-test": "0.8.4",
"nextflow": "24.04.2"
},
"timestamp": "2024-02-19T14:52:29.328146"
},
"homo_genome_bedgz_compress": {
Expand All @@ -20,7 +24,7 @@

],
"2": [
"versions.yml:md5,e023292de6ee109a44fc67475d658174"
"versions.yml:md5,753c29916d45debdde52f4ac7c745f61"
],
"gzi": [

Expand All @@ -34,16 +38,24 @@
]
],
"versions": [
"versions.yml:md5,e023292de6ee109a44fc67475d658174"
"versions.yml:md5,753c29916d45debdde52f4ac7c745f61"
]
}
],
"timestamp": "2024-02-19T14:52:12.422209"
"meta": {
"nf-test": "0.8.4",
"nextflow": "24.04.2"
},
"timestamp": "2024-07-19T11:28:34.159992362"
},
"test_stub": {
"content": [
"test_stub.vcf.gz"
],
"meta": {
"nf-test": "0.8.4",
"nextflow": "24.04.2"
},
"timestamp": "2024-02-19T14:52:20.811489"
},
"sarscov2_vcf_bgzip_compress": {
Expand All @@ -61,7 +73,7 @@

],
"2": [
"versions.yml:md5,e023292de6ee109a44fc67475d658174"
"versions.yml:md5,753c29916d45debdde52f4ac7c745f61"
],
"gzi": [

Expand All @@ -75,11 +87,15 @@
]
],
"versions": [
"versions.yml:md5,e023292de6ee109a44fc67475d658174"
"versions.yml:md5,753c29916d45debdde52f4ac7c745f61"
]
}
],
"timestamp": "2024-02-19T14:52:03.706028"
"meta": {
"nf-test": "0.8.4",
"nextflow": "24.04.2"
},
"timestamp": "2024-07-19T11:28:22.087769106"
},
"sarscov2_vcf_bgzip_compress_gzi": {
"content": [
Expand All @@ -101,7 +117,7 @@
]
],
"2": [
"versions.yml:md5,e023292de6ee109a44fc67475d658174"
"versions.yml:md5,753c29916d45debdde52f4ac7c745f61"
],
"gzi": [
[
Expand All @@ -120,22 +136,34 @@
]
],
"versions": [
"versions.yml:md5,e023292de6ee109a44fc67475d658174"
"versions.yml:md5,753c29916d45debdde52f4ac7c745f61"
]
}
],
"timestamp": "2024-02-19T14:52:29.271494"
"meta": {
"nf-test": "0.8.4",
"nextflow": "24.04.2"
},
"timestamp": "2024-07-19T11:28:57.15091665"
},
"bgzip_test": {
"content": [
"bgzip_test.vcf.gz"
],
"meta": {
"nf-test": "0.8.4",
"nextflow": "24.04.2"
},
"timestamp": "2024-02-19T14:52:03.768295"
},
"bedgz_test": {
"content": [
"bedgz_test.bed"
],
"meta": {
"nf-test": "0.8.4",
"nextflow": "24.04.2"
},
"timestamp": "2024-02-19T14:52:12.453855"
},
"sarscov2_vcf_bgzip_compress_stub": {
Expand All @@ -158,7 +186,7 @@
]
],
"2": [
"versions.yml:md5,e023292de6ee109a44fc67475d658174"
"versions.yml:md5,753c29916d45debdde52f4ac7c745f61"
],
"gzi": [
[
Expand All @@ -177,10 +205,14 @@
]
],
"versions": [
"versions.yml:md5,e023292de6ee109a44fc67475d658174"
"versions.yml:md5,753c29916d45debdde52f4ac7c745f61"
]
}
],
"timestamp": "2024-02-19T14:52:20.769619"
"meta": {
"nf-test": "0.8.4",
"nextflow": "24.04.2"
},
"timestamp": "2024-07-19T11:28:45.219404786"
}
}
2 changes: 1 addition & 1 deletion modules/nf-core/tabix/bgziptabix/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ channels:
- defaults
dependencies:
- bioconda::tabix=1.11
- bioconda::htslib=1.19.1
- bioconda::htslib=1.20
6 changes: 3 additions & 3 deletions modules/nf-core/tabix/bgziptabix/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ process TABIX_BGZIPTABIX {

conda "${moduleDir}/environment.yml"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/htslib:1.19.1--h81da01d_1' :
'biocontainers/htslib:1.19.1--h81da01d_1' }"
'https://depot.galaxyproject.org/singularity/htslib:1.20--h5efdd21_2' :
'biocontainers/htslib:1.20--h5efdd21_2' }"

input:
tuple val(meta), path(input)
Expand All @@ -24,7 +24,7 @@ process TABIX_BGZIPTABIX {
def prefix = task.ext.prefix ?: "${meta.id}"
"""
bgzip --threads ${task.cpus} -c $args $input > ${prefix}.${input.getExtension()}.gz
tabix $args2 ${prefix}.${input.getExtension()}.gz
tabix --threads ${task.cpus} $args2 ${prefix}.${input.getExtension()}.gz

cat <<-END_VERSIONS > versions.yml
"${task.process}":
Expand Down
50 changes: 37 additions & 13 deletions modules/nf-core/tabix/bgziptabix/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@
"id": "tbi_test"
},
"tbi_test.bed.gz:md5,fe4053cf4de3aebbdfc3be2efb125a74",
"tbi_test.bed.gz.tbi:md5,24908545311cf2b7c803c41d716872c4"
"tbi_test.bed.gz.tbi:md5,ca06caf88b1e3c67d5fcba0a1460b52c"
]
],
"1": [

],
"2": [
"versions.yml:md5,b4765e4d896ce4a4cdd6c896d12555fc"
"versions.yml:md5,736e7c3b16a3ac525253e5b5f5d8fdfa"
],
"gz_csi": [

Expand All @@ -26,15 +26,19 @@
"id": "tbi_test"
},
"tbi_test.bed.gz:md5,fe4053cf4de3aebbdfc3be2efb125a74",
"tbi_test.bed.gz.tbi:md5,24908545311cf2b7c803c41d716872c4"
"tbi_test.bed.gz.tbi:md5,ca06caf88b1e3c67d5fcba0a1460b52c"
]
],
"versions": [
"versions.yml:md5,b4765e4d896ce4a4cdd6c896d12555fc"
"versions.yml:md5,736e7c3b16a3ac525253e5b5f5d8fdfa"
]
}
],
"timestamp": "2024-02-19T14:50:51.513838"
"meta": {
"nf-test": "0.8.4",
"nextflow": "24.04.2"
},
"timestamp": "2024-07-19T11:29:16.053817543"
},
"sarscov2_bed_csi": {
"content": [
Expand All @@ -48,47 +52,63 @@
"id": "csi_test"
},
"csi_test.bed.gz:md5,fe4053cf4de3aebbdfc3be2efb125a74",
"csi_test.bed.gz.csi:md5,e06165ddd34640783728cb07f2558b43"
"csi_test.bed.gz.csi:md5,c9c0377de58fdc89672bb3005a0d69f5"
]
],
"2": [
"versions.yml:md5,b4765e4d896ce4a4cdd6c896d12555fc"
"versions.yml:md5,736e7c3b16a3ac525253e5b5f5d8fdfa"
],
"gz_csi": [
[
{
"id": "csi_test"
},
"csi_test.bed.gz:md5,fe4053cf4de3aebbdfc3be2efb125a74",
"csi_test.bed.gz.csi:md5,e06165ddd34640783728cb07f2558b43"
"csi_test.bed.gz.csi:md5,c9c0377de58fdc89672bb3005a0d69f5"
]
],
"gz_tbi": [

],
"versions": [
"versions.yml:md5,b4765e4d896ce4a4cdd6c896d12555fc"
"versions.yml:md5,736e7c3b16a3ac525253e5b5f5d8fdfa"
]
}
],
"timestamp": "2024-02-19T14:51:00.513777"
"meta": {
"nf-test": "0.8.4",
"nextflow": "24.04.2"
},
"timestamp": "2024-07-19T11:29:27.667745444"
},
"csi_test": {
"content": [
"csi_test.bed.gz"
],
"meta": {
"nf-test": "0.8.4",
"nextflow": "24.04.2"
},
"timestamp": "2024-02-19T14:51:00.548801"
},
"csi_stub": {
"content": [
"test.bed.gz"
],
"meta": {
"nf-test": "0.8.4",
"nextflow": "24.04.2"
},
"timestamp": "2024-02-19T14:51:09.218454"
},
"tbi_test": {
"content": [
"tbi_test.bed.gz"
],
"meta": {
"nf-test": "0.8.4",
"nextflow": "24.04.2"
},
"timestamp": "2024-02-19T14:50:51.579654"
},
"sarscov2_bed_csi_stub": {
Expand All @@ -113,7 +133,7 @@
]
],
"2": [
"versions.yml:md5,b4765e4d896ce4a4cdd6c896d12555fc"
"versions.yml:md5,736e7c3b16a3ac525253e5b5f5d8fdfa"
],
"gz_csi": [
[
Expand All @@ -134,10 +154,14 @@
]
],
"versions": [
"versions.yml:md5,b4765e4d896ce4a4cdd6c896d12555fc"
"versions.yml:md5,736e7c3b16a3ac525253e5b5f5d8fdfa"
]
}
],
"timestamp": "2024-02-19T14:51:09.164254"
"meta": {
"nf-test": "0.8.4",
"nextflow": "24.04.2"
},
"timestamp": "2024-07-19T11:29:45.105209991"
}
}
4 changes: 3 additions & 1 deletion modules/nf-core/tabix/tabix/environment.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
name: tabix_tabix

channels:
- conda-forge
- bioconda
- defaults

dependencies:
- bioconda::htslib=1.20
- bioconda::tabix=1.11
- bioconda::htslib=1.19.1
11 changes: 7 additions & 4 deletions modules/nf-core/tabix/tabix/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ process TABIX_TABIX {

conda "${moduleDir}/environment.yml"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/htslib:1.19.1--h81da01d_1' :
'biocontainers/htslib:1.19.1--h81da01d_1' }"
'https://depot.galaxyproject.org/singularity/htslib:1.20--h5efdd21_2' :
'biocontainers/htslib:1.20--h5efdd21_2' }"

input:
tuple val(meta), path(tab)
Expand All @@ -21,7 +21,10 @@ process TABIX_TABIX {
script:
def args = task.ext.args ?: ''
"""
tabix $args $tab
tabix \\
--threads $task.cpus \\
$args \\
$tab

cat <<-END_VERSIONS > versions.yml
"${task.process}":
Expand All @@ -33,8 +36,8 @@ process TABIX_TABIX {
"""
touch ${tab}.tbi
touch ${tab}.csi
cat <<-END_VERSIONS > versions.yml

cat <<-END_VERSIONS > versions.yml
"${task.process}":
tabix: \$(echo \$(tabix -h 2>&1) | sed 's/^.*Version: //; s/ .*\$//')
END_VERSIONS
Expand Down
Loading
Loading