mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2024-11-14 13:43:09 +00:00
Merge branch 'master' into subwf/bam_qc
This commit is contained in:
commit
da94b776ef
14 changed files with 180 additions and 9 deletions
34
modules/krona/ktimporttext/main.nf
Normal file
34
modules/krona/ktimporttext/main.nf
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
process KRONA_KTIMPORTTEXT {
|
||||||
|
tag "$meta.id"
|
||||||
|
label 'process_low'
|
||||||
|
|
||||||
|
conda (params.enable_conda ? "bioconda::krona=2.8.1" : null)
|
||||||
|
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
||||||
|
'https://depot.galaxyproject.org/singularity/krona:2.8.1--pl5321hdfd78af_1':
|
||||||
|
'quay.io/biocontainers/krona:2.8.1--pl5321hdfd78af_1' }"
|
||||||
|
|
||||||
|
input:
|
||||||
|
tuple val(meta), path(report)
|
||||||
|
|
||||||
|
output:
|
||||||
|
tuple val(meta), path ('*.html'), emit: html
|
||||||
|
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}"
|
||||||
|
"""
|
||||||
|
ktImportText \\
|
||||||
|
$args \\
|
||||||
|
-o ${prefix}.html \\
|
||||||
|
$report
|
||||||
|
|
||||||
|
cat <<-END_VERSIONS > versions.yml
|
||||||
|
"${task.process}":
|
||||||
|
krona: \$( echo \$(ktImportText 2>&1) | sed 's/^.*KronaTools //g; s/- ktImportText.*\$//g')
|
||||||
|
END_VERSIONS
|
||||||
|
"""
|
||||||
|
}
|
47
modules/krona/ktimporttext/meta.yml
Normal file
47
modules/krona/ktimporttext/meta.yml
Normal file
|
@ -0,0 +1,47 @@
|
||||||
|
name: "krona_ktimporttext"
|
||||||
|
description: Creates a Krona chart from text files listing quantities and lineages.
|
||||||
|
keywords:
|
||||||
|
- plot
|
||||||
|
- taxonomy
|
||||||
|
- interactive
|
||||||
|
- html
|
||||||
|
- visualisation
|
||||||
|
- krona chart
|
||||||
|
- metagenomics
|
||||||
|
tools:
|
||||||
|
- krona:
|
||||||
|
description: Krona Tools is a set of scripts to create Krona charts from several Bioinformatics tools as well as from text and XML files.
|
||||||
|
homepage: https://github.com/marbl/Krona/wiki/KronaTools
|
||||||
|
documentation: http://manpages.ubuntu.com/manpages/impish/man1/ktImportTaxonomy.1.html
|
||||||
|
tool_dev_url: https://github.com/marbl/Krona
|
||||||
|
doi: 10.1186/1471-2105-12-385
|
||||||
|
licence: https://raw.githubusercontent.com/marbl/Krona/master/KronaTools/LICENSE.txt
|
||||||
|
|
||||||
|
input:
|
||||||
|
- meta:
|
||||||
|
type: map
|
||||||
|
description: |
|
||||||
|
Groovy Map containing sample information
|
||||||
|
e.g. [ id:'test']
|
||||||
|
- report:
|
||||||
|
type: file
|
||||||
|
description: "Tab-delimited text file. Each line should be a number followed by a list of wedges to contribute to (starting from the highest level). If no wedges are listed (and just a quantity is given), it will contribute to the top level. If the same lineage is listed more than once, the values will be added. Quantities can be omitted if -q is specified. Lines beginning with '#' will be ignored."
|
||||||
|
pattern: "*.{txt}"
|
||||||
|
|
||||||
|
output:
|
||||||
|
- meta:
|
||||||
|
type: map
|
||||||
|
description: |
|
||||||
|
Groovy Map containing sample information
|
||||||
|
e.g. [ id:'test' ]
|
||||||
|
- versions:
|
||||||
|
type: file
|
||||||
|
description: File containing software versions
|
||||||
|
pattern: "versions.yml"
|
||||||
|
- html:
|
||||||
|
type: file
|
||||||
|
description: A html file containing an interactive krona plot.
|
||||||
|
pattern: "*.{html}"
|
||||||
|
|
||||||
|
authors:
|
||||||
|
- "@jianhong"
|
|
@ -11,7 +11,8 @@ process TABIX_TABIX {
|
||||||
tuple val(meta), path(tab)
|
tuple val(meta), path(tab)
|
||||||
|
|
||||||
output:
|
output:
|
||||||
tuple val(meta), path("*.tbi"), emit: tbi
|
tuple val(meta), path("*.tbi"), optional:true, emit: tbi
|
||||||
|
tuple val(meta), path("*.csi"), optional:true, emit: csi
|
||||||
path "versions.yml" , emit: versions
|
path "versions.yml" , emit: versions
|
||||||
|
|
||||||
when:
|
when:
|
||||||
|
|
|
@ -31,6 +31,10 @@ output:
|
||||||
type: file
|
type: file
|
||||||
description: tabix index file
|
description: tabix index file
|
||||||
pattern: "*.{tbi}"
|
pattern: "*.{tbi}"
|
||||||
|
- csi:
|
||||||
|
type: file
|
||||||
|
description: coordinate sorted index file
|
||||||
|
pattern: "*.{csi}"
|
||||||
- versions:
|
- versions:
|
||||||
type: file
|
type: file
|
||||||
description: File containing software versions
|
description: File containing software versions
|
||||||
|
|
|
@ -24,7 +24,7 @@ process TIDDIT_SV {
|
||||||
script:
|
script:
|
||||||
def args = task.ext.args ?: ''
|
def args = task.ext.args ?: ''
|
||||||
def prefix = task.ext.prefix ?: "${meta.id}"
|
def prefix = task.ext.prefix ?: "${meta.id}"
|
||||||
def reference = fasta == "dummy_file.txt" ? "--ref $fasta" : ""
|
def reference = fasta ? "--ref $fasta" : ""
|
||||||
"""
|
"""
|
||||||
tiddit \\
|
tiddit \\
|
||||||
--sv \\
|
--sv \\
|
||||||
|
|
|
@ -1050,6 +1050,10 @@ krona/ktimporttaxonomy:
|
||||||
- modules/krona/ktimporttaxonomy/**
|
- modules/krona/ktimporttaxonomy/**
|
||||||
- tests/modules/krona/ktimporttaxonomy/**
|
- tests/modules/krona/ktimporttaxonomy/**
|
||||||
|
|
||||||
|
krona/ktimporttext:
|
||||||
|
- modules/krona/ktimporttext/**
|
||||||
|
- tests/modules/krona/ktimporttext/**
|
||||||
|
|
||||||
last/dotplot:
|
last/dotplot:
|
||||||
- modules/last/dotplot/**
|
- modules/last/dotplot/**
|
||||||
- tests/modules/last/dotplot/**
|
- tests/modules/last/dotplot/**
|
||||||
|
|
|
@ -109,6 +109,9 @@ params {
|
||||||
|
|
||||||
test_sequencing_summary = "${test_data_dir}/genomics/sarscov2/nanopore/sequencing_summary/test.sequencing_summary.txt"
|
test_sequencing_summary = "${test_data_dir}/genomics/sarscov2/nanopore/sequencing_summary/test.sequencing_summary.txt"
|
||||||
}
|
}
|
||||||
|
'metagenome' {
|
||||||
|
kraken_report = "${test_data_dir}/genomics/sarscov2/metagenome/test_1.kraken2.report.txt"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
'homo_sapiens' {
|
'homo_sapiens' {
|
||||||
'genome' {
|
'genome' {
|
||||||
|
|
31
tests/modules/krona/ktimporttext/main.nf
Normal file
31
tests/modules/krona/ktimporttext/main.nf
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
#!/usr/bin/env nextflow
|
||||||
|
|
||||||
|
nextflow.enable.dsl = 2
|
||||||
|
|
||||||
|
include { KRONA_KTIMPORTTEXT } from '../../../../modules/krona/ktimporttext/main.nf'
|
||||||
|
|
||||||
|
workflow test_krona_ktimporttext_multi {
|
||||||
|
|
||||||
|
input = [
|
||||||
|
[ id:'test', single_end:false ], // meta map
|
||||||
|
[
|
||||||
|
file('https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/delete_me/krona/ktimporttext.txt', checkIfExists: true), // krona default test file
|
||||||
|
file(params.test_data['sarscov2']['metagenome']['kraken_report'], checkIfExists: true), //Kraken2 report file
|
||||||
|
file('https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/delete_me/krona/kaiju_out4krona.txt', checkIfExists: true) // Kaiju output 4 krona
|
||||||
|
]
|
||||||
|
]
|
||||||
|
|
||||||
|
KRONA_KTIMPORTTEXT ( input )
|
||||||
|
}
|
||||||
|
|
||||||
|
workflow test_krona_ktimporttext_single {
|
||||||
|
|
||||||
|
input = [
|
||||||
|
[ id:'test', single_end:false ], // meta map
|
||||||
|
[
|
||||||
|
file('http://krona.sourceforge.net/examples/text.txt', checkIfExists: true) // krona default test file
|
||||||
|
]
|
||||||
|
]
|
||||||
|
|
||||||
|
KRONA_KTIMPORTTEXT ( input )
|
||||||
|
}
|
5
tests/modules/krona/ktimporttext/nextflow.config
Normal file
5
tests/modules/krona/ktimporttext/nextflow.config
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
process {
|
||||||
|
|
||||||
|
publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" }
|
||||||
|
|
||||||
|
}
|
19
tests/modules/krona/ktimporttext/test.yml
Normal file
19
tests/modules/krona/ktimporttext/test.yml
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
- name: krona ktimporttext test_krona_ktimporttext_multi
|
||||||
|
command: nextflow run tests/modules/krona/ktimporttext -entry test_krona_ktimporttext_multi -c tests/config/nextflow.config
|
||||||
|
tags:
|
||||||
|
- krona
|
||||||
|
- krona/ktimporttext
|
||||||
|
files:
|
||||||
|
- path: output/krona/test.html
|
||||||
|
contains:
|
||||||
|
- "DOCTYPE html PUBLIC"
|
||||||
|
|
||||||
|
- name: krona ktimporttext test_krona_ktimporttext_single
|
||||||
|
command: nextflow run tests/modules/krona/ktimporttext -entry test_krona_ktimporttext_single -c tests/config/nextflow.config
|
||||||
|
tags:
|
||||||
|
- krona
|
||||||
|
- krona/ktimporttext
|
||||||
|
files:
|
||||||
|
- path: output/krona/test.html
|
||||||
|
contains:
|
||||||
|
- "DOCTYPE html PUBLIC"
|
|
@ -4,7 +4,8 @@ nextflow.enable.dsl = 2
|
||||||
|
|
||||||
include { TABIX_TABIX as TABIX_BED } from '../../../../modules/tabix/tabix/main.nf'
|
include { TABIX_TABIX as TABIX_BED } from '../../../../modules/tabix/tabix/main.nf'
|
||||||
include { TABIX_TABIX as TABIX_GFF } from '../../../../modules/tabix/tabix/main.nf'
|
include { TABIX_TABIX as TABIX_GFF } from '../../../../modules/tabix/tabix/main.nf'
|
||||||
include { TABIX_TABIX as TABIX_VCF } from '../../../../modules/tabix/tabix/main.nf'
|
include { TABIX_TABIX as TABIX_VCF_TBI } from '../../../../modules/tabix/tabix/main.nf'
|
||||||
|
include { TABIX_TABIX as TABIX_VCF_CSI } from '../../../../modules/tabix/tabix/main.nf'
|
||||||
|
|
||||||
workflow test_tabix_tabix_bed {
|
workflow test_tabix_tabix_bed {
|
||||||
input = [ [ id:'B.bed' ], // meta map
|
input = [ [ id:'B.bed' ], // meta map
|
||||||
|
@ -22,10 +23,18 @@ workflow test_tabix_tabix_gff {
|
||||||
TABIX_GFF ( input )
|
TABIX_GFF ( input )
|
||||||
}
|
}
|
||||||
|
|
||||||
workflow test_tabix_tabix_vcf {
|
workflow test_tabix_tabix_vcf_tbi {
|
||||||
input = [ [ id:'test.vcf' ], // meta map
|
input = [ [ id:'test.vcf' ], // meta map
|
||||||
[ file(params.test_data['sarscov2']['illumina']['test_vcf_gz'], checkIfExists: true) ]
|
[ file(params.test_data['sarscov2']['illumina']['test_vcf_gz'], checkIfExists: true) ]
|
||||||
]
|
]
|
||||||
|
|
||||||
TABIX_VCF ( input )
|
TABIX_VCF_TBI ( input )
|
||||||
|
}
|
||||||
|
|
||||||
|
workflow test_tabix_tabix_vcf_csi {
|
||||||
|
input = [ [ id:'test.vcf' ], // meta map
|
||||||
|
[ file(params.test_data['sarscov2']['illumina']['test_vcf_gz'], checkIfExists: true) ]
|
||||||
|
]
|
||||||
|
|
||||||
|
TABIX_VCF_CSI ( input )
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,8 +10,12 @@ process {
|
||||||
ext.args = '-p gff'
|
ext.args = '-p gff'
|
||||||
}
|
}
|
||||||
|
|
||||||
withName: TABIX_VCF {
|
withName: TABIX_VCF_TBI {
|
||||||
ext.args = '-p vcf'
|
ext.args = '-p vcf'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
withName: TABIX_VCF_CSI {
|
||||||
|
ext.args = '-p vcf --csi'
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,10 +15,18 @@
|
||||||
- path: ./output/tabix/genome.gff3.gz.tbi
|
- path: ./output/tabix/genome.gff3.gz.tbi
|
||||||
md5sum: f79a67d95a98076e04fbe0455d825926
|
md5sum: f79a67d95a98076e04fbe0455d825926
|
||||||
- name: tabix tabix vcf
|
- name: tabix tabix vcf
|
||||||
command: nextflow run ./tests/modules/tabix/tabix -entry test_tabix_tabix_vcf -c ./tests/config/nextflow.config -c ./tests/modules/tabix/tabix/nextflow.config
|
command: nextflow run ./tests/modules/tabix/tabix -entry test_tabix_tabix_vcf_tbi -c ./tests/config/nextflow.config -c ./tests/modules/tabix/tabix/nextflow.config
|
||||||
tags:
|
tags:
|
||||||
- tabix
|
- tabix
|
||||||
- tabix/tabix
|
- tabix/tabix
|
||||||
files:
|
files:
|
||||||
- path: output/tabix/test.vcf.gz.tbi
|
- path: output/tabix/test.vcf.gz.tbi
|
||||||
md5sum: 36e11bf96ed0af4a92caa91a68612d64
|
md5sum: 36e11bf96ed0af4a92caa91a68612d64
|
||||||
|
- name: tabix tabix vcf csi
|
||||||
|
command: nextflow run ./tests/modules/tabix/tabix -entry test_tabix_tabix_vcf_csi -c ./tests/config/nextflow.config -c ./tests/modules/tabix/tabix/nextflow.config
|
||||||
|
tags:
|
||||||
|
- tabix
|
||||||
|
- tabix/tabix
|
||||||
|
files:
|
||||||
|
- path: output/tabix/test.vcf.gz.csi
|
||||||
|
md5sum: 5f930522d2b9dcdba2807b7da4dfa3fd
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
- path: output/tiddit/test.signals.tab
|
- path: output/tiddit/test.signals.tab
|
||||||
md5sum: dab4b2fec4ddf8eb1c23005b0770150e
|
md5sum: dab4b2fec4ddf8eb1c23005b0770150e
|
||||||
- path: output/tiddit/test.vcf
|
- path: output/tiddit/test.vcf
|
||||||
|
md5sum: bdce14ae8292bf3deb81f6f255baf859
|
||||||
|
|
||||||
- name: tiddit sv no ref
|
- name: tiddit sv no ref
|
||||||
command: nextflow run ./tests/modules/tiddit/sv -entry test_tiddit_sv_no_ref -c ./tests/config/nextflow.config -c ./tests/modules/tiddit/sv/nextflow.config
|
command: nextflow run ./tests/modules/tiddit/sv -entry test_tiddit_sv_no_ref -c ./tests/config/nextflow.config -c ./tests/modules/tiddit/sv/nextflow.config
|
||||||
|
@ -21,3 +22,4 @@
|
||||||
- path: output/tiddit/test.signals.tab
|
- path: output/tiddit/test.signals.tab
|
||||||
md5sum: dab4b2fec4ddf8eb1c23005b0770150e
|
md5sum: dab4b2fec4ddf8eb1c23005b0770150e
|
||||||
- path: output/tiddit/test.vcf
|
- path: output/tiddit/test.vcf
|
||||||
|
md5sum: 3d0e83a8199b2bdb81cfe3e6b12bf64b
|
||||||
|
|
Loading…
Reference in a new issue