Skip to content
Merged
Show file tree
Hide file tree
Changes from 8 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
5 changes: 5 additions & 0 deletions .github/actions/nf-test/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,16 @@ runs:
- name: Setup apptainer
if: contains(inputs.profile, 'singularity')
uses: eWaterCycle/setup-apptainer@4bb22c52d4f63406c49e94c804632975787312b3 # v2.0.0
with:
apptainer-version: 1.5.3

- name: Set up Singularity
if: contains(inputs.profile, 'singularity')
shell: bash
run: |
# The runner image restricts unprivileged user namespaces, which non-suid
# apptainer needs to start a container at all.
sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0 || true
mkdir -p $NXF_SINGULARITY_CACHEDIR
mkdir -p $NXF_SINGULARITY_LIBRARYDIR

Expand Down
1 change: 0 additions & 1 deletion .github/workflows/awsfulltest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ jobs:

- name: Launch workflow via Seqera Platform
uses: seqeralabs/action-tower-launch@51565b514bff1827cf34620de25d0055759f1fc9 # v2
# TODO nf-core: You can customise AWS full pipeline tests as required
# Add full size test data (but still relatively small datasets for few samples)
# on the `test_full.config` test runs with only one set of parameters
with:
Expand Down
4 changes: 3 additions & 1 deletion .nf-core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ lint:
- assets/nf-core-funcprofiler_logo_light.png
- .github/PULL_REQUEST_TEMPLATE.md
- .github/workflows/linting.yml
- .github/workflows/linting_comment.yml
# The 4.0.3 template renders `HEAD_REPO:` with two spaces, which the prettier
Comment thread
vinisalazar marked this conversation as resolved.
# pin used by prek collapses to one, so this file can never match the template.
- .github/workflows/branch.yml
- .gitignore
nf_core_version: 4.0.3
repository_type: pipeline
Expand Down
1 change: 0 additions & 1 deletion assets/methods_description_template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ description: "Suggested text and references to use when describing pipeline usag
section_name: "nf-core/funcprofiler Methods Description"
section_href: "https://github.com/nf-core/funcprofiler"
plot_type: "html"
## TODO nf-core: Update the HTML below to your preferred methods description, e.g. add publication citation for this pipeline
## You inject any metadata in the Nextflow '${workflow}' object
data: |
<h4>Methods</h4>
Expand Down
2 changes: 0 additions & 2 deletions conf/base.config
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@

process {

// TODO nf-core: Check the defaults for all processes
cpus = { 1 * task.attempt }
memory = { 6.GB * task.attempt }
time = { 4.h * task.attempt }
Expand All @@ -24,7 +23,6 @@ process {
// These labels are used and recognised by default in DSL2 files hosted on nf-core/modules.
// If possible, it would be nice to keep the same label naming convention when
// adding in your local modules too.
// TODO nf-core: Customise requirements for specific processes.
// See https://www.nextflow.io/docs/latest/config.html#config-process-selectors
withLabel:process_single {
cpus = { 1 }
Expand Down
4 changes: 0 additions & 4 deletions conf/test_full.config
Comment thread
vinisalazar marked this conversation as resolved.
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,8 @@
params {
config_profile_name = 'Full test profile'
config_profile_description = 'Full test dataset to check pipeline function'
// input = params.pipelines_testdata_base_path + 'samplesheets/test.csv'
// databases = params.pipelines_testdata_base_path + 'database_full.csv'
input = 'https://raw.githubusercontent.com/nf-core/test-datasets/refs/heads/taxprofiler/samplesheet_shortreadsonly.csv'
databases = 'https://raw.githubusercontent.com/nickp60/test-datasets/refs/heads/funcprofiler/database_full.csv'
outdir = "fulltest_results"
cleanup = false
run_fmhfunprofiler = true
run_humann_v3 = true
run_mifaser = true
Expand Down
7 changes: 6 additions & 1 deletion docs/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -182,4 +182,9 @@ If you update images or graphics, follow the nf-core [style guidelines](https://

## Pipeline specific contribution guidelines

<!-- TODO nf-core: Add any pipeline specific contribution guidelines here, such as coding styles, procedures, checklists etc. -->
When adding a new profiler:
Comment thread
vinisalazar marked this conversation as resolved.

- Add it to [nf-core/modules](https://github.com/nf-core/modules) rather than to `modules/local`. A local module is only a stopgap for tools that are not yet packaged on Bioconda.
- Gate it behind a `run_<tool>` parameter, and take its database from the database sheet so it is grouped by `dbprep` like every other tool.
- Add it to the `profile` subworkflow, to `docs/output.md`, and to `CITATIONS.md`.
- Cover it with an nf-test, and regenerate snapshots with `nf-test test --update-snapshot`.
2 changes: 1 addition & 1 deletion main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ workflow NFCORE_FUNCPROFILER {
//
// WORKFLOW: Run pipeline
//
FUNCPROFILER (
FUNCPROFILER(
samplesheet,
databases,
params.multiqc_config,
Expand Down
19 changes: 10 additions & 9 deletions modules/local/humann4/humann/main.nf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Taken 98% from https://github.com/nf-core/modules/pull/1089/files
process HUMANN4 {
tag "$meta.id"
tag "${meta.id}"
label 'process_high'

conda "${moduleDir}/environment.yml"
Expand All @@ -14,10 +14,10 @@ process HUMANN4 {
path utility_db

output:
tuple val(meta), path("*_genefamilies.tsv.gz") , emit: genefamilies
tuple val(meta), path("*_genefamilies.tsv.gz"), emit: genefamilies
tuple val(meta), path("*_pathabundance.tsv.gz"), emit: pathabundance
tuple val(meta), path("*_reactions.tsv.gz") , emit: reactions
tuple val(meta), path("*.log") , emit: log
tuple val(meta), path("*_reactions.tsv.gz"), emit: reactions
tuple val(meta), path("*.log"), emit: log
tuple val("${task.process}"), val('HUMAnN'), eval("humann --version 2>&1 | sed 's/humann v//'"), emit: versions_humann, topic: versions
tuple val("${task.process}"), val('MetaPHLan'), eval("metaphlan --version 2>&1 | sed 's/metaphlan v//'"), emit: versions_metaphlan, topic: versions

Expand All @@ -39,13 +39,13 @@ process HUMANN4 {

find \${NUCS_DB}
humann \\
$args \\
${args} \\
--threads ${task.cpus} \\
--input $input \\
--input ${input} \\
--protein-database \${PROTS_DB} \\
--nucleotide-database \${NUCS_DB} \\
--output-basename $prefix \\
$pangenome_string \\
--output-basename ${prefix} \\
${pangenome_string} \\
${args} \\
--o-log ${prefix}.log \\
--output .
Expand All @@ -54,11 +54,12 @@ process HUMANN4 {
gzip -n *.tsv

"""

stub:
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"
"""
echo $args
echo ${args}

for suf in genefamilies.tsv.gz pathabundance.tsv.gz reactions.tsv.gz
do
Expand Down
9 changes: 3 additions & 6 deletions nextflow_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -129,19 +129,16 @@
},
"run_rgi": {
"type": "boolean",
"description": "Turn on profiling with RGI. Requires database to be present CSV file passed to --databases",
"default": false
"description": "Turn on profiling with RGI. Requires database to be present CSV file passed to --databases"
},
"run_mifaser": {
"type": "boolean",
"description": "Turn on profiling with mi-faser. Requires database to be present CSV file passed to --databases",
"default": false
"description": "Turn on profiling with mi-faser. Requires database to be present CSV file passed to --databases"
},
"run_eggnogmapper": {
"type": "boolean",
"fa_icon": "fas fa-toggle-on",
"description": "Turn on functional annotation with EggNOG-mapper. Requires `eggnogmapper`-tagged database entries in the CSV file passed to --databases",
"default": false
"description": "Turn on functional annotation with EggNOG-mapper. Requires `eggnogmapper`-tagged database entries in the CSV file passed to --databases"
}
}
},
Expand Down
62 changes: 27 additions & 35 deletions subworkflows/local/dataprep/meta.yml
Original file line number Diff line number Diff line change
@@ -1,50 +1,42 @@
# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/subworkflows/yaml-schema.json
name: "dataprep"
## TODO nf-core: Add a description of the subworkflow and list keywords
description: Sort SAM/BAM/CRAM file
description: |
Validate the input samplesheet and prepare read channels for profiling. Sets
`single_end`, `run_accession` and `instrument_platform` on the meta map, merges
Comment thread
vinisalazar marked this conversation as resolved.
multiple runs belonging to the same sample, and produces an additional channel
in which read pairs are concatenated into a single file for tools that cannot
take paired input.
keywords:
- sort
- bam
- sam
- cram
## TODO nf-core: Add a list of the modules and/or subworkflows used in the subworkflow
- samplesheet
- fastq
- merging
- concatenation
- metagenome
components:
- samtools/sort
- samtools/index
## TODO nf-core: List all of the channels used as input with a description and their structure
- cat/fastq
input:
- ch_bam:
- samplesheet:
type: file
description: |
The input channel containing the BAM/CRAM/SAM files
Structure: [ val(meta), path(bam) ]
pattern: "*.{bam/cram/sam}"
## TODO nf-core: List all of the channels used as output with a descriptions and their structure
Channel of validated samplesheet rows. Long-read (`OXFORD_NANOPORE`)
platforms and FASTA input are rejected, and `fastq_1` is required.
Structure: [ val(meta), val(run_accession), val(instrument_platform), path(fastq_1), path(fastq_2), path(fasta) ]
pattern: "*.{fq,fastq}{,.gz}"
output:
- bam:
- reads:
type: file
description: |
Channel containing BAM files
Structure: [ val(meta), path(bam) ]
pattern: "*.bam"
- bai:
Channel of reads per sample, with runs merged where a sample has more
than one. Paired-end samples carry two files, single-end samples one.
Structure: [ val(meta), [ path(reads) ] ]
pattern: "*.{fq,fastq}{,.gz}"
- reads_concat:
type: file
description: |
Channel containing indexed BAM (BAI) files
Structure: [ val(meta), path(bai) ]
pattern: "*.bai"
- csi:
type: file
description: |
Channel containing CSI files
Structure: [ val(meta), path(csi) ]
pattern: "*.csi"
- versions:
type: file
description: |
File containing software versions
Structure: [ path(versions.yml) ]
pattern: "versions.yml"
Channel of the same reads concatenated into a single file per sample,
with `single_end` forced to `true`, for tools that accept only one FASTQ.
Structure: [ val(meta), [ path(reads) ] ]
pattern: "*.{fq,fastq}{,.gz}"
authors:
- "@nickp60"
maintainers:
Expand Down
59 changes: 22 additions & 37 deletions subworkflows/local/dbprep/meta.yml
Original file line number Diff line number Diff line change
@@ -1,50 +1,35 @@
# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/subworkflows/yaml-schema.json
name: "dbprep"
## TODO nf-core: Add a description of the subworkflow and list keywords
description: Sort SAM/BAM/CRAM file
description: |
Prepare the databases declared in the database sheet. Archives are decompressed
once per file and only for tools the user has enabled, then all entities
belonging to the same database are grouped so that each profiler receives a
single entry per database name and parameter combination.
keywords:
- sort
- bam
- sam
- cram
## TODO nf-core: Add a list of the modules and/or subworkflows used in the subworkflow
- database
- untar
- decompression
- metagenome
components:
- samtools/sort
- samtools/index
## TODO nf-core: List all of the channels used as input with a description and their structure
- untar
input:
- ch_bam:
- databases:
type: file
description: |
The input channel containing the BAM/CRAM/SAM files
Structure: [ val(meta), path(bam) ]
pattern: "*.{bam/cram/sam}"
## TODO nf-core: List all of the channels used as output with a descriptions and their structure
Channel of database entries from the database sheet. `meta.tool` selects
which profiler the database belongs to, `meta.db_entity` names the part
of a multi-file database, and `meta.db_params` carries tool-specific
arguments. Entries ending in `.tar`, `.tar.gz`, `.tar.bz2` or `.tar.xz`
are decompressed, the rest are passed through untouched.
Structure: [ val(meta), path(database) ]
pattern: "*.{tar,tar.gz,tar.bz2,tar.xz}"
output:
- bam:
- dbs:
type: file
description: |
Channel containing BAM files
Structure: [ val(meta), path(bam) ]
pattern: "*.bam"
- bai:
type: file
description: |
Channel containing indexed BAM (BAI) files
Structure: [ val(meta), path(bai) ]
pattern: "*.bai"
- csi:
type: file
description: |
Channel containing CSI files
Structure: [ val(meta), path(csi) ]
pattern: "*.csi"
- versions:
type: file
description: |
File containing software versions
Structure: [ path(versions.yml) ]
pattern: "versions.yml"
Channel of databases grouped by tool, name and parameters. The second
element is a list of maps, each holding the entity name and its path.
Structure: [ val(meta), [ [ db_entity: val(entity), db_path: path(db) ] ] ]
authors:
- "@nickp60"
maintainers:
Expand Down
Loading
Loading