Merge branch 'master' into new-module/EMBOSS_SEQRET
commit
26d206cca3
@ -0,0 +1,44 @@
|
||||
process CHECKM_QA {
|
||||
tag "$meta.id"
|
||||
label 'process_low'
|
||||
|
||||
conda (params.enable_conda ? "bioconda::checkm-genome=1.2.1" : null)
|
||||
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
||||
'https://depot.galaxyproject.org/singularity/checkm-genome:1.2.1--pyhdfd78af_0' :
|
||||
'quay.io/biocontainers/checkm-genome:1.2.1--pyhdfd78af_0' }"
|
||||
|
||||
input:
|
||||
tuple val(meta), path(analysis_dir), path(marker_file), path(coverage_file)
|
||||
path exclude_marker_file
|
||||
|
||||
output:
|
||||
tuple val(meta), path("${prefix}.txt") , optional: true, emit: output
|
||||
tuple val(meta), path("${prefix}.fasta"), optional: true, emit: fasta
|
||||
path "versions.yml" , emit: versions
|
||||
|
||||
when:
|
||||
task.ext.when == null || task.ext.when
|
||||
|
||||
script:
|
||||
def args = task.ext.args ?: ''
|
||||
prefix = task.ext.prefix ?: "${meta.id}"
|
||||
suffix = task.ext.args?.matches(".*-o 9.*|.*--out_file 9.*") ? "fasta" : "txt"
|
||||
def coverage = coverage_file ? "--coverage_file ${coverage_file}" : ""
|
||||
def exclude = exclude_marker_file ? "--exclude_markers ${marker_filer}" : ""
|
||||
"""
|
||||
checkm \\
|
||||
qa \\
|
||||
--threads ${task.cpus} \\
|
||||
--file ${prefix}.${suffix} \\
|
||||
$marker_file \\
|
||||
$analysis_dir \\
|
||||
$coverage \\
|
||||
$exclude \\
|
||||
$args
|
||||
|
||||
cat <<-END_VERSIONS > versions.yml
|
||||
"${task.process}":
|
||||
checkm: \$( checkm 2>&1 | grep '...:::' | sed 's/.*CheckM v//;s/ .*//' )
|
||||
END_VERSIONS
|
||||
"""
|
||||
}
|
@ -0,0 +1,67 @@
|
||||
name: checkm_qa
|
||||
description: CheckM provides a set of tools for assessing the quality of genomes recovered from isolates, single cells, or metagenomes.
|
||||
keywords:
|
||||
- checkm
|
||||
- mag
|
||||
- metagenome
|
||||
- quality
|
||||
- isolates
|
||||
- microbes
|
||||
- single cells
|
||||
- completeness
|
||||
- contamination
|
||||
- bins
|
||||
- genome bins
|
||||
- qa
|
||||
- quality assurnce
|
||||
tools:
|
||||
- checkm:
|
||||
description: Assess the quality of microbial genomes recovered from isolates, single cells, and metagenomes.
|
||||
homepage: https://ecogenomics.github.io/CheckM/
|
||||
documentation: https://github.com/Ecogenomics/CheckM/wiki
|
||||
tool_dev_url: https://github.com/Ecogenomics/CheckM
|
||||
doi: "10.1101/gr.186072.114"
|
||||
licence: ["GPL v3"]
|
||||
|
||||
input:
|
||||
- meta:
|
||||
type: map
|
||||
description: |
|
||||
Groovy Map containing sample information
|
||||
e.g. [ id:'test', single_end:false ]
|
||||
- analysis_dir:
|
||||
type: file
|
||||
description: Directory containing output of checkm/analyze or checkm/lineage_wf etc.
|
||||
pattern: "*"
|
||||
- marker_file:
|
||||
type: file
|
||||
description: Marker file specified during checkm/analyze or produced by checkm/{lineage,taxonomy}_wf
|
||||
pattern: "*.ms"
|
||||
- coverage_file:
|
||||
type: file
|
||||
description: File containing coverage of each sequence (generated by checkm coverage)
|
||||
- exclude_marker_file:
|
||||
type: file
|
||||
description: File specifying markers to exclude from marker sets
|
||||
|
||||
output:
|
||||
- meta:
|
||||
type: map
|
||||
description: |
|
||||
Groovy Map containing sample information
|
||||
e.g. [ id:'test', single_end:false ]
|
||||
- versions:
|
||||
type: file
|
||||
description: File containing software versions
|
||||
pattern: "versions.yml"
|
||||
- output:
|
||||
type: file
|
||||
description: "Default completeness statistics in various formats, as specified with --out_format (excluding option: 9)"
|
||||
pattern: "*.txt"
|
||||
- fasta:
|
||||
type: file
|
||||
description: Output in fasta format (only if --out_format 9)
|
||||
pattern: "*.fasta"
|
||||
|
||||
authors:
|
||||
- "@jfy133"
|
@ -0,0 +1,49 @@
|
||||
process FCS_FCSADAPTOR {
|
||||
tag "$meta.id"
|
||||
label 'process_low'
|
||||
|
||||
if (params.enable_conda) {
|
||||
exit 1, "Conda environments cannot be used when using the FCS tool. Please use docker or singularity containers."
|
||||
}
|
||||
// WARN: Version information not provided by tool on CLI. Please update version string below when bumping container versions.
|
||||
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
||||
'https://ftp.ncbi.nlm.nih.gov/genomes/TOOLS/FCS/releases/0.2.3/fcs-adaptor.0.2.3.sif':
|
||||
'ncbi/fcs-adaptor:0.2.3' }"
|
||||
|
||||
input:
|
||||
tuple val(meta), path(assembly)
|
||||
|
||||
output:
|
||||
tuple val(meta), path("*.cleaned_sequences.fa.gz"), emit: cleaned_assembly
|
||||
tuple val(meta), path("*.fcs_adaptor_report.txt") , emit: adaptor_report
|
||||
tuple val(meta), path("*.fcs_adaptor.log") , emit: log
|
||||
tuple val(meta), path("*.pipeline_args.yaml") , emit: pipeline_args
|
||||
tuple val(meta), path("*.skipped_trims.jsonl") , emit: skipped_trims
|
||||
path "versions.yml" , emit: versions
|
||||
|
||||
when:
|
||||
task.ext.when == null || task.ext.when
|
||||
|
||||
script:
|
||||
def args = task.ext.args ?: '--prok' // --prok || --euk
|
||||
def prefix = task.ext.prefix ?: "${meta.id}"
|
||||
def FCSADAPTOR_VERSION = '0.2.3' // WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions.
|
||||
"""
|
||||
/app/fcs/bin/av_screen_x \\
|
||||
-o output/ \\
|
||||
$args \\
|
||||
$assembly
|
||||
|
||||
# compress and/or rename files with prefix
|
||||
gzip -cf output/cleaned_sequences/* > "${prefix}.cleaned_sequences.fa.gz"
|
||||
cp "output/fcs_adaptor_report.txt" "${prefix}.fcs_adaptor_report.txt"
|
||||
cp "output/fcs_adaptor.log" "${prefix}.fcs_adaptor.log"
|
||||
cp "output/pipeline_args.yaml" "${prefix}.pipeline_args.yaml"
|
||||
cp "output/skipped_trims.jsonl" "${prefix}.skipped_trims.jsonl"
|
||||
|
||||
cat <<-END_VERSIONS > versions.yml
|
||||
"${task.process}":
|
||||
FCS-adaptor: $FCSADAPTOR_VERSION
|
||||
END_VERSIONS
|
||||
"""
|
||||
}
|
@ -0,0 +1,62 @@
|
||||
name: "fcs_fcsadaptor"
|
||||
description: Run NCBI's FCS adaptor on assembled genomes
|
||||
keywords:
|
||||
- assembly
|
||||
- genomics
|
||||
- quality control
|
||||
- contamination
|
||||
- NCBI
|
||||
tools:
|
||||
- "fcs":
|
||||
description: |
|
||||
The Foreign Contamination Screening (FCS) tool rapidly detects contaminants from foreign
|
||||
organisms in genome assemblies to prepare your data for submission. Therefore, the
|
||||
submission process to NCBI is faster and fewer contaminated genomes are submitted.
|
||||
This reduces errors in analyses and conclusions, not just for the original data submitter
|
||||
but for all subsequent users of the assembly.
|
||||
homepage: "https://www.ncbi.nlm.nih.gov/data-hub/cgr/data-quality-tools/"
|
||||
documentation: "https://github.com/ncbi/fcs/wiki/FCS-adaptor"
|
||||
tool_dev_url: "https://github.com/ncbi/fcs"
|
||||
doi: ""
|
||||
licence: "United States Government Work"
|
||||
input:
|
||||
- meta:
|
||||
type: map
|
||||
description: |
|
||||
Groovy Map containing sample information
|
||||
e.g. [ id:'test', single_end:false ]
|
||||
- assembly:
|
||||
type: file
|
||||
description: assembly fasta file
|
||||
output:
|
||||
- meta:
|
||||
type: map
|
||||
description: |
|
||||
Groovy Map containing sample information
|
||||
e.g. [ id:'test', single_end:false ]
|
||||
- versions:
|
||||
type: file
|
||||
description: File containing software versions
|
||||
pattern: "versions.yml"
|
||||
- cleaned_assembly:
|
||||
type: file
|
||||
description: Cleaned assembly in fasta format
|
||||
pattern: "*.{cleaned_sequences.fa.gz}"
|
||||
- adaptor_report:
|
||||
type: file
|
||||
description: Report of identified adaptors
|
||||
pattern: "*.{fcs_adaptor_report.txt}"
|
||||
- log:
|
||||
type: file
|
||||
description: Log file
|
||||
pattern: "*.{fcs_adaptor.log}"
|
||||
- pipeline_args:
|
||||
type: file
|
||||
description: Run arguments
|
||||
pattern: "*.{pipeline_args.yaml}"
|
||||
- skipped_trims:
|
||||
type: file
|
||||
description: Skipped trim information
|
||||
pattern: "*.{skipped_trims.jsonl}"
|
||||
authors:
|
||||
- "@d4straub"
|
@ -0,0 +1,49 @@
|
||||
process VCFLIB_VCFBREAKMULTI {
|
||||
tag "$meta.id"
|
||||
label 'process_low'
|
||||
|
||||
conda (params.enable_conda ? "bioconda::vcflib=1.0.3" : null)
|
||||
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
||||
'https://depot.galaxyproject.org/singularity/vcflib:1.0.3--hecb563c_1':
|
||||
'quay.io/biocontainers/vcflib:1.0.3--ha025227_0' }"
|
||||
|
||||
input:
|
||||
tuple val(meta), path(vcf), path(tbi)
|
||||
|
||||
output:
|
||||
tuple val(meta), path("*.vcf.gz"), emit: vcf
|
||||
path "versions.yml" , emit: versions
|
||||
|
||||
when:
|
||||
task.ext.when == null || task.ext.when
|
||||
|
||||
script:
|
||||
def args = task.ext.args ?: ''
|
||||
def args2 = task.ext.args2 ?: ''
|
||||
def prefix = task.ext.prefix ?: "${meta.id}"
|
||||
def VERSION = '1.0.3' // WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions.
|
||||
|
||||
"""
|
||||
vcfbreakmulti \\
|
||||
$vcf \\
|
||||
$args \\
|
||||
| bgzip -c $args2 > ${prefix}.breakmulti.vcf.gz
|
||||
|
||||
cat <<-END_VERSIONS > versions.yml
|
||||
"${task.process}":
|
||||
vcflib: $VERSION
|
||||
END_VERSIONS
|
||||
"""
|
||||
|
||||
stub:
|
||||
def prefix = task.ext.prefix ?: "${meta.id}"
|
||||
def VERSION = '1.0.3' // WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions.
|
||||
"""
|
||||
touch ${prefix}.breakmulti.vcf.gz
|
||||
|
||||
cat <<-END_VERSIONS > versions.yml
|
||||
"${task.process}":
|
||||
vcflib: $VERSION
|
||||
END_VERSIONS
|
||||
"""
|
||||
}
|
@ -0,0 +1,45 @@
|
||||
name: "vcflib_vcfbreakmulti"
|
||||
description: If multiple alleles are specified in a single record, break the record into several lines preserving allele-specific INFO fields
|
||||
keywords:
|
||||
- vcflib
|
||||
- vcflib/vcfbreakmulti
|
||||
tools:
|
||||
- "vcflib":
|
||||
description: "Command-line tools for manipulating VCF files"
|
||||
homepage: https://github.com/vcflib/vcflib
|
||||
documentation: https://github.com/vcflib/vcflib#USAGE
|
||||
doi: "https://doi.org/10.1101/2021.05.21.445151"
|
||||
licence: "['MIT']"
|
||||
|
||||
input:
|
||||
- meta:
|
||||
type: map
|
||||
description: |
|
||||
Groovy Map containing sample information
|
||||
e.g. [ id:'test', single_end:false ]
|
||||
- vcf:
|
||||
type: file
|
||||
description: Compressed VCF file
|
||||
pattern: "*.{.vcf.gz,vcf}"
|
||||
- tbi:
|
||||
type: file
|
||||
description: Index of VCF file
|
||||
pattern: "*.vcf.gz.tbi"
|
||||
|
||||
output:
|
||||
- meta:
|
||||
type: map
|
||||
description: |
|
||||
Groovy Map containing sample information
|
||||
e.g. [ id:'test', single_end:false ]
|
||||
- versions:
|
||||
type: file
|
||||
description: File containing software versions
|
||||
pattern: "versions.yml"
|
||||
- vcf:
|
||||
type: file
|
||||
description: Compressed VCF file
|
||||
pattern: "*.vcf.gz"
|
||||
|
||||
authors:
|
||||
- "@lucpen"
|
@ -0,0 +1,44 @@
|
||||
#!/usr/bin/env nextflow
|
||||
|
||||
nextflow.enable.dsl = 2
|
||||
|
||||
include { CHECKM_LINEAGEWF } from '../../../../modules/checkm/lineagewf/main.nf'
|
||||
include { CHECKM_LINEAGEWF as CHECKM_LINEAGEWF_FASTA } from '../../../../modules/checkm/lineagewf/main.nf'
|
||||
include { CHECKM_QA } from '../../../../modules/checkm/qa/main.nf'
|
||||
include { CHECKM_QA as CHECKM_QA_FASTA } from '../../../../modules/checkm/qa/main.nf'
|
||||
|
||||
workflow test_checkm_qa {
|
||||
|
||||
input = [ [ id:'test', single_end:false ], // meta map
|
||||
file(params.test_data['sarscov2']['illumina']['contigs_fasta'], checkIfExists: true) ]
|
||||
fasta_ext = 'fasta'
|
||||
|
||||
CHECKM_LINEAGEWF ( input, fasta_ext, [] )
|
||||
|
||||
ch_checkmqa_input = CHECKM_LINEAGEWF.out.checkm_output
|
||||
.join(CHECKM_LINEAGEWF.out.marker_file)
|
||||
.map{
|
||||
meta, dir, marker ->
|
||||
[ meta, dir, marker, []]
|
||||
}
|
||||
|
||||
CHECKM_QA ( ch_checkmqa_input, [] )
|
||||
}
|
||||
|
||||
workflow test_checkm_qa_fasta {
|
||||
|
||||
input = [ [ id:'test', single_end:false ], // meta map
|
||||
file(params.test_data['sarscov2']['illumina']['contigs_fasta'], checkIfExists: true) ]
|
||||
fasta_ext = 'fasta'
|
||||
|
||||
CHECKM_LINEAGEWF_FASTA ( input, fasta_ext, [] )
|
||||
|
||||
ch_checkmqa_input = CHECKM_LINEAGEWF_FASTA.out.checkm_output
|
||||
.join(CHECKM_LINEAGEWF_FASTA.out.marker_file)
|
||||
.map{
|
||||
meta, dir, marker ->
|
||||
[ meta, dir, marker, []]
|
||||
}
|
||||
|
||||
CHECKM_QA_FASTA ( ch_checkmqa_input, [] )
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
process {
|
||||
|
||||
publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" }
|
||||
|
||||
withName: CHECKM_QA {
|
||||
ext.prefix = { "${meta.id}.qa" }
|
||||
}
|
||||
|
||||
|
||||
withName: CHECKM_QA_FASTA {
|
||||
ext.args = "-o 9"
|
||||
ext.prefix = { "${meta.id}.qa" }
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
- name: checkm qa test_checkm_qa
|
||||
command: nextflow run ./tests/modules/checkm/qa -entry test_checkm_qa -c ./tests/config/nextflow.config -c ./tests/modules/checkm/qa/nextflow.config
|
||||
tags:
|
||||
- checkm/qa
|
||||
- checkm
|
||||
files:
|
||||
- path: output/checkm/test.qa.txt
|
||||
md5sum: 645f4282569afb4b171396732b2d2582
|
||||
|
||||
- name: checkm qa test_checkm_qa_fasta
|
||||
command: nextflow run ./tests/modules/checkm/qa -entry test_checkm_qa_fasta -c ./tests/config/nextflow.config -c ./tests/modules/checkm/qa/nextflow.config
|
||||
tags:
|
||||
- checkm/qa
|
||||
- checkm
|
||||
files:
|
||||
- path: output/checkm/test.qa.fasta
|
@ -0,0 +1,15 @@
|
||||
#!/usr/bin/env nextflow
|
||||
|
||||
nextflow.enable.dsl = 2
|
||||
|
||||
include { FCS_FCSADAPTOR } from '../../../../modules/fcs/fcsadaptor/main.nf'
|
||||
|
||||
workflow test_fcs_fcsadaptor {
|
||||
|
||||
input = [
|
||||
[ id:'test', single_end:false ], // meta map
|
||||
file(params.test_data['bacteroides_fragilis']['genome']['genome_fna_gz'], checkIfExists: true)
|
||||
]
|
||||
|
||||
FCS_FCSADAPTOR ( input )
|
||||
}
|
@ -0,0 +1,5 @@
|
||||
process {
|
||||
|
||||
publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" }
|
||||
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
- name: fcs fcsadaptor test_fcs_fcsadaptor
|
||||
command: nextflow run ./tests/modules/fcs/fcsadaptor -entry test_fcs_fcsadaptor -c ./tests/config/nextflow.config -c ./tests/modules/fcs/fcsadaptor/nextflow.config
|
||||
tags:
|
||||
- fcs/fcsadaptor
|
||||
- fcs
|
||||
files:
|
||||
- path: output/fcs/test.cleaned_sequences.fa.gz
|
||||
md5sum: 2f331e59b352418420a35236091bf93c
|
||||
- path: output/fcs/test.fcs_adaptor.log
|
||||
contains: ["Original command:", "Executing:", "INFO:cwltool:[workflow ] completed success"]
|
||||
- path: output/fcs/test.fcs_adaptor_report.txt
|
||||
md5sum: 27375be4671e01d2d2674ddd1d44414a
|
||||
- path: output/fcs/test.pipeline_args.yaml
|
||||
md5sum: 80effed2a75550a6a861c47f4c30449d
|
||||
- path: output/fcs/test.skipped_trims.jsonl
|
@ -0,0 +1,16 @@
|
||||
#!/usr/bin/env nextflow
|
||||
|
||||
nextflow.enable.dsl = 2
|
||||
|
||||
include { VCFLIB_VCFBREAKMULTI } from '../../../../modules/vcflib/vcfbreakmulti/main.nf'
|
||||
|
||||
workflow test_vcflib_vcfbreakmulti {
|
||||
|
||||
input = [
|
||||
[ id:'test', single_end:false ], // meta map
|
||||
file(params.test_data['sarscov2']['illumina']['test_vcf_gz'], checkIfExists: true),
|
||||
file(params.test_data['sarscov2']['illumina']['test_vcf_gz_tbi'], checkIfExists: true)
|
||||
]
|
||||
|
||||
VCFLIB_VCFBREAKMULTI ( input )
|
||||
}
|
@ -0,0 +1,5 @@
|
||||
process {
|
||||
|
||||
publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" }
|
||||
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
- name: vcflib vcfbreakmulti
|
||||
command: nextflow run ./tests/modules/vcflib/vcfbreakmulti -entry test_vcflib_vcfbreakmulti -c tests/config/nextflow.config
|
||||
tags:
|
||||
- vcflib/vcfbreakmulti
|
||||
- vcflib
|
||||
files:
|
||||
- path: output/vcflib/test.breakmulti.vcf.gz
|
||||
md5sum: 666d2d970399cf219dc1dc1eadff9170
|
||||
|
||||
- name: vcflib vcfbreakmulti stub
|
||||
command: nextflow run ./tests/modules/vcflib/vcfbreakmulti -entry test_vcflib_vcfbreakmulti -c tests/config/nextflow.config -stub
|
||||
tags:
|
||||
- vcflib/vcfbreakmulti
|
||||
- vcflib
|
||||
files:
|
||||
- path: output/vcflib/test.breakmulti.vcf.gz
|
Loading…
Reference in New Issue