mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2024-11-10 20:23:10 +00:00
Merge branch 'master' into ivar-consensus
This commit is contained in:
commit
24b212318b
36 changed files with 484 additions and 100 deletions
8
.github/filters.yml
vendored
8
.github/filters.yml
vendored
|
@ -34,6 +34,10 @@ bedtools_genomecov:
|
||||||
- software/bedtools/genomecov/**
|
- software/bedtools/genomecov/**
|
||||||
- tests/software/bedtools/genomecov/**
|
- tests/software/bedtools/genomecov/**
|
||||||
|
|
||||||
|
bedtools_getfasta:
|
||||||
|
- software/bedtools/getfasta/**
|
||||||
|
- tests/software/bedtools/getfasta/**
|
||||||
|
|
||||||
bedtools_intersect:
|
bedtools_intersect:
|
||||||
- software/bedtools/intersect/**
|
- software/bedtools/intersect/**
|
||||||
- tests/software/bedtools/intersect/**
|
- tests/software/bedtools/intersect/**
|
||||||
|
@ -88,6 +92,10 @@ bwa_mem:
|
||||||
- software/bwa/mem/**
|
- software/bwa/mem/**
|
||||||
- tests/software/bwa/mem/**
|
- tests/software/bwa/mem/**
|
||||||
|
|
||||||
|
cat_fastq:
|
||||||
|
- software/cat/fastq/**
|
||||||
|
- tests/software/cat/fastq/**
|
||||||
|
|
||||||
cutadapt:
|
cutadapt:
|
||||||
- software/cutadapt/**
|
- software/cutadapt/**
|
||||||
- tests/software/cutadapt/**
|
- tests/software/cutadapt/**
|
||||||
|
|
|
@ -11,7 +11,7 @@ process BANDAGE_IMAGE {
|
||||||
mode: params.publish_dir_mode,
|
mode: params.publish_dir_mode,
|
||||||
saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), publish_id:meta.id) }
|
saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), publish_id:meta.id) }
|
||||||
|
|
||||||
conda (params.enable_conda ? 'bioconda::bandage=0.8.1' : null)
|
conda (params.enable_conda ? 'bioconda::bandage=0.8.1=hc9558a2_2' : null)
|
||||||
if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) {
|
if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) {
|
||||||
container "https://depot.galaxyproject.org/singularity/bandage:0.8.1--hc9558a2_2"
|
container "https://depot.galaxyproject.org/singularity/bandage:0.8.1--hc9558a2_2"
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -10,7 +10,7 @@ process BCFTOOLS_BGZIP {
|
||||||
mode: params.publish_dir_mode,
|
mode: params.publish_dir_mode,
|
||||||
saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), publish_id:meta.id) }
|
saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), publish_id:meta.id) }
|
||||||
|
|
||||||
conda (params.enable_conda ? "bioconda::bcftools=1.11" : null)
|
conda (params.enable_conda ? "bioconda::bcftools=1.11=h7c999a4_0" : null)
|
||||||
if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) {
|
if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) {
|
||||||
container "https://depot.galaxyproject.org/singularity/bcftools:1.11--h7c999a4_0"
|
container "https://depot.galaxyproject.org/singularity/bcftools:1.11--h7c999a4_0"
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -10,7 +10,7 @@ process BCFTOOLS_CONSENSUS {
|
||||||
mode: params.publish_dir_mode,
|
mode: params.publish_dir_mode,
|
||||||
saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), publish_id:meta.id) }
|
saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), publish_id:meta.id) }
|
||||||
|
|
||||||
conda (params.enable_conda ? "bioconda::bcftools=1.11" : null)
|
conda (params.enable_conda ? "bioconda::bcftools=1.11=h7c999a4_0" : null)
|
||||||
if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) {
|
if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) {
|
||||||
container "https://depot.galaxyproject.org/singularity/bcftools:1.11--h7c999a4_0"
|
container "https://depot.galaxyproject.org/singularity/bcftools:1.11--h7c999a4_0"
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -10,7 +10,7 @@ process BCFTOOLS_FILTER {
|
||||||
mode: params.publish_dir_mode,
|
mode: params.publish_dir_mode,
|
||||||
saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), publish_id:meta.id) }
|
saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), publish_id:meta.id) }
|
||||||
|
|
||||||
conda (params.enable_conda ? "bioconda::bcftools=1.11" : null)
|
conda (params.enable_conda ? "bioconda::bcftools=1.11=h7c999a4_0" : null)
|
||||||
if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) {
|
if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) {
|
||||||
container "https://depot.galaxyproject.org/singularity/bcftools:1.11--h7c999a4_0"
|
container "https://depot.galaxyproject.org/singularity/bcftools:1.11--h7c999a4_0"
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -10,7 +10,7 @@ process BCFTOOLS_ISEC {
|
||||||
mode: params.publish_dir_mode,
|
mode: params.publish_dir_mode,
|
||||||
saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), publish_id:meta.id) }
|
saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), publish_id:meta.id) }
|
||||||
|
|
||||||
conda (params.enable_conda ? "bioconda::bcftools=1.11" : null)
|
conda (params.enable_conda ? "bioconda::bcftools=1.11=h7c999a4_0" : null)
|
||||||
if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) {
|
if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) {
|
||||||
container "https://depot.galaxyproject.org/singularity/bcftools:1.11--h7c999a4_0"
|
container "https://depot.galaxyproject.org/singularity/bcftools:1.11--h7c999a4_0"
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -10,7 +10,7 @@ process BCFTOOLS_STATS {
|
||||||
mode: params.publish_dir_mode,
|
mode: params.publish_dir_mode,
|
||||||
saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), publish_id:meta.id) }
|
saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), publish_id:meta.id) }
|
||||||
|
|
||||||
conda (params.enable_conda ? "bioconda::bcftools=1.11" : null)
|
conda (params.enable_conda ? "bioconda::bcftools=1.11=h7c999a4_0" : null)
|
||||||
if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) {
|
if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) {
|
||||||
container "https://depot.galaxyproject.org/singularity/bcftools:1.11--h7c999a4_0"
|
container "https://depot.galaxyproject.org/singularity/bcftools:1.11--h7c999a4_0"
|
||||||
} else {
|
} else {
|
||||||
|
@ -21,8 +21,8 @@ process BCFTOOLS_STATS {
|
||||||
tuple val(meta), path(vcf)
|
tuple val(meta), path(vcf)
|
||||||
|
|
||||||
output:
|
output:
|
||||||
tuple val(meta), path("*.txt"), emit: stats
|
tuple val(meta), path("*stats.txt"), emit: stats
|
||||||
path "*.version.txt" , emit: version
|
path "*.version.txt" , emit: version
|
||||||
|
|
||||||
script:
|
script:
|
||||||
def software = getSoftwareName(task.process)
|
def software = getSoftwareName(task.process)
|
||||||
|
|
|
@ -52,7 +52,7 @@ output:
|
||||||
- stats:
|
- stats:
|
||||||
type: file
|
type: file
|
||||||
description: Text output file containing stats
|
description: Text output file containing stats
|
||||||
pattern: "*.{txt}"
|
pattern: "*_{stats.txt}"
|
||||||
- version:
|
- version:
|
||||||
type: file
|
type: file
|
||||||
description: File containing software version
|
description: File containing software version
|
||||||
|
|
|
@ -10,7 +10,7 @@ process BCFTOOLS_TABIX {
|
||||||
mode: params.publish_dir_mode,
|
mode: params.publish_dir_mode,
|
||||||
saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), publish_id:meta.id) }
|
saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), publish_id:meta.id) }
|
||||||
|
|
||||||
conda (params.enable_conda ? "bioconda::bcftools=1.11" : null)
|
conda (params.enable_conda ? "bioconda::bcftools=1.11=h7c999a4_0" : null)
|
||||||
if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) {
|
if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) {
|
||||||
container "https://depot.galaxyproject.org/singularity/bcftools:1.11--h7c999a4_0"
|
container "https://depot.galaxyproject.org/singularity/bcftools:1.11--h7c999a4_0"
|
||||||
} else {
|
} else {
|
||||||
|
|
59
software/bedtools/getfasta/functions.nf
Normal file
59
software/bedtools/getfasta/functions.nf
Normal file
|
@ -0,0 +1,59 @@
|
||||||
|
/*
|
||||||
|
* -----------------------------------------------------
|
||||||
|
* 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.publish_by_id = args.publish_by_id ?: false
|
||||||
|
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_id) {
|
||||||
|
path_list.add(args.publish_id)
|
||||||
|
}
|
||||||
|
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
software/bedtools/getfasta/main.nf
Normal file
42
software/bedtools/getfasta/main.nf
Normal file
|
@ -0,0 +1,42 @@
|
||||||
|
// Import generic module functions
|
||||||
|
include { initOptions; saveFiles; getSoftwareName } from './functions'
|
||||||
|
|
||||||
|
params.options = [:]
|
||||||
|
def options = initOptions(params.options)
|
||||||
|
|
||||||
|
process BEDTOOLS_GETFASTA {
|
||||||
|
tag "$bed"
|
||||||
|
label 'process_medium'
|
||||||
|
publishDir "${params.outdir}",
|
||||||
|
mode: params.publish_dir_mode,
|
||||||
|
saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), publish_id:'') }
|
||||||
|
|
||||||
|
conda (params.enable_conda ? "bioconda::bedtools=2.30.0=hc088bd4_0" : null)
|
||||||
|
if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) {
|
||||||
|
container "https://depot.galaxyproject.org/singularity/bedtools:2.30.0--hc088bd4_0"
|
||||||
|
} else {
|
||||||
|
container "quay.io/biocontainers/bedtools:2.30.0--hc088bd4_0"
|
||||||
|
}
|
||||||
|
|
||||||
|
input:
|
||||||
|
path bed
|
||||||
|
path fasta
|
||||||
|
|
||||||
|
output:
|
||||||
|
path "*.fa" , emit: fasta
|
||||||
|
path "*.version.txt", emit: version
|
||||||
|
|
||||||
|
script:
|
||||||
|
def software = getSoftwareName(task.process)
|
||||||
|
def prefix = options.suffix ? "${bed.baseName}${options.suffix}" : "${bed.baseName}"
|
||||||
|
"""
|
||||||
|
bedtools \\
|
||||||
|
getfasta \\
|
||||||
|
$options.args \\
|
||||||
|
-fi $fasta \\
|
||||||
|
-bed $bed \\
|
||||||
|
-fo ${prefix}.fa
|
||||||
|
|
||||||
|
bedtools --version | sed -e "s/bedtools v//g" > ${software}.version.txt
|
||||||
|
"""
|
||||||
|
}
|
54
software/bedtools/getfasta/meta.yml
Normal file
54
software/bedtools/getfasta/meta.yml
Normal file
|
@ -0,0 +1,54 @@
|
||||||
|
name: bedtools_getfasta
|
||||||
|
description: extract sequences in a FASTA file based on intervals defined in a feature file.
|
||||||
|
keywords:
|
||||||
|
- bed
|
||||||
|
- fasta
|
||||||
|
- getfasta
|
||||||
|
tools:
|
||||||
|
- bedtools:
|
||||||
|
description: |
|
||||||
|
A set of tools for genomic analysis tasks, specifically enabling genome arithmetic (merge, count, complement) on various file types.
|
||||||
|
documentation: https://bedtools.readthedocs.io/en/latest/content/tools/intersect.html
|
||||||
|
params:
|
||||||
|
- outdir:
|
||||||
|
type: string
|
||||||
|
description: |
|
||||||
|
The pipeline's output directory. By default, the module will
|
||||||
|
output files into `$params.outdir/<SOFTWARE>`
|
||||||
|
- publish_dir_mode:
|
||||||
|
type: string
|
||||||
|
description: |
|
||||||
|
Value for the Nextflow `publishDir` mode parameter.
|
||||||
|
Available: symlink, rellink, link, copy, copyNoFollow, move.
|
||||||
|
- enable_conda:
|
||||||
|
type: boolean
|
||||||
|
description: |
|
||||||
|
Run the module with Conda using the software specified
|
||||||
|
via the `conda` directive
|
||||||
|
- singularity_pull_docker_container:
|
||||||
|
type: boolean
|
||||||
|
description: |
|
||||||
|
Instead of directly downloading Singularity images for use with Singularity,
|
||||||
|
force the workflow to pull and convert Docker containers instead.
|
||||||
|
input:
|
||||||
|
- bed:
|
||||||
|
type: file
|
||||||
|
description: Bed feature file
|
||||||
|
pattern: "*.{bed}"
|
||||||
|
- fasta:
|
||||||
|
type: file
|
||||||
|
description: Input fasta file
|
||||||
|
pattern: "*.{fa,fasta}"
|
||||||
|
|
||||||
|
output:
|
||||||
|
- fasta:
|
||||||
|
type: file
|
||||||
|
description: Output fasta file with extracted sequences
|
||||||
|
pattern: "*.{fa}"
|
||||||
|
- version:
|
||||||
|
type: file
|
||||||
|
description: File containing software version
|
||||||
|
pattern: "*.{version.txt}"
|
||||||
|
authors:
|
||||||
|
- "@joseespinosa"
|
||||||
|
- "@drpatelh"
|
|
@ -11,7 +11,7 @@ process BEDTOOLS_MASKFASTA {
|
||||||
mode: params.publish_dir_mode,
|
mode: params.publish_dir_mode,
|
||||||
saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), publish_id:meta.id) }
|
saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), publish_id:meta.id) }
|
||||||
|
|
||||||
conda (params.enable_conda ? "bioconda::bedtools=2.30.0" : null)
|
conda (params.enable_conda ? "bioconda::bedtools=2.30.0=hc088bd4_0" : null)
|
||||||
if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) {
|
if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) {
|
||||||
container "https://depot.galaxyproject.org/singularity/bedtools:2.30.0--hc088bd4_0"
|
container "https://depot.galaxyproject.org/singularity/bedtools:2.30.0--hc088bd4_0"
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -11,7 +11,7 @@ process BLAST_BLASTN {
|
||||||
mode: params.publish_dir_mode,
|
mode: params.publish_dir_mode,
|
||||||
saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), publish_id:meta.id) }
|
saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), publish_id:meta.id) }
|
||||||
|
|
||||||
conda (params.enable_conda ? 'bioconda::blast=2.10.1' : null)
|
conda (params.enable_conda ? 'bioconda::blast=2.10.1=pl526he19e7b1_3' : null)
|
||||||
if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) {
|
if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) {
|
||||||
container 'https://depot.galaxyproject.org/singularity/blast:2.10.1--pl526he19e7b1_3'
|
container 'https://depot.galaxyproject.org/singularity/blast:2.10.1--pl526he19e7b1_3'
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -11,7 +11,7 @@ process BLAST_MAKEBLASTDB {
|
||||||
mode: params.publish_dir_mode,
|
mode: params.publish_dir_mode,
|
||||||
saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), publish_id:'') }
|
saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), publish_id:'') }
|
||||||
|
|
||||||
conda (params.enable_conda ? 'bioconda::blast=2.10.1' : null)
|
conda (params.enable_conda ? 'bioconda::blast=2.10.1=pl526he19e7b1_3' : null)
|
||||||
if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) {
|
if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) {
|
||||||
container 'https://depot.galaxyproject.org/singularity/blast:2.10.1--pl526he19e7b1_3'
|
container 'https://depot.galaxyproject.org/singularity/blast:2.10.1--pl526he19e7b1_3'
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -22,13 +22,14 @@ process BWA_INDEX {
|
||||||
path fasta
|
path fasta
|
||||||
|
|
||||||
output:
|
output:
|
||||||
path "${fasta}.*" , emit: index
|
path "bwa" , emit: index
|
||||||
path "*.version.txt", emit: version
|
path "*.version.txt", emit: version
|
||||||
|
|
||||||
script:
|
script:
|
||||||
def software = getSoftwareName(task.process)
|
def software = getSoftwareName(task.process)
|
||||||
"""
|
"""
|
||||||
bwa index $options.args $fasta
|
mkdir bwa
|
||||||
|
bwa index $options.args $fasta -p bwa/${fasta.baseName}
|
||||||
echo \$(bwa 2>&1) | sed 's/^.*Version: //; s/Contact:.*\$//' > ${software}.version.txt
|
echo \$(bwa 2>&1) | sed 's/^.*Version: //; s/Contact:.*\$//' > ${software}.version.txt
|
||||||
"""
|
"""
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,7 +21,6 @@ process BWA_MEM {
|
||||||
input:
|
input:
|
||||||
tuple val(meta), path(reads)
|
tuple val(meta), path(reads)
|
||||||
path index
|
path index
|
||||||
path fasta
|
|
||||||
|
|
||||||
output:
|
output:
|
||||||
tuple val(meta), path("*.bam"), emit: bam
|
tuple val(meta), path("*.bam"), emit: bam
|
||||||
|
@ -32,13 +31,15 @@ process BWA_MEM {
|
||||||
def prefix = options.suffix ? "${meta.id}${options.suffix}" : "${meta.id}"
|
def prefix = options.suffix ? "${meta.id}${options.suffix}" : "${meta.id}"
|
||||||
def read_group = meta.read_group ? "-R ${meta.read_group}" : ""
|
def read_group = meta.read_group ? "-R ${meta.read_group}" : ""
|
||||||
"""
|
"""
|
||||||
|
INDEX=`find -L ./ -name "*.amb" | sed 's/.amb//'`
|
||||||
|
|
||||||
bwa mem \\
|
bwa mem \\
|
||||||
$options.args \\
|
$options.args \\
|
||||||
$read_group \\
|
$read_group \\
|
||||||
-t $task.cpus \\
|
-t $task.cpus \\
|
||||||
$fasta \\
|
\$INDEX \\
|
||||||
$reads \\
|
$reads \\
|
||||||
| samtools view $options.args2 -@ $task.cpus -bS -o ${prefix}.bam -
|
| samtools view $options.args2 -@ $task.cpus -bhS -o ${prefix}.bam -
|
||||||
|
|
||||||
echo \$(bwa 2>&1) | sed 's/^.*Version: //; s/Contact:.*\$//' > ${software}.version.txt
|
echo \$(bwa 2>&1) | sed 's/^.*Version: //; s/Contact:.*\$//' > ${software}.version.txt
|
||||||
"""
|
"""
|
||||||
|
|
|
@ -51,10 +51,7 @@ input:
|
||||||
- index:
|
- index:
|
||||||
type: file
|
type: file
|
||||||
description: BWA genome index files
|
description: BWA genome index files
|
||||||
pattern: "*.{amb,ann,bwt,pac,sa}"
|
pattern: "Directory containing BWA index *.{amb,ann,bwt,pac,sa}"
|
||||||
- fasta:
|
|
||||||
type: file
|
|
||||||
description: Input genome fasta file
|
|
||||||
output:
|
output:
|
||||||
- bam:
|
- bam:
|
||||||
type: file
|
type: file
|
||||||
|
|
59
software/cat/fastq/functions.nf
Normal file
59
software/cat/fastq/functions.nf
Normal file
|
@ -0,0 +1,59 @@
|
||||||
|
/*
|
||||||
|
* -----------------------------------------------------
|
||||||
|
* 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.publish_by_id = args.publish_by_id ?: false
|
||||||
|
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_id) {
|
||||||
|
path_list.add(args.publish_id)
|
||||||
|
}
|
||||||
|
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"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
46
software/cat/fastq/main.nf
Normal file
46
software/cat/fastq/main.nf
Normal file
|
@ -0,0 +1,46 @@
|
||||||
|
// Import generic module functions
|
||||||
|
include { initOptions; saveFiles } from './functions'
|
||||||
|
|
||||||
|
params.options = [:]
|
||||||
|
def options = initOptions(params.options)
|
||||||
|
|
||||||
|
process CAT_FASTQ {
|
||||||
|
tag "$meta.id"
|
||||||
|
publishDir "${params.outdir}",
|
||||||
|
mode: params.publish_dir_mode,
|
||||||
|
saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:'merged_fastq', publish_id:meta.id) }
|
||||||
|
|
||||||
|
conda (params.enable_conda ? "conda-forge::sed=4.7=h1bed415_1000" : null)
|
||||||
|
if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) {
|
||||||
|
container "https://containers.biocontainers.pro/s3/SingImgsRepo/biocontainers/v1.2.0_cv1/biocontainers_v1.2.0_cv1.img"
|
||||||
|
} else {
|
||||||
|
container "biocontainers/biocontainers:v1.2.0_cv1"
|
||||||
|
}
|
||||||
|
|
||||||
|
input:
|
||||||
|
tuple val(meta), path(reads)
|
||||||
|
|
||||||
|
output:
|
||||||
|
tuple val(meta), path("*.merged.fastq.gz"), emit: reads
|
||||||
|
|
||||||
|
script:
|
||||||
|
def prefix = options.suffix ? "${meta.id}${options.suffix}" : "${meta.id}"
|
||||||
|
def readList = reads.collect{ it.toString() }
|
||||||
|
if (meta.single_end) {
|
||||||
|
if (readList.size > 1) {
|
||||||
|
"""
|
||||||
|
cat ${readList.sort().join(' ')} > ${prefix}.merged.fastq.gz
|
||||||
|
"""
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (readList.size > 2) {
|
||||||
|
def read1 = []
|
||||||
|
def read2 = []
|
||||||
|
readList.eachWithIndex{ v, ix -> ( ix & 1 ? read2 : read1 ) << v }
|
||||||
|
"""
|
||||||
|
cat ${read1.sort().join(' ')} > ${prefix}_1.merged.fastq.gz
|
||||||
|
cat ${read2.sort().join(' ')} > ${prefix}_2.merged.fastq.gz
|
||||||
|
"""
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
55
software/cat/fastq/meta.yml
Normal file
55
software/cat/fastq/meta.yml
Normal file
|
@ -0,0 +1,55 @@
|
||||||
|
name: cat_fastq
|
||||||
|
description: Concatenates fastq files
|
||||||
|
keywords:
|
||||||
|
- fastq
|
||||||
|
- concatenate
|
||||||
|
tools:
|
||||||
|
- cat:
|
||||||
|
description: |
|
||||||
|
The cat utility reads files sequentially, writing them to the standard output.
|
||||||
|
documentation: https://www.gnu.org/software/coreutils/manual/html_node/cat-invocation.html
|
||||||
|
params:
|
||||||
|
- outdir:
|
||||||
|
type: string
|
||||||
|
description: |
|
||||||
|
The pipeline's output directory. By default, the module will
|
||||||
|
output files into `$params.outdir/<SOFTWARE>`
|
||||||
|
- publish_dir_mode:
|
||||||
|
type: string
|
||||||
|
description: |
|
||||||
|
Value for the Nextflow `publishDir` mode parameter.
|
||||||
|
Available: symlink, rellink, link, copy, copyNoFollow, move.
|
||||||
|
- enable_conda:
|
||||||
|
type: boolean
|
||||||
|
description: |
|
||||||
|
Run the module with Conda using the software specified
|
||||||
|
via the `conda` directive
|
||||||
|
- singularity_pull_docker_container:
|
||||||
|
type: boolean
|
||||||
|
description: |
|
||||||
|
Instead of directly downloading Singularity images for use with Singularity,
|
||||||
|
force the workflow to pull and convert Docker containers instead.
|
||||||
|
input:
|
||||||
|
input:
|
||||||
|
- meta:
|
||||||
|
type: map
|
||||||
|
description: |
|
||||||
|
Groovy Map containing sample information
|
||||||
|
e.g. [ id:'test', single_end:false ]
|
||||||
|
- reads:
|
||||||
|
type: list
|
||||||
|
description: |
|
||||||
|
List of input FastQ files to be concatenated.
|
||||||
|
output:
|
||||||
|
- meta:
|
||||||
|
type: map
|
||||||
|
description: |
|
||||||
|
Groovy Map containing sample information
|
||||||
|
e.g. [ id:'test', single_end:false ]
|
||||||
|
- reads:
|
||||||
|
type: file
|
||||||
|
description: Merged fastq file
|
||||||
|
pattern: "*.{merged.fastq.gz}"
|
||||||
|
authors:
|
||||||
|
- "@joseespinosa"
|
||||||
|
- "@drpatelh"
|
|
@ -10,7 +10,7 @@ process GUNZIP {
|
||||||
mode: params.publish_dir_mode,
|
mode: params.publish_dir_mode,
|
||||||
saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), publish_id:'') }
|
saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), publish_id:'') }
|
||||||
|
|
||||||
conda (params.enable_conda ? "conda-forge::sed=4.7" : null)
|
conda (params.enable_conda ? "conda-forge::sed=4.7=h1bed415_1000" : null)
|
||||||
if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) {
|
if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) {
|
||||||
container "https://containers.biocontainers.pro/s3/SingImgsRepo/biocontainers/v1.2.0_cv1/biocontainers_v1.2.0_cv1.img"
|
container "https://containers.biocontainers.pro/s3/SingImgsRepo/biocontainers/v1.2.0_cv1/biocontainers_v1.2.0_cv1.img"
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -11,19 +11,19 @@ process PANGOLIN {
|
||||||
mode: params.publish_dir_mode,
|
mode: params.publish_dir_mode,
|
||||||
saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), publish_id:meta.id) }
|
saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), publish_id:meta.id) }
|
||||||
|
|
||||||
conda (params.enable_conda ? 'bioconda::pangolin=2.1.7=py_0' : null)
|
conda (params.enable_conda ? 'bioconda::pangolin=2.2.1=py_0 bioconda::pangolearn=2021.02.05=pyh3252c3a_0' : null)
|
||||||
if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) {
|
if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) {
|
||||||
container 'https://depot.galaxyproject.org/singularity/pangolin:2.1.7--py_0'
|
container 'https://depot.galaxyproject.org/singularity/pangolin:2.2.1--py_0'
|
||||||
} else {
|
} else {
|
||||||
container 'quay.io/biocontainers/pangolin:2.1.7--py_0'
|
container 'quay.io/biocontainers/pangolin:2.2.1--py_0'
|
||||||
}
|
}
|
||||||
|
|
||||||
input:
|
input:
|
||||||
tuple val(meta), path(fasta)
|
tuple val(meta), path(fasta)
|
||||||
|
|
||||||
output:
|
output:
|
||||||
tuple val(meta), path('*.lineage_report.csv'), emit: report
|
tuple val(meta), path('*.csv'), emit: report
|
||||||
path '*.version.txt' , emit: version
|
path '*.version.txt' , emit: version
|
||||||
|
|
||||||
script:
|
script:
|
||||||
def software = getSoftwareName(task.process)
|
def software = getSoftwareName(task.process)
|
||||||
|
@ -31,7 +31,7 @@ process PANGOLIN {
|
||||||
"""
|
"""
|
||||||
pangolin \\
|
pangolin \\
|
||||||
$fasta\\
|
$fasta\\
|
||||||
--outfile ${prefix}.lineage_report.csv \\
|
--outfile ${prefix}.pangolin.csv \\
|
||||||
$options.args
|
$options.args
|
||||||
|
|
||||||
pangolin --version | sed "s/pangolin //g" > ${software}.version.txt
|
pangolin --version | sed "s/pangolin //g" > ${software}.version.txt
|
||||||
|
|
|
@ -1,57 +1,54 @@
|
||||||
name: pangolin
|
name: pangolin
|
||||||
description: Phylogenetic Assignment of Named Global Outbreak LINeages
|
description: Phylogenetic Assignment of Named Global Outbreak LINeages
|
||||||
keywords:
|
keywords:
|
||||||
- covid
|
- covid
|
||||||
- pangolin
|
- pangolin
|
||||||
- lineage
|
- lineage
|
||||||
tools:
|
tools:
|
||||||
- star:
|
- star:
|
||||||
description: |
|
description: |
|
||||||
Phylogenetic Assignment of Named Global Outbreak LINeages
|
Phylogenetic Assignment of Named Global Outbreak LINeages
|
||||||
homepage: https://github.com/cov-lineages/pangolin#pangolearn-description
|
homepage: https://github.com/cov-lineages/pangolin#pangolearn-description
|
||||||
manual: https://github.com/cov-lineages/pangolin#pangolearn-description
|
manual: https://github.com/cov-lineages/pangolin#pangolearn-description
|
||||||
params:
|
params:
|
||||||
- outdir:
|
- outdir:
|
||||||
type: string
|
type: string
|
||||||
description: |
|
description: |
|
||||||
The pipeline's output directory. By default, the module will
|
The pipeline's output directory. By default, the module will
|
||||||
output files into `$params.outdir/<SOFTWARE>`
|
output files into `$params.outdir/<SOFTWARE>`
|
||||||
- publish_dir_mode:
|
- publish_dir_mode:
|
||||||
type: string
|
type: string
|
||||||
description: |
|
description: |
|
||||||
Value for the Nextflow `publishDir` mode parameter.
|
Value for the Nextflow `publishDir` mode parameter.
|
||||||
Available: symlink, rellink, link, copy, copyNoFollow, move.
|
Available: symlink, rellink, link, copy, copyNoFollow, move.
|
||||||
- enable_conda:
|
- enable_conda:
|
||||||
type: boolean
|
type: boolean
|
||||||
description: |
|
description: |
|
||||||
Run the module with Conda using the software specified
|
Run the module with Conda using the software specified
|
||||||
via the `conda` directive
|
via the `conda` directive
|
||||||
- singularity_pull_docker_container:
|
- singularity_pull_docker_container:
|
||||||
type: boolean
|
type: boolean
|
||||||
description: |
|
description: |
|
||||||
Instead of directly downloading Singularity images for use with Singularity,
|
Instead of directly downloading Singularity images for use with Singularity,
|
||||||
force the workflow to pull and convert Docker containers instead.
|
force the workflow to pull and convert Docker containers instead.
|
||||||
|
|
||||||
input:
|
input:
|
||||||
- meta:
|
- meta:
|
||||||
type: map
|
type: map
|
||||||
description: |
|
description: |
|
||||||
Groovy Map containing sample information
|
Groovy Map containing sample information
|
||||||
- fasta:
|
- fasta:
|
||||||
type: file
|
type: file
|
||||||
description: |
|
description: |
|
||||||
The genome assembly to be evaluated
|
The genome assembly to be evaluated
|
||||||
|
|
||||||
output:
|
output:
|
||||||
- report:
|
- report:
|
||||||
type: file
|
type: file
|
||||||
description: The lineage report
|
description: Pangolin lineage report
|
||||||
pattern: "{prefix}.lineage_report.csv"
|
pattern: "*.{csv}"
|
||||||
|
- version:
|
||||||
- version:
|
type: file
|
||||||
type: file
|
description: File containing software version
|
||||||
description: File containing software version
|
pattern: "*.{version.txt}"
|
||||||
pattern: "*.{version.txt}"
|
|
||||||
|
|
||||||
authors:
|
authors:
|
||||||
- "@kevinmenden"
|
- "@kevinmenden"
|
||||||
|
- "@drpatelh"
|
||||||
|
|
|
@ -25,7 +25,7 @@ process STRINGTIE {
|
||||||
output:
|
output:
|
||||||
tuple val(meta), path("*.coverage.gtf") , emit: coverage_gtf
|
tuple val(meta), path("*.coverage.gtf") , emit: coverage_gtf
|
||||||
tuple val(meta), path("*.transcripts.gtf"), emit: transcript_gtf
|
tuple val(meta), path("*.transcripts.gtf"), emit: transcript_gtf
|
||||||
tuple val(meta), path("*.txt") , emit: abundance
|
tuple val(meta), path("*.abundance.txt") , emit: abundance
|
||||||
tuple val(meta), path("*.ballgown") , emit: ballgown
|
tuple val(meta), path("*.ballgown") , emit: ballgown
|
||||||
path "*.version.txt" , emit: version
|
path "*.version.txt" , emit: version
|
||||||
|
|
||||||
|
@ -45,7 +45,7 @@ process STRINGTIE {
|
||||||
$strandedness \\
|
$strandedness \\
|
||||||
-G $gtf \\
|
-G $gtf \\
|
||||||
-o ${prefix}.transcripts.gtf \\
|
-o ${prefix}.transcripts.gtf \\
|
||||||
-A ${prefix}.gene_abundance.txt \\
|
-A ${prefix}.gene.abundance.txt \\
|
||||||
-C ${prefix}.coverage.gtf \\
|
-C ${prefix}.coverage.gtf \\
|
||||||
-b ${prefix}.ballgown \\
|
-b ${prefix}.ballgown \\
|
||||||
$options.args
|
$options.args
|
||||||
|
|
|
@ -10,7 +10,7 @@ process UNTAR {
|
||||||
mode: params.publish_dir_mode,
|
mode: params.publish_dir_mode,
|
||||||
saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), publish_id:'') }
|
saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), publish_id:'') }
|
||||||
|
|
||||||
conda (params.enable_conda ? "conda-forge::sed=4.7" : null)
|
conda (params.enable_conda ? "conda-forge::sed=4.7=h1bed415_1000" : null)
|
||||||
if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) {
|
if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) {
|
||||||
container "https://containers.biocontainers.pro/s3/SingImgsRepo/biocontainers/v1.2.0_cv1/biocontainers_v1.2.0_cv1.img"
|
container "https://containers.biocontainers.pro/s3/SingImgsRepo/biocontainers/v1.2.0_cv1/biocontainers_v1.2.0_cv1.img"
|
||||||
} else {
|
} else {
|
||||||
|
|
12
tests/software/bedtools/getfasta/main.nf
Normal file
12
tests/software/bedtools/getfasta/main.nf
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
#!/usr/bin/env nextflow
|
||||||
|
|
||||||
|
nextflow.enable.dsl = 2
|
||||||
|
|
||||||
|
include { BEDTOOLS_GETFASTA } from '../../../../software/bedtools/getfasta/main.nf' addParams( options: [:] )
|
||||||
|
|
||||||
|
workflow test_bedtools_getfasta {
|
||||||
|
def bed = [ file("${launchDir}/tests/data/bed/C.bed", checkIfExists: true) ]
|
||||||
|
def fasta = [ file("${launchDir}/tests/data/fasta/E_coli/NC_010473.fa", checkIfExists: true) ]
|
||||||
|
|
||||||
|
BEDTOOLS_GETFASTA ( bed, fasta )
|
||||||
|
}
|
8
tests/software/bedtools/getfasta/test.yml
Normal file
8
tests/software/bedtools/getfasta/test.yml
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
- name: bedtools getfasta
|
||||||
|
command: nextflow run ./tests/software/bedtools/getfasta -entry test_bedtools_getfasta -c tests/config/nextflow.config
|
||||||
|
tags:
|
||||||
|
- bedtools
|
||||||
|
- bedtools_getfasta
|
||||||
|
files:
|
||||||
|
- path: output/bedtools/C.fa
|
||||||
|
md5sum: 2257190c8d9fc6f177a518440cf1f3f3
|
|
@ -5,10 +5,9 @@ nextflow.enable.dsl = 2
|
||||||
include { BEDTOOLS_MASKFASTA } from '../../../../software/bedtools/maskfasta/main.nf' addParams( options: [:] )
|
include { BEDTOOLS_MASKFASTA } from '../../../../software/bedtools/maskfasta/main.nf' addParams( options: [:] )
|
||||||
|
|
||||||
workflow test_bedtools_maskfasta {
|
workflow test_bedtools_maskfasta {
|
||||||
def input,fasta = []
|
def bed = [ [ id:'test'],
|
||||||
bed = [ [ id:'test'],
|
file("${launchDir}/tests/data/bed/C.bed", checkIfExists: true) ]
|
||||||
file("${launchDir}/tests/data/bed/C.bed", checkIfExists: true) ]
|
def fasta = [ file("${launchDir}/tests/data/fasta/E_coli/NC_010473.fa", checkIfExists: true) ]
|
||||||
fasta = [ file("${launchDir}/tests/data/fasta/E_coli/NC_010473.fa", checkIfExists: true) ]
|
|
||||||
|
|
||||||
BEDTOOLS_MASKFASTA( bed, fasta )
|
BEDTOOLS_MASKFASTA( bed, fasta )
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,11 +4,11 @@
|
||||||
- bwa
|
- bwa
|
||||||
- bwa_index
|
- bwa_index
|
||||||
files:
|
files:
|
||||||
- path: output/bwa/NC_010473.fa.amb
|
- path: output/bwa/bwa/NC_010473.amb
|
||||||
md5sum: 942a990ae872f1c0b8d72dda2db405d5
|
md5sum: 942a990ae872f1c0b8d72dda2db405d5
|
||||||
- path: output/bwa/NC_010473.fa.bwt
|
- path: output/bwa/bwa/NC_010473.bwt
|
||||||
md5sum: 7301b52e2ecb893d429a49fa692447ae
|
md5sum: 7301b52e2ecb893d429a49fa692447ae
|
||||||
- path: output/bwa/NC_010473.fa.pac
|
- path: output/bwa/bwa/NC_010473.pac
|
||||||
md5sum: 4d5e6fc45bbc968f7f859e9ca2cc89ad
|
md5sum: 4d5e6fc45bbc968f7f859e9ca2cc89ad
|
||||||
- path: output/bwa/NC_010473.fa.sa
|
- path: output/bwa/bwa/NC_010473.sa
|
||||||
md5sum: a47dcc92e750e2f16fbd979b8ff9538e
|
md5sum: a47dcc92e750e2f16fbd979b8ff9538e
|
|
@ -15,8 +15,7 @@ workflow test_bwa_mem_single_end {
|
||||||
|
|
||||||
BWA_MEM (
|
BWA_MEM (
|
||||||
input,
|
input,
|
||||||
file("${launchDir}/tests/data/index/E_coli/bwa/NC_010473.fa.{amb,ann,bwt,pac,sa}", checkIfExists: true),
|
file("${launchDir}/tests/data/index/E_coli/bwa/", checkIfExists: true)
|
||||||
file("${launchDir}/tests/data/fasta/E_coli/NC_010473.fa", checkIfExists: true)
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -32,7 +31,6 @@ workflow test_bwa_mem_paired_end {
|
||||||
|
|
||||||
BWA_MEM (
|
BWA_MEM (
|
||||||
input,
|
input,
|
||||||
file("${launchDir}/tests/data/index/E_coli/bwa/NC_010473.fa.{amb,ann,bwt,pac,sa}", checkIfExists: true),
|
file("${launchDir}/tests/data/index/E_coli/bwa/", checkIfExists: true)
|
||||||
file("${launchDir}/tests/data/fasta/E_coli/NC_010473.fa", checkIfExists: true)
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
- bwa_mem_single_end
|
- bwa_mem_single_end
|
||||||
files:
|
files:
|
||||||
- path: output/bwa/test.bam
|
- path: output/bwa/test.bam
|
||||||
md5sum: 3ee21210bac387e0335008146e4728bc
|
md5sum: 52e81e5bd523d0b27fe533b21a0d80f5
|
||||||
|
|
||||||
- name: bwa mem paired-end
|
- name: bwa mem paired-end
|
||||||
command: nextflow run ./tests/software/bwa/mem -entry test_bwa_mem_paired_end -c tests/config/nextflow.config
|
command: nextflow run ./tests/software/bwa/mem -entry test_bwa_mem_paired_end -c tests/config/nextflow.config
|
||||||
|
@ -16,4 +16,4 @@
|
||||||
- bwa_mem_paired_end
|
- bwa_mem_paired_end
|
||||||
files:
|
files:
|
||||||
- path: output/bwa/test.bam
|
- path: output/bwa/test.bam
|
||||||
md5sum: 510d8acc6448c07cdacce8e64ec0904c
|
md5sum: 86d82fdb68ed384c656cfc62a253052f
|
||||||
|
|
27
tests/software/cat/fastq/main.nf
Normal file
27
tests/software/cat/fastq/main.nf
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
#!/usr/bin/env nextflow
|
||||||
|
|
||||||
|
nextflow.enable.dsl = 2
|
||||||
|
|
||||||
|
include { CAT_FASTQ } from '../../../../software/cat/fastq/main.nf' addParams( options: [:] )
|
||||||
|
|
||||||
|
workflow test_cat_fastq_single_end {
|
||||||
|
|
||||||
|
def input = []
|
||||||
|
input = [ [ id:'test', single_end:true ], // meta map
|
||||||
|
[ file("${launchDir}/tests/data/fastq/rna/test_R1_val_1.fq.gz", checkIfExists: true),
|
||||||
|
file("${launchDir}/tests/data/fastq/rna/test_R1.fastq.gz", checkIfExists: true) ]]
|
||||||
|
|
||||||
|
CAT_FASTQ ( input )
|
||||||
|
}
|
||||||
|
|
||||||
|
workflow test_cat_fastq_paired_end {
|
||||||
|
|
||||||
|
def input = []
|
||||||
|
input = [ [ id:'test', single_end:false ], // meta map
|
||||||
|
[ file("${launchDir}/tests/data/fastq/rna/test_R1_val_1.fq.gz", checkIfExists: true),
|
||||||
|
file("${launchDir}/tests/data/fastq/rna/test_R2_val_2.fq.gz", checkIfExists: true),
|
||||||
|
file("${launchDir}/tests/data/fastq/rna/test_R1.fastq.gz", checkIfExists: true),
|
||||||
|
file("${launchDir}/tests/data/fastq/rna/test_R2.fastq.gz", checkIfExists: true) ]]
|
||||||
|
|
||||||
|
CAT_FASTQ ( input )
|
||||||
|
}
|
21
tests/software/cat/fastq/test.yml
Normal file
21
tests/software/cat/fastq/test.yml
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
- name: cat fastq single-end
|
||||||
|
command: nextflow run ./tests/software/cat/fastq -entry test_cat_fastq_single_end -c tests/config/nextflow.config
|
||||||
|
tags:
|
||||||
|
- cat
|
||||||
|
- cat_fastq
|
||||||
|
- cat_fastqc_single_end
|
||||||
|
files:
|
||||||
|
- path: output/merged_fastq/test.merged.fastq.gz
|
||||||
|
md5sum: 7f753b793e5b0872758b1574db84d767
|
||||||
|
|
||||||
|
- name: cat fastq fastqc_paired_end
|
||||||
|
command: nextflow run ./tests/software/cat/fastq -entry test_cat_fastq_paired_end -c tests/config/nextflow.config
|
||||||
|
tags:
|
||||||
|
- cat
|
||||||
|
- cat_fastq
|
||||||
|
- cat_fastqc_paired_end
|
||||||
|
files:
|
||||||
|
- path: output/merged_fastq/test_1.merged.fastq.gz
|
||||||
|
md5sum: 7f753b793e5b0872758b1574db84d767
|
||||||
|
- path: output/merged_fastq/test_2.merged.fastq.gz
|
||||||
|
md5sum: c71ff917e002b1e852916a021d52921d
|
|
@ -2,11 +2,11 @@
|
||||||
|
|
||||||
nextflow.enable.dsl = 2
|
nextflow.enable.dsl = 2
|
||||||
|
|
||||||
include { PANGOLIN } from '../../../software/pangolin/main.nf' addParams(options: [:])
|
include { PANGOLIN } from '../../../software/pangolin/main.nf' addParams( options: [:] )
|
||||||
|
|
||||||
workflow test_pangolin {
|
workflow test_pangolin {
|
||||||
input = [ [ id:'test' ], // meta map
|
input = [ [ id:'test' ], // meta map
|
||||||
[ file("${launchDir}/tests/data/fasta/sarscov2/GCA_011545545.1_ASM1154554v1_genomic.fna", checkIfExists: true) ] ]
|
[ file("${launchDir}/tests/data/fasta/sarscov2/GCA_011545545.1_ASM1154554v1_genomic.fna", checkIfExists: true) ] ]
|
||||||
|
|
||||||
PANGOLIN( input )
|
PANGOLIN ( input )
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,5 +3,5 @@
|
||||||
tags:
|
tags:
|
||||||
- pangolin
|
- pangolin
|
||||||
files:
|
files:
|
||||||
- path: ./output/pangolin/test.lineage_report.csv
|
- path: ./output/pangolin/test.pangolin.csv
|
||||||
md5sum: a7423586a536a58f14fb4553f92b225e
|
md5sum: 097669de1843e27f4529d6db8bbed97b
|
||||||
|
|
Loading…
Reference in a new issue