Skip to content

Commit

Permalink
Merge branch 'master' into umi_handling
Browse files Browse the repository at this point in the history
  • Loading branch information
pinin4fjords authored Dec 12, 2024
2 parents e620501 + 9a19690 commit 7288959
Show file tree
Hide file tree
Showing 133 changed files with 4,230 additions and 1,490 deletions.
8 changes: 8 additions & 0 deletions .github/conda_skip.yml
Original file line number Diff line number Diff line change
Expand Up @@ -182,3 +182,11 @@ exclude:
path: modules/nf-core/xeniumranger/resegment
- profile: conda
path: modules/nf-core/xeniumranger/import-segmentation
- profile: conda
path: modules/nf-core/parabricks/dbsnp
- profile: conda
path: modules/nf-core/parabricks/indexgvcf
- profile: conda
path: modules/nf-core/parabricks/genotypegvcf
- profile: conda
path: modules/nf-core/parabricks/applybqsr
13 changes: 9 additions & 4 deletions .github/workflows/gpu-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ env:
NXF_SINGULARITY_CACHEDIR: ${{ github.workspace }}/.singularity
NXF_SINGULARITY_LIBRARYDIR: ${{ github.workspace }}/.singularity
# renovate: datasource=github-releases depName=nextflow-io/nextflow versioning=semver
NXF_VER: "24.10.1"
NXF_VER: "24.10.2"

jobs:
nf-test-changes:
Expand Down Expand Up @@ -108,13 +108,18 @@ jobs:
needs: [nf-test-gpu]
if: always()
steps:
- name: All tests ok
if: ${{ success() || !contains(needs.*.result, 'failure') }}
run: exit 0
- name: One or more tests failed
if: ${{ contains(needs.*.result, 'failure') }}
run: exit 1

- name: One or more tests cancelled
if: ${{ contains(needs.*.result, 'cancelled') }}
run: exit 1

- name: All tests ok
if: ${{ contains(needs.*.result, 'success') }}
run: exit 0

- name: debug-print
if: always()
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ jobs:
with:
python-version: "3.11"

- uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4
- uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4
id: cache-pip
with:
path: ~/.cache/pip
Expand Down
13 changes: 9 additions & 4 deletions .github/workflows/nf-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ env:
NXF_SINGULARITY_CACHEDIR: ${{ github.workspace }}/.singularity
NXF_SINGULARITY_LIBRARYDIR: ${{ github.workspace }}/.singularity
# renovate: datasource=github-releases depName=nextflow/nextflow versioning=semver
NXF_VER: "24.10.1"
NXF_VER: "24.10.2"

jobs:
nf-test-changes:
Expand Down Expand Up @@ -110,13 +110,18 @@ jobs:
needs: [nf-test]
if: always()
steps:
- name: All tests ok
if: ${{ success() || !contains(needs.*.result, 'failure') }}
run: exit 0
- name: One or more tests failed
if: ${{ contains(needs.*.result, 'failure') }}
run: exit 1

- name: One or more tests cancelled
if: ${{ contains(needs.*.result, 'cancelled') }}
run: exit 1

- name: All tests ok
if: ${{ contains(needs.*.result, 'success') }}
run: exit 0

- name: debug-print
if: always()
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pytest-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ jobs:
with:
python-version: "3.11"

- uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4
- uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4
id: cache-pip-pytest
with:
path: ~/.cache/pip
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/wave.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:

- name: Find conda differences
id: conda-diff
uses: tj-actions/changed-files@4edd678ac3f81e2dc578756871e4d00c19191daf # v45
uses: tj-actions/changed-files@bab30c2299617f6615ec02a68b9a40d10bd21366 # v45
with:
json: true
escape_json: false
Expand All @@ -40,7 +40,7 @@ jobs:
- name: Find Dockerfile differences
id: docker-diff
uses: tj-actions/changed-files@4edd678ac3f81e2dc578756871e4d00c19191daf # v45
uses: tj-actions/changed-files@bab30c2299617f6615ec02a68b9a40d10bd21366 # v45
with:
json: true
escape_json: false
Expand Down
2 changes: 1 addition & 1 deletion modules/nf-core/ampcombi2/cluster/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ channels:
- conda-forge
- bioconda
dependencies:
- "bioconda::ampcombi=0.2.2"
- "bioconda::ampcombi=2.0.1"
4 changes: 2 additions & 2 deletions modules/nf-core/ampcombi2/cluster/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ process AMPCOMBI2_CLUSTER {

conda "${moduleDir}/environment.yml"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/ampcombi:0.2.2--pyhdfd78af_0':
'biocontainers/ampcombi:0.2.2--pyhdfd78af_0' }"
'https://depot.galaxyproject.org/singularity/ampcombi:2.0.1--pyhdfd78af_0':
'biocontainers/ampcombi:2.0.1--pyhdfd78af_0' }"

input:
path(summary_file)
Expand Down
18 changes: 9 additions & 9 deletions modules/nf-core/ampcombi2/cluster/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
true,
true,
[
"versions.yml:md5,4e9aa3812bfee6ec22a1b6ccb62de2ca"
"versions.yml:md5,b629089d44775078dce5e664a455422b"
]
],
"meta": {
"nf-test": "0.8.4",
"nextflow": "23.10.1"
"nf-test": "0.9.2",
"nextflow": "24.10.2"
},
"timestamp": "2024-04-24T12:11:40.928513749"
"timestamp": "2024-12-03T07:57:01.869983435"
},
"ampcombi2_cluster - metagenome - stub": {
"content": [
Expand All @@ -26,7 +26,7 @@
"Ampcombi_cluster.log:md5,d41d8cd98f00b204e9800998ecf8427e"
],
"3": [
"versions.yml:md5,4e9aa3812bfee6ec22a1b6ccb62de2ca"
"versions.yml:md5,b629089d44775078dce5e664a455422b"
],
"cluster_tsv": [
"Ampcombi_summary_cluster.tsv:md5,d41d8cd98f00b204e9800998ecf8427e"
Expand All @@ -38,14 +38,14 @@
"Ampcombi_summary_cluster_representative_seq.tsv:md5,d41d8cd98f00b204e9800998ecf8427e"
],
"versions": [
"versions.yml:md5,4e9aa3812bfee6ec22a1b6ccb62de2ca"
"versions.yml:md5,b629089d44775078dce5e664a455422b"
]
}
],
"meta": {
"nf-test": "0.8.4",
"nextflow": "23.10.1"
"nf-test": "0.9.2",
"nextflow": "24.10.2"
},
"timestamp": "2024-04-24T12:12:08.780718892"
"timestamp": "2024-12-03T07:57:23.939137628"
}
}
2 changes: 1 addition & 1 deletion modules/nf-core/ampcombi2/complete/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ channels:
- conda-forge
- bioconda
dependencies:
- "bioconda::ampcombi=0.2.2"
- "bioconda::ampcombi=2.0.1"
4 changes: 2 additions & 2 deletions modules/nf-core/ampcombi2/complete/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ process AMPCOMBI2_COMPLETE {

conda "${moduleDir}/environment.yml"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/ampcombi:0.2.2--pyhdfd78af_0':
'biocontainers/ampcombi:0.2.2--pyhdfd78af_0' }"
'https://depot.galaxyproject.org/singularity/ampcombi:2.0.1--pyhdfd78af_0':
'biocontainers/ampcombi:2.0.1--pyhdfd78af_0' }"

input:
path(summaries)
Expand Down
24 changes: 12 additions & 12 deletions modules/nf-core/ampcombi2/complete/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
Expand Up @@ -6,39 +6,39 @@
"Ampcombi_summary.tsv:md5,d41d8cd98f00b204e9800998ecf8427e"
],
"1": [

],
"2": [
"versions.yml:md5,0aa35e86761a6c160482b8b8dbfc5440"
"versions.yml:md5,bfba0046e0cfa7b0b6d79663823f94c0"
],
"log": [

],
"tsv": [
"Ampcombi_summary.tsv:md5,d41d8cd98f00b204e9800998ecf8427e"
],
"versions": [
"versions.yml:md5,0aa35e86761a6c160482b8b8dbfc5440"
"versions.yml:md5,bfba0046e0cfa7b0b6d79663823f94c0"
]
}
],
"meta": {
"nf-test": "0.8.4",
"nextflow": "23.10.1"
"nf-test": "0.9.2",
"nextflow": "24.10.2"
},
"timestamp": "2024-04-29T11:55:16.030399422"
"timestamp": "2024-12-03T07:57:53.385349848"
},
"ampcombi2_complete - contigs": {
"content": [
true,
[
"versions.yml:md5,0aa35e86761a6c160482b8b8dbfc5440"
"versions.yml:md5,bfba0046e0cfa7b0b6d79663823f94c0"
]
],
"meta": {
"nf-test": "0.8.4",
"nextflow": "23.10.1"
"nf-test": "0.9.2",
"nextflow": "24.10.2"
},
"timestamp": "2024-04-29T11:54:54.334224301"
"timestamp": "2024-12-03T07:57:40.263912946"
}
}
}
2 changes: 1 addition & 1 deletion modules/nf-core/ampcombi2/parsetables/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ channels:
- conda-forge
- bioconda
dependencies:
- "bioconda::ampcombi=0.2.2"
- "bioconda::ampcombi=2.0.1"
80 changes: 48 additions & 32 deletions modules/nf-core/ampcombi2/parsetables/main.nf
Original file line number Diff line number Diff line change
@@ -1,48 +1,54 @@
process AMPCOMBI2_PARSETABLES {
tag "$meta.id"
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/ampcombi:0.2.2--pyhdfd78af_0':
'biocontainers/ampcombi:0.2.2--pyhdfd78af_0' }"
'https://depot.galaxyproject.org/singularity/ampcombi:2.0.1--pyhdfd78af_0':
'biocontainers/ampcombi:2.0.1--pyhdfd78af_0' }"

input:
tuple val(meta), path(amp_input)
path(faa_input)
path(gbk_input)
path(opt_amp_db)
path faa_input
path gbk_input
val opt_amp_db
path opt_amp_db_dir
path opt_interproscan

output:
tuple val(meta), path("${meta.id}/") , emit: sample_dir
tuple val(meta), path("${meta.id}/contig_gbks/") , emit: contig_gbks
tuple val(meta), path("${meta.id}/${meta.id}_diamond_matches.txt"), emit: txt
tuple val(meta), path("${meta.id}/${meta.id}_ampcombi.tsv") , emit: tsv
tuple val(meta), path("${meta.id}/${meta.id}_amp.faa") , emit: faa
tuple val(meta), path("${meta.id}/${meta.id}_ampcombi.log") , emit: sample_log, optional:true
tuple val(meta), path("Ampcombi_parse_tables.log") , emit: full_log, optional:true
tuple val(meta), path("amp_ref_database/") , emit: results_db, optional:true
tuple val(meta), path("amp_ref_database/*.dmnd") , emit: results_db_dmnd, optional:true
tuple val(meta), path("amp_ref_database/*.clean.fasta") , emit: results_db_fasta, optional:true
tuple val(meta), path("amp_ref_database/*.tsv") , emit: results_db_tsv, optional:true
path "versions.yml" , emit: versions
tuple val(meta), path("${meta.id}/") , emit: sample_dir
tuple val(meta), path("${meta.id}/contig_gbks/") , emit: contig_gbks
tuple val(meta), path("${meta.id}/${meta.id}_mmseqs_matches.tsv") , emit: db_tsv
tuple val(meta), path("${meta.id}/${meta.id}_ampcombi.tsv") , emit: tsv
tuple val(meta), path("${meta.id}/${meta.id}_amp.faa") , emit: faa
tuple val(meta), path("${meta.id}/${meta.id}_ampcombi.log") , emit: sample_log , optional:true
tuple val(meta), path("Ampcombi_parse_tables.log") , emit: full_log , optional:true
tuple val(meta), path("amp_${opt_amp_db}_database/") , emit: db , optional:true
tuple val(meta), path("amp_${opt_amp_db}_database/*.txt") , emit: db_txt , optional:true
tuple val(meta), path("amp_${opt_amp_db}_database/*.fasta") , emit: db_fasta , optional:true
tuple val(meta), path("amp_${opt_amp_db}_database/mmseqs2/") , emit: db_mmseqs , optional:true
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}"
def db = opt_amp_db? "--amp_database $opt_amp_db": ""
def db_dir = opt_amp_db_dir ? "--amp_database_dir ${opt_amp_db_dir}" : ""
def interpro = opt_interproscan ? "--interproscan_output ${opt_interproscan}" : ""

"""
ampcombi parse_tables \\
--path_list '${amp_input.collect{"$it"}.join("' '")}' \\
--faa ${faa_input} \\
--gbk ${gbk_input} \\
--sample_list ${prefix} \\
${db} \\
$args \\
--threads ${task.cpus}
--path_list '${amp_input.collect { "${it}" }.join("' '")}' \\
--faa ${faa_input} \\
--gbk ${gbk_input} \\
--sample_list ${prefix} \\
--amp_database ${opt_amp_db} \\
${db_dir} \\
${interpro} \\
${args} \\
--threads ${task.cpus}
cat <<-END_VERSIONS > versions.yml
"${task.process}":
Expand All @@ -53,20 +59,30 @@ process AMPCOMBI2_PARSETABLES {
stub:
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"
def db = opt_amp_db? "--amp_database $opt_amp_db": ""
def db_dir = opt_amp_db_dir ? "--amp_database_dir ${opt_amp_db_dir}" : ""
def interpro = opt_interproscan ? "--interproscan_output ${opt_interproscan}" : ""

"""
mkdir -p ${prefix}
mkdir -p ${prefix}/contig_gbks
touch ${prefix}/${meta.id}_diamond_matches.txt
touch ${prefix}/${meta.id}_mmseqs_matches.tsv
touch ${prefix}/${meta.id}_ampcombi.tsv
touch ${prefix}/${meta.id}_amp.faa
touch ${prefix}/${meta.id}_ampcombi.log
touch Ampcombi_parse_tables.log
mkdir -p amp_ref_database
touch amp_ref_database/*.dmnd
touch amp_ref_database/*.clean.fasta
touch amp_ref_database/*.tsv
mkdir -p amp_${opt_amp_db}_database
mkdir -p amp_${opt_amp_db}_database/mmseqs2
touch amp_${opt_amp_db}_database/*.fasta
touch amp_${opt_amp_db}_database/*.txt
touch amp_${opt_amp_db}_database/mmseqs2/ref_DB
touch amp_${opt_amp_db}_database/mmseqs2/ref_DB.dbtype
touch amp_${opt_amp_db}_database/mmseqs2/ref_DB_h
touch amp_${opt_amp_db}_database/mmseqs2/ref_DB_h.dbtype
touch amp_${opt_amp_db}_database/mmseqs2/ref_DB_h.index
touch amp_${opt_amp_db}_database/mmseqs2/ref_DB.index
touch amp_${opt_amp_db}_database/mmseqs2/ref_DB.lookup
touch amp_${opt_amp_db}_database/mmseqs2/ref_DB.source
cat <<-END_VERSIONS > versions.yml
"${task.process}":
Expand Down
Loading

0 comments on commit 7288959

Please sign in to comment.