Skip to content

Commit

Permalink
Merge pull request #78 from alessiovignoli/zip
Browse files Browse the repository at this point in the history
Zip
  • Loading branch information
luisas authored Oct 20, 2023
2 parents f17a59f + d9773a3 commit 868d3ef
Show file tree
Hide file tree
Showing 8 changed files with 138 additions and 12 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Initial release of nf-core/multiplesequencealign, created with the [nf-core](htt
[#60](https://github.com/nf-core/multiplesequencealign/issues/60) - Add module Tcoffee3D_align and handle structures input
[#35](https://github.com/nf-core/multiplesequencealign/issues/35) - Add module MUSCLE5_SUPER5
[#59](https://github.com/nf-core/multiplesequencealign/issues/59) - Add support for passing structure template in samplesheet.
[#77](https://github.com/nf-core/multiplesequencealign/issues/77) - Add module zip

### `Fixed`

Expand Down
36 changes: 25 additions & 11 deletions conf/modules.config
Original file line number Diff line number Diff line change
Expand Up @@ -41,21 +41,25 @@ process {
withName: ".*ALIGN"{
ext.prefix = { "${meta.id}_${meta.tree}-args-${meta.argstree_clean}_${meta.aligner}-args-${meta.argsaligner_clean}" }
ext.args = { "${meta.args_aligner}" == "null" ? '' : "${meta.args_aligner}" }
publishDir = [
path: { "${params.outdir}/alignment/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" },
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
]
if ( params.skip_compress ) {
publishDir = [
path: { "${params.outdir}/alignment/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" },
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
]
}
}

withName: "MAFFT|CLUSTALO_ALIGN|TCOFFEE_ALIGN|TCOFFEE3D_ALIGN|MUSCLE5_SUPER5"{
ext.prefix = { "${meta.id}_${meta.tree}-args-${meta.argstree_clean}_${meta.aligner}-args-${meta.argsaligner_clean}" }
ext.args = { "${meta.args_aligner}" == "null" ? '' : "${meta.args_aligner}" }
publishDir = [
path: { "${params.outdir}/alignment/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" },
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
]
if ( params.skip_compress ) {
publishDir = [
path: { "${params.outdir}/alignment/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" },
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
]
}
}

withName: ".*EVAL"{
Expand All @@ -73,6 +77,7 @@ process {
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
]
}

withName: "TCOFFEE_SEQREFORMAT_SIM|CALCULATE_SEQSTATS"{
publishDir = [
path: { "${params.outdir}/stats/${task.process.tokenize(':')[-1].toLowerCase()}" },
Expand All @@ -88,9 +93,11 @@ process {
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
]
}

withName: "FASTQC"{
ext.args = '--quiet'
}

withName: "CUSTOM_DUMPSOFTWAREVERSIONS"{
publishDir = [
path: { "${params.outdir}/pipeline_info" },
Expand All @@ -108,6 +115,13 @@ process {
]
}


withName: 'ZIP' {
ext.prefix = { "${meta.id}_${meta.tree}-args-${meta.argstree_clean}_${meta.aligner}-args-${meta.argsaligner_clean}" }
publishDir = [
path: { "${params.outdir}/alignment/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" },
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
]
}

}
5 changes: 5 additions & 0 deletions modules.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,11 @@
"branch": "master",
"git_sha": "d0b4fc03af52a1cc8c6fb4493b921b57352b1dd8",
"installed_by": ["modules"]
},
"zip": {
"branch": "master",
"git_sha": "9ba4f5972ae27474f752ddb20e855f48047aa6c8",
"installed_by": ["modules"]
}
}
}
Expand Down
36 changes: 36 additions & 0 deletions modules/nf-core/zip/main.nf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

43 changes: 43 additions & 0 deletions modules/nf-core/zip/meta.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ params {

// Stats
skip_stats = false
skip_eval = false
skip_eval = false
skip_compress = false

// MultiQC options
multiqc_config = null
Expand Down
15 changes: 15 additions & 0 deletions nextflow_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,18 @@
}
}
},
"compression": {
"title": "Compression",
"type": "object",
"description": "Define wether to run compression",
"default": "",
"properties": {
"skip_compress": {
"type": "boolean",
"description": "Skip the compression of all alignment files"
}
}
},
"institutional_config_options": {
"title": "Institutional config options",
"type": "object",
Expand Down Expand Up @@ -285,6 +297,9 @@
{
"$ref": "#/definitions/eval_options"
},
{
"$ref": "#/definitions/compression"
},
{
"$ref": "#/definitions/institutional_config_options"
},
Expand Down
11 changes: 11 additions & 0 deletions workflows/multiplesequencealign.nf
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,12 @@ include { CREATE_TCOFFEETEMPLATE } from '../modules/local/create_tcoffee_te
//
// MODULE: Installed directly from nf-core/modules
//

include { FASTQC } from '../modules/nf-core/fastqc/main'
include { MULTIQC } from '../modules/nf-core/multiqc/main'
include { CUSTOM_DUMPSOFTWAREVERSIONS } from '../modules/nf-core/custom/dumpsoftwareversions/main'
include { UNTAR } from '../modules/nf-core/untar/main'
include { ZIP } from '../modules/nf-core/zip/main'

/*
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down Expand Up @@ -153,6 +155,7 @@ workflow MULTIPLESEQUENCEALIGN {
ALIGN(ch_seqs, ch_tools, ch_structures_template )
ch_versions = ch_versions.mix(ALIGN.out.versions)


//
// Evaluate the quality of the alignment
//
Expand All @@ -166,6 +169,14 @@ workflow MULTIPLESEQUENCEALIGN {
ch_versions.unique().collectFile(name: 'collated_versions.yml')
)

//
// MODULE: zip
//
if( !params.skip_compress ){
ZIP(ALIGN.out.msa)
ch_versions = ch_versions.mix(ZIP.out.versions)
}

//
// MODULE: MultiQC
//
Expand Down

0 comments on commit 868d3ef

Please sign in to comment.