Merge branch 'master' into subwf/bam_qc

This commit is contained in:
Matthias De Smet 2022-04-28 22:12:48 +02:00 committed by GitHub
commit da94b776ef
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 180 additions and 9 deletions

View 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
"""
}

View 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"

View file

@ -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:

View file

@ -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

View file

@ -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 \\

View file

@ -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/**

View file

@ -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' {

View 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 )
}

View file

@ -0,0 +1,5 @@
process {
publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" }
}

View 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"

View file

@ -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 )
} }

View file

@ -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'
}
} }

View file

@ -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

View file

@ -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