-
Notifications
You must be signed in to change notification settings - Fork 719
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add modules - test and linting to be fied when guidetree gets merged to main * Fix tests * Remove trailing whitespace * Update modules/nf-core/clustalo/align/main.nf Co-authored-by: Sateesh_Peri <33637490+sateeshperi@users.noreply.github.com> * Update modules/nf-core/clustalo/align/meta.yml Co-authored-by: Sateesh_Peri <33637490+sateeshperi@users.noreply.github.com> * Add options tree directly in args --------- Co-authored-by: Sateesh_Peri <33637490+sateeshperi@users.noreply.github.com>
- Loading branch information
1 parent
43ef680
commit 5c73153
Showing
6 changed files
with
165 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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,48 @@ | ||
process CLUSTALO_ALIGN { | ||
tag "$meta.id" | ||
label 'process_medium' | ||
|
||
conda "bioconda::clustalo=1.2.4" | ||
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? | ||
'https://depot.galaxyproject.org/singularity/clustalo:1.2.4--h87f3376_5': | ||
'biocontainers/clustalo:1.2.4--h87f3376_5' }" | ||
|
||
input: | ||
tuple val(meta), path(fasta) | ||
tuple val(meta2), path(tree) | ||
|
||
output: | ||
tuple val(meta), path("*.aln"), emit: alignment | ||
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}" | ||
""" | ||
clustalo \\ | ||
-i ${fasta} \\ | ||
--threads=${task.cpus} \\ | ||
$args \\ | ||
-o ${prefix}.aln | ||
cat <<-END_VERSIONS > versions.yml | ||
"${task.process}": | ||
clustalo: \$( clustalo --version ) | ||
END_VERSIONS | ||
""" | ||
|
||
stub: | ||
def args = task.ext.args ?: '' | ||
def prefix = task.ext.prefix ?: "${meta.id}" | ||
""" | ||
touch ${prefix}.aln | ||
cat <<-END_VERSIONS > versions.yml | ||
"${task.process}": | ||
clustalo: \$( clustalo --version ) | ||
END_VERSIONS | ||
""" | ||
} |
This file contains 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,57 @@ | ||
name: "clustalo_align" | ||
description: Align sequences using Clustal Omega | ||
keywords: | ||
- alignment | ||
- MSA | ||
- genomics | ||
tools: | ||
- "clustalo": | ||
description: "Latest version of Clustal: a multiple sequence alignment program for DNA or proteins" | ||
homepage: "http://www.clustal.org/omega/" | ||
documentation: "http://www.clustal.org/omega/" | ||
tool_dev_url: "http://www.clustal.org/omega/" | ||
doi: "10.1038/msb.2011.75" | ||
licence: "['GPL v2']" | ||
|
||
input: | ||
- meta: | ||
type: map | ||
description: | | ||
Groovy Map containing sample information | ||
e.g. `[ id:'test']` | ||
- fasta: | ||
type: file | ||
description: Input sequences in FASTA format | ||
pattern: "*.{fa,fasta}" | ||
|
||
- meta2: | ||
type: map | ||
description: | | ||
Groovy Map containing tree information | ||
e.g. `[ id:'test_tree']` | ||
- tree: | ||
type: file | ||
description: Input guide tree in Newick format | ||
pattern: "*.{dnd}" | ||
|
||
output: | ||
- meta: | ||
type: map | ||
description: | | ||
Groovy Map containing sample information | ||
e.g. `[ id:'test']` | ||
- alignment: | ||
type: file | ||
description: Alignment file. | ||
pattern: "*.{aln}" | ||
|
||
- versions: | ||
type: file | ||
description: File containing software versions | ||
pattern: "versions.yml" | ||
|
||
authors: | ||
- "@luisas" |
This file contains 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
This file contains 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,30 @@ | ||
#!/usr/bin/env nextflow | ||
|
||
nextflow.enable.dsl = 2 | ||
|
||
include { CLUSTALO_GUIDETREE } from '../../../../../modules/nf-core/clustalo/guidetree/main.nf' | ||
include { CLUSTALO_ALIGN } from '../../../../../modules/nf-core/clustalo/align/main.nf' | ||
|
||
workflow test_clustalo_align { | ||
|
||
input = [ | ||
[ id:'test' ], // meta map | ||
file(params.test_data['sarscov2']['illumina']['contigs_fasta'], checkIfExists: true) | ||
] | ||
|
||
CLUSTALO_ALIGN ( input, [[:],[]] ) | ||
} | ||
|
||
|
||
workflow test_clustalo_align_with_tree { | ||
|
||
input = [ | ||
[ id:'test' ], // meta map | ||
file(params.test_data['sarscov2']['illumina']['contigs_fasta'], checkIfExists: true) | ||
] | ||
|
||
ch_tree = CLUSTALO_GUIDETREE ( input ).tree | ||
|
||
CLUSTALO_ALIGN ( input , ch_tree ) | ||
|
||
} |
This file contains 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,5 @@ | ||
process { | ||
ext.args = { tree ? "--guidetree-in=$tree" : "" } | ||
publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } | ||
|
||
} |
This file contains 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,21 @@ | ||
- name: clustalo align test_clustalo_align | ||
command: nextflow run ./tests/modules/nf-core/clustalo/align -entry test_clustalo_align -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/clustalo/align/nextflow.config | ||
tags: | ||
- clustalo/align | ||
- clustalo | ||
files: | ||
- path: output/clustalo/test.aln | ||
md5sum: 74bb9a2820a91cf68db94dbd46787722 | ||
- path: output/clustalo/versions.yml | ||
|
||
- name: clustalo align test_clustalo_align_with_tree | ||
command: nextflow run ./tests/modules/nf-core/clustalo/align -entry test_clustalo_align_with_tree -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/clustalo/align/nextflow.config | ||
tags: | ||
- clustalo/align | ||
- clustalo | ||
files: | ||
- path: output/clustalo/test.aln | ||
md5sum: 74bb9a2820a91cf68db94dbd46787722 | ||
- path: output/clustalo/test.dnd | ||
md5sum: 5428bad500a0a0bd985744bec1a12a70 | ||
- path: output/clustalo/versions.yml |