mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2024-12-22 02:58:17 +00:00
Diamond (#710)
* Added diamond * minor tweaks & yml fix * Fixed spacing issues due to failing lint * Update modules/diamond/blastp/main.nf Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * Update modules/diamond/blastp/main.nf Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * Update modules/diamond/blastp/main.nf Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * Update modules/diamond/blastp/main.nf Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * Update modules/diamond/blastp/main.nf Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * Update modules/diamond/blastx/main.nf Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * Update modules/diamond/blastx/main.nf Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * Update modules/diamond/blastx/main.nf Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * Update modules/diamond/blastx/main.nf Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * Update modules/diamond/makedb/main.nf Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * Update modules/diamond/makedb/main.nf Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * Update tests/modules/diamond/blastp/main.nf Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * Update tests/modules/diamond/blastx/main.nf Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * Update tests/modules/diamond/blastx/main.nf Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * Update tests/modules/diamond/blastp/main.nf Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * Update modules/diamond/blastp/meta.yml Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com>
This commit is contained in:
parent
25943a4c23
commit
ca53f7525b
16 changed files with 538 additions and 0 deletions
68
modules/diamond/blastp/functions.nf
Normal file
68
modules/diamond/blastp/functions.nf
Normal file
|
@ -0,0 +1,68 @@
|
|||
//
|
||||
// Utility functions used in nf-core DSL2 module files
|
||||
//
|
||||
|
||||
//
|
||||
// Extract name of software tool from process name using $task.process
|
||||
//
|
||||
def getSoftwareName(task_process) {
|
||||
return task_process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()
|
||||
}
|
||||
|
||||
//
|
||||
// Function to initialise default values and to generate a Groovy Map of available options for nf-core modules
|
||||
//
|
||||
def initOptions(Map args) {
|
||||
def Map options = [:]
|
||||
options.args = args.args ?: ''
|
||||
options.args2 = args.args2 ?: ''
|
||||
options.args3 = args.args3 ?: ''
|
||||
options.publish_by_meta = args.publish_by_meta ?: []
|
||||
options.publish_dir = args.publish_dir ?: ''
|
||||
options.publish_files = args.publish_files
|
||||
options.suffix = args.suffix ?: ''
|
||||
return options
|
||||
}
|
||||
|
||||
//
|
||||
// Tidy up and join elements of a list to return a path string
|
||||
//
|
||||
def getPathFromList(path_list) {
|
||||
def paths = path_list.findAll { item -> !item?.trim().isEmpty() } // Remove empty entries
|
||||
paths = paths.collect { it.trim().replaceAll("^[/]+|[/]+\$", "") } // Trim whitespace and trailing slashes
|
||||
return paths.join('/')
|
||||
}
|
||||
|
||||
//
|
||||
// Function to save/publish module results
|
||||
//
|
||||
def saveFiles(Map args) {
|
||||
if (!args.filename.endsWith('.version.txt')) {
|
||||
def ioptions = initOptions(args.options)
|
||||
def path_list = [ ioptions.publish_dir ?: args.publish_dir ]
|
||||
if (ioptions.publish_by_meta) {
|
||||
def key_list = ioptions.publish_by_meta instanceof List ? ioptions.publish_by_meta : args.publish_by_meta
|
||||
for (key in key_list) {
|
||||
if (args.meta && key instanceof String) {
|
||||
def path = key
|
||||
if (args.meta.containsKey(key)) {
|
||||
path = args.meta[key] instanceof Boolean ? "${key}_${args.meta[key]}".toString() : args.meta[key]
|
||||
}
|
||||
path = path instanceof String ? path : ''
|
||||
path_list.add(path)
|
||||
}
|
||||
}
|
||||
}
|
||||
if (ioptions.publish_files instanceof Map) {
|
||||
for (ext in ioptions.publish_files) {
|
||||
if (args.filename.endsWith(ext.key)) {
|
||||
def ext_list = path_list.collect()
|
||||
ext_list.add(ext.value)
|
||||
return "${getPathFromList(ext_list)}/$args.filename"
|
||||
}
|
||||
}
|
||||
} else if (ioptions.publish_files == null) {
|
||||
return "${getPathFromList(path_list)}/$args.filename"
|
||||
}
|
||||
}
|
||||
}
|
47
modules/diamond/blastp/main.nf
Normal file
47
modules/diamond/blastp/main.nf
Normal file
|
@ -0,0 +1,47 @@
|
|||
// Import generic module functions
|
||||
include { initOptions; saveFiles; getSoftwareName } from './functions'
|
||||
|
||||
params.options = [:]
|
||||
options = initOptions(params.options)
|
||||
|
||||
process DIAMOND_BLASTP {
|
||||
tag "$meta.id"
|
||||
label 'process_medium'
|
||||
publishDir "${params.outdir}",
|
||||
mode: params.publish_dir_mode,
|
||||
saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), meta:meta, publish_by_meta:['id']) }
|
||||
|
||||
// Dimaond is limited to v2.0.9 because there is not a
|
||||
// singularity version higher than this at the current time.
|
||||
conda (params.enable_conda ? "bioconda::diamond=2.0.9" : null)
|
||||
if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) {
|
||||
container 'https://depot.galaxyproject.org/singularity/diamond:2.0.9--hdcc8f71_0'
|
||||
} else {
|
||||
container "quay.io/biocontainers/diamond:2.0.9--hdcc8f71_0"
|
||||
}
|
||||
|
||||
input:
|
||||
tuple val(meta), path(fasta)
|
||||
path db
|
||||
|
||||
output:
|
||||
tuple val(meta), path('*.txt'), emit: txt
|
||||
path '*.version.txt' , emit: version
|
||||
|
||||
script:
|
||||
def software = getSoftwareName(task.process)
|
||||
def prefix = options.suffix ? "${meta.id}${options.suffix}" : "${meta.id}"
|
||||
"""
|
||||
DB=`find -L ./ -name "*.dmnd" | sed 's/.dmnd//'`
|
||||
|
||||
diamond \\
|
||||
blastp \\
|
||||
--threads $task.cpus \\
|
||||
--db \$DB \\
|
||||
--query $fasta \\
|
||||
$options.args \\
|
||||
--out ${prefix}.txt
|
||||
|
||||
echo \$(diamond --version 2>&1) | tail -n 1 | sed 's/^diamond version //' > ${software}.version.txt
|
||||
"""
|
||||
}
|
43
modules/diamond/blastp/meta.yml
Normal file
43
modules/diamond/blastp/meta.yml
Normal file
|
@ -0,0 +1,43 @@
|
|||
name: diamond_blastp
|
||||
description: Queries a DIAMOND database using blastp mode
|
||||
keywords:
|
||||
- fasta
|
||||
- diamond
|
||||
- blastp
|
||||
- DNA sequence
|
||||
tools:
|
||||
- diamond:
|
||||
description: Accelerated BLAST compatible local sequence aligner
|
||||
homepage: https://github.com/bbuchfink/diamond
|
||||
documentation: https://github.com/bbuchfink/diamond/wiki
|
||||
tool_dev_url: https://github.com/bbuchfink/diamond
|
||||
doi: "doi:10.1038/s41592-021-01101-x"
|
||||
licence: ['GPL v3.0']
|
||||
|
||||
input:
|
||||
- meta:
|
||||
type: map
|
||||
description: |
|
||||
Groovy Map containing sample information
|
||||
e.g. [ id:'test', single_end:false ]
|
||||
- fasta:
|
||||
type: file
|
||||
description: Input fasta file containing query sequences
|
||||
pattern: "*.{fa,fasta}"
|
||||
- db:
|
||||
type: directory
|
||||
description: Directory containing the protein blast database
|
||||
pattern: "*"
|
||||
|
||||
output:
|
||||
- txt:
|
||||
type: file
|
||||
description: File containing blastp hits
|
||||
pattern: "*.{blastp.txt}"
|
||||
- version:
|
||||
type: file
|
||||
description: File containing software version
|
||||
pattern: "*.{version.txt}"
|
||||
|
||||
authors:
|
||||
- "@spficklin"
|
68
modules/diamond/blastx/functions.nf
Normal file
68
modules/diamond/blastx/functions.nf
Normal file
|
@ -0,0 +1,68 @@
|
|||
//
|
||||
// Utility functions used in nf-core DSL2 module files
|
||||
//
|
||||
|
||||
//
|
||||
// Extract name of software tool from process name using $task.process
|
||||
//
|
||||
def getSoftwareName(task_process) {
|
||||
return task_process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()
|
||||
}
|
||||
|
||||
//
|
||||
// Function to initialise default values and to generate a Groovy Map of available options for nf-core modules
|
||||
//
|
||||
def initOptions(Map args) {
|
||||
def Map options = [:]
|
||||
options.args = args.args ?: ''
|
||||
options.args2 = args.args2 ?: ''
|
||||
options.args3 = args.args3 ?: ''
|
||||
options.publish_by_meta = args.publish_by_meta ?: []
|
||||
options.publish_dir = args.publish_dir ?: ''
|
||||
options.publish_files = args.publish_files
|
||||
options.suffix = args.suffix ?: ''
|
||||
return options
|
||||
}
|
||||
|
||||
//
|
||||
// Tidy up and join elements of a list to return a path string
|
||||
//
|
||||
def getPathFromList(path_list) {
|
||||
def paths = path_list.findAll { item -> !item?.trim().isEmpty() } // Remove empty entries
|
||||
paths = paths.collect { it.trim().replaceAll("^[/]+|[/]+\$", "") } // Trim whitespace and trailing slashes
|
||||
return paths.join('/')
|
||||
}
|
||||
|
||||
//
|
||||
// Function to save/publish module results
|
||||
//
|
||||
def saveFiles(Map args) {
|
||||
if (!args.filename.endsWith('.version.txt')) {
|
||||
def ioptions = initOptions(args.options)
|
||||
def path_list = [ ioptions.publish_dir ?: args.publish_dir ]
|
||||
if (ioptions.publish_by_meta) {
|
||||
def key_list = ioptions.publish_by_meta instanceof List ? ioptions.publish_by_meta : args.publish_by_meta
|
||||
for (key in key_list) {
|
||||
if (args.meta && key instanceof String) {
|
||||
def path = key
|
||||
if (args.meta.containsKey(key)) {
|
||||
path = args.meta[key] instanceof Boolean ? "${key}_${args.meta[key]}".toString() : args.meta[key]
|
||||
}
|
||||
path = path instanceof String ? path : ''
|
||||
path_list.add(path)
|
||||
}
|
||||
}
|
||||
}
|
||||
if (ioptions.publish_files instanceof Map) {
|
||||
for (ext in ioptions.publish_files) {
|
||||
if (args.filename.endsWith(ext.key)) {
|
||||
def ext_list = path_list.collect()
|
||||
ext_list.add(ext.value)
|
||||
return "${getPathFromList(ext_list)}/$args.filename"
|
||||
}
|
||||
}
|
||||
} else if (ioptions.publish_files == null) {
|
||||
return "${getPathFromList(path_list)}/$args.filename"
|
||||
}
|
||||
}
|
||||
}
|
47
modules/diamond/blastx/main.nf
Normal file
47
modules/diamond/blastx/main.nf
Normal file
|
@ -0,0 +1,47 @@
|
|||
// Import generic module functions
|
||||
include { initOptions; saveFiles; getSoftwareName } from './functions'
|
||||
|
||||
params.options = [:]
|
||||
options = initOptions(params.options)
|
||||
|
||||
process DIAMOND_BLASTX {
|
||||
tag "$meta.id"
|
||||
label 'process_medium'
|
||||
publishDir "${params.outdir}",
|
||||
mode: params.publish_dir_mode,
|
||||
saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), meta:meta, publish_by_meta:['id']) }
|
||||
|
||||
// Dimaond is limited to v2.0.9 because there is not a
|
||||
// singularity version higher than this at the current time.
|
||||
conda (params.enable_conda ? "bioconda::diamond=2.0.9" : null)
|
||||
if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) {
|
||||
container 'https://depot.galaxyproject.org/singularity/diamond:2.0.9--hdcc8f71_0'
|
||||
} else {
|
||||
container "quay.io/biocontainers/diamond:2.0.9--hdcc8f71_0"
|
||||
}
|
||||
|
||||
input:
|
||||
tuple val(meta), path(fasta)
|
||||
path db
|
||||
|
||||
output:
|
||||
tuple val(meta), path('*.txt'), emit: txt
|
||||
path '*.version.txt' , emit: version
|
||||
|
||||
script:
|
||||
def software = getSoftwareName(task.process)
|
||||
def prefix = options.suffix ? "${meta.id}${options.suffix}" : "${meta.id}"
|
||||
"""
|
||||
DB=`find -L ./ -name "*.dmnd" | sed 's/.dmnd//'`
|
||||
|
||||
diamond \\
|
||||
blastx \\
|
||||
--threads $task.cpus \\
|
||||
--db \$DB \\
|
||||
--query $fasta \\
|
||||
$options.args \\
|
||||
--out ${prefix}.txt
|
||||
|
||||
echo \$(diamond --version 2>&1) | tail -n 1 | sed 's/^diamond version //' > ${software}.version.txt
|
||||
"""
|
||||
}
|
43
modules/diamond/blastx/meta.yml
Normal file
43
modules/diamond/blastx/meta.yml
Normal file
|
@ -0,0 +1,43 @@
|
|||
name: diamond_blastx
|
||||
description: Queries a DIAMOND database using blastx mode
|
||||
keywords:
|
||||
- fasta
|
||||
- diamond
|
||||
- blastx
|
||||
- DNA sequence
|
||||
tools:
|
||||
- diamond:
|
||||
description: Accelerated BLAST compatible local sequence aligner
|
||||
homepage: https://github.com/bbuchfink/diamond
|
||||
documentation: https://github.com/bbuchfink/diamond/wiki
|
||||
tool_dev_url: https://github.com/bbuchfink/diamond
|
||||
doi: "doi:10.1038/s41592-021-01101-x"
|
||||
licence: ['GPL v3.0']
|
||||
|
||||
input:
|
||||
- meta:
|
||||
type: map
|
||||
description: |
|
||||
Groovy Map containing sample information
|
||||
e.g. [ id:'test', single_end:false ]
|
||||
- fasta:
|
||||
type: file
|
||||
description: Input fasta file containing query sequences
|
||||
pattern: "*.{fa,fasta}"
|
||||
- db:
|
||||
type: directory
|
||||
description: Directory containing the nucelotide blast database
|
||||
pattern: "*"
|
||||
|
||||
output:
|
||||
- txt:
|
||||
type: file
|
||||
description: File containing blastx hits
|
||||
pattern: "*.{blastx.txt}"
|
||||
- version:
|
||||
type: file
|
||||
description: File containing software version
|
||||
pattern: "*.{version.txt}"
|
||||
|
||||
authors:
|
||||
- "@spficklin"
|
68
modules/diamond/makedb/functions.nf
Normal file
68
modules/diamond/makedb/functions.nf
Normal file
|
@ -0,0 +1,68 @@
|
|||
//
|
||||
// Utility functions used in nf-core DSL2 module files
|
||||
//
|
||||
|
||||
//
|
||||
// Extract name of software tool from process name using $task.process
|
||||
//
|
||||
def getSoftwareName(task_process) {
|
||||
return task_process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()
|
||||
}
|
||||
|
||||
//
|
||||
// Function to initialise default values and to generate a Groovy Map of available options for nf-core modules
|
||||
//
|
||||
def initOptions(Map args) {
|
||||
def Map options = [:]
|
||||
options.args = args.args ?: ''
|
||||
options.args2 = args.args2 ?: ''
|
||||
options.args3 = args.args3 ?: ''
|
||||
options.publish_by_meta = args.publish_by_meta ?: []
|
||||
options.publish_dir = args.publish_dir ?: ''
|
||||
options.publish_files = args.publish_files
|
||||
options.suffix = args.suffix ?: ''
|
||||
return options
|
||||
}
|
||||
|
||||
//
|
||||
// Tidy up and join elements of a list to return a path string
|
||||
//
|
||||
def getPathFromList(path_list) {
|
||||
def paths = path_list.findAll { item -> !item?.trim().isEmpty() } // Remove empty entries
|
||||
paths = paths.collect { it.trim().replaceAll("^[/]+|[/]+\$", "") } // Trim whitespace and trailing slashes
|
||||
return paths.join('/')
|
||||
}
|
||||
|
||||
//
|
||||
// Function to save/publish module results
|
||||
//
|
||||
def saveFiles(Map args) {
|
||||
if (!args.filename.endsWith('.version.txt')) {
|
||||
def ioptions = initOptions(args.options)
|
||||
def path_list = [ ioptions.publish_dir ?: args.publish_dir ]
|
||||
if (ioptions.publish_by_meta) {
|
||||
def key_list = ioptions.publish_by_meta instanceof List ? ioptions.publish_by_meta : args.publish_by_meta
|
||||
for (key in key_list) {
|
||||
if (args.meta && key instanceof String) {
|
||||
def path = key
|
||||
if (args.meta.containsKey(key)) {
|
||||
path = args.meta[key] instanceof Boolean ? "${key}_${args.meta[key]}".toString() : args.meta[key]
|
||||
}
|
||||
path = path instanceof String ? path : ''
|
||||
path_list.add(path)
|
||||
}
|
||||
}
|
||||
}
|
||||
if (ioptions.publish_files instanceof Map) {
|
||||
for (ext in ioptions.publish_files) {
|
||||
if (args.filename.endsWith(ext.key)) {
|
||||
def ext_list = path_list.collect()
|
||||
ext_list.add(ext.value)
|
||||
return "${getPathFromList(ext_list)}/$args.filename"
|
||||
}
|
||||
}
|
||||
} else if (ioptions.publish_files == null) {
|
||||
return "${getPathFromList(path_list)}/$args.filename"
|
||||
}
|
||||
}
|
||||
}
|
42
modules/diamond/makedb/main.nf
Normal file
42
modules/diamond/makedb/main.nf
Normal file
|
@ -0,0 +1,42 @@
|
|||
// Import generic module functions
|
||||
include { initOptions; saveFiles; getSoftwareName } from './functions'
|
||||
|
||||
params.options = [:]
|
||||
options = initOptions(params.options)
|
||||
|
||||
process DIAMOND_MAKEDB {
|
||||
tag "$fasta"
|
||||
label 'process_medium'
|
||||
publishDir "${params.outdir}",
|
||||
mode: params.publish_dir_mode,
|
||||
saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), meta:[:], publish_by_meta:[]) }
|
||||
|
||||
// Dimaond is limited to v2.0.9 because there is not a
|
||||
// singularity version higher than this at the current time.
|
||||
conda (params.enable_conda ? 'bioconda::diamond=2.0.9' : null)
|
||||
if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) {
|
||||
container 'https://depot.galaxyproject.org/singularity/diamond:2.0.9--hdcc8f71_0'
|
||||
} else {
|
||||
container 'quay.io/biocontainers/diamond:2.0.9--hdcc8f71_0'
|
||||
}
|
||||
|
||||
input:
|
||||
path fasta
|
||||
|
||||
output:
|
||||
path "${fasta}.dmnd", emit: db
|
||||
path '*.version.txt', emit: version
|
||||
|
||||
script:
|
||||
def software = getSoftwareName(task.process)
|
||||
"""
|
||||
diamond \\
|
||||
makedb \\
|
||||
--threads $task.cpus \\
|
||||
--in $fasta \\
|
||||
-d $fasta \\
|
||||
$options.args
|
||||
|
||||
echo \$(diamond --version 2>&1) | tail -n 1 | sed 's/^diamond version //' > ${software}.version.txt
|
||||
"""
|
||||
}
|
34
modules/diamond/makedb/meta.yml
Normal file
34
modules/diamond/makedb/meta.yml
Normal file
|
@ -0,0 +1,34 @@
|
|||
name: diamond_makedb
|
||||
description: Builds a DIAMOND database
|
||||
keywords:
|
||||
- fasta
|
||||
- diamond
|
||||
- index
|
||||
- database
|
||||
tools:
|
||||
- diamond:
|
||||
description: Accelerated BLAST compatible local sequence aligner
|
||||
homepage: https://github.com/bbuchfink/diamond
|
||||
documentation: https://github.com/bbuchfink/diamond/wiki
|
||||
tool_dev_url: https://github.com/bbuchfink/diamond
|
||||
doi: "doi:10.1038/s41592-021-01101-x"
|
||||
licence: ['GPL v3.0']
|
||||
|
||||
input:
|
||||
- fasta:
|
||||
type: file
|
||||
description: Input fasta file
|
||||
pattern: "*.{fa,fasta}"
|
||||
|
||||
output:
|
||||
- db:
|
||||
type: file
|
||||
description: File of the indexed DIAMOND database
|
||||
pattern: "*.{dmnd}"
|
||||
- version:
|
||||
type: file
|
||||
description: File containing software version
|
||||
pattern: "*.{version.txt}"
|
||||
|
||||
authors:
|
||||
- "@spficklin"
|
|
@ -286,6 +286,18 @@ delly/call:
|
|||
- modules/delly/call/**
|
||||
- tests/modules/delly/call/**
|
||||
|
||||
diamond/blastx:
|
||||
- modules/diamond/blastx/**
|
||||
- tests/modules/diamond/blastx/**
|
||||
|
||||
diamond/blastp:
|
||||
- modules/diamond/blastp/**
|
||||
- tests/modules/diamond/blastp/**
|
||||
|
||||
diamond/makedb:
|
||||
- modules/diamond/makedb/**
|
||||
- tests/modules/diamond/makedb/**
|
||||
|
||||
dragonflye:
|
||||
- modules/dragonflye/**
|
||||
- tests/modules/dragonflye/**
|
||||
|
|
15
tests/modules/diamond/blastp/main.nf
Normal file
15
tests/modules/diamond/blastp/main.nf
Normal file
|
@ -0,0 +1,15 @@
|
|||
#!/usr/bin/env nextflow
|
||||
|
||||
nextflow.enable.dsl = 2
|
||||
|
||||
include { DIAMOND_MAKEDB } from '../../../../modules/diamond/makedb/main.nf' addParams( options: [:] )
|
||||
include { DIAMOND_BLASTP } from '../../../../modules/diamond/blastp/main.nf' addParams( options: [ suffix: '.diamond_blastp' ] )
|
||||
|
||||
workflow test_diamond_blastp {
|
||||
|
||||
db = [ file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) ]
|
||||
fasta = [ file(params.test_data['sarscov2']['genome']['transcriptome_fasta'], checkIfExists: true) ]
|
||||
|
||||
DIAMOND_MAKEDB ( db )
|
||||
DIAMOND_BLASTP ( [ [id:'test'], fasta ], DIAMOND_MAKEDB.out.db )
|
||||
}
|
8
tests/modules/diamond/blastp/test.yml
Normal file
8
tests/modules/diamond/blastp/test.yml
Normal file
|
@ -0,0 +1,8 @@
|
|||
- name: diamond blastp
|
||||
command: nextflow run ./tests/modules/diamond/blastp -entry test_diamond_blastp -c tests/config/nextflow.config
|
||||
tags:
|
||||
- diamond
|
||||
- diamond/blastp
|
||||
files:
|
||||
- path: ./output/diamond/test.diamond_blastp.txt
|
||||
md5sum: 3ca7f6290c1d8741c573370e6f8b4db0
|
15
tests/modules/diamond/blastx/main.nf
Normal file
15
tests/modules/diamond/blastx/main.nf
Normal file
|
@ -0,0 +1,15 @@
|
|||
#!/usr/bin/env nextflow
|
||||
|
||||
nextflow.enable.dsl = 2
|
||||
|
||||
include { DIAMOND_MAKEDB } from '../../../../modules/diamond/makedb/main.nf' addParams( options: [:] )
|
||||
include { DIAMOND_BLASTX } from '../../../../modules/diamond/blastx/main.nf' addParams( options: [ suffix: '.diamond_blastx' ] )
|
||||
|
||||
workflow test_diamond_blastx {
|
||||
|
||||
db = [ file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) ]
|
||||
fasta = [ file(params.test_data['sarscov2']['genome']['transcriptome_fasta'], checkIfExists: true) ]
|
||||
|
||||
DIAMOND_MAKEDB ( db )
|
||||
DIAMOND_BLASTX ( [ [id:'test'], fasta ], DIAMOND_MAKEDB.out.db )
|
||||
}
|
8
tests/modules/diamond/blastx/test.yml
Normal file
8
tests/modules/diamond/blastx/test.yml
Normal file
|
@ -0,0 +1,8 @@
|
|||
- name: diamond blastx
|
||||
command: nextflow run ./tests/modules/diamond/blastx -entry test_diamond_blastx -c tests/config/nextflow.config
|
||||
tags:
|
||||
- diamond
|
||||
- diamond/blastx
|
||||
files:
|
||||
- path: ./output/diamond/test.diamond_blastx.txt
|
||||
md5sum: d41d8cd98f00b204e9800998ecf8427e
|
12
tests/modules/diamond/makedb/main.nf
Normal file
12
tests/modules/diamond/makedb/main.nf
Normal file
|
@ -0,0 +1,12 @@
|
|||
#!/usr/bin/env nextflow
|
||||
|
||||
nextflow.enable.dsl = 2
|
||||
|
||||
include { DIAMOND_MAKEDB } from '../../../../modules/diamond/makedb/main.nf' addParams( options: [:] )
|
||||
|
||||
workflow test_diamond_makedb {
|
||||
|
||||
input = [ file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) ]
|
||||
|
||||
DIAMOND_MAKEDB ( input )
|
||||
}
|
8
tests/modules/diamond/makedb/test.yml
Normal file
8
tests/modules/diamond/makedb/test.yml
Normal file
|
@ -0,0 +1,8 @@
|
|||
- name: diamond makedb test_diamond_makedb
|
||||
command: nextflow run ./tests/modules/diamond/makedb -entry test_diamond_makedb -c tests/config/nextflow.config
|
||||
tags:
|
||||
- diamond
|
||||
- diamond/makedb
|
||||
files:
|
||||
- path: output/diamond/genome.fasta.dmnd
|
||||
md5sum: 2447fb376394c20d43ea3aad2aa5d15d
|
Loading…
Reference in a new issue