update tiddit/cov + more tests

This commit is contained in:
MaxUlysse 2022-06-03 12:07:16 +02:00
parent 36ffd4fbf7
commit 40996cdbe1
5 changed files with 66 additions and 25 deletions

View file

@ -2,17 +2,17 @@ process TIDDIT_COV {
tag "$meta.id"
label 'process_low'
conda (params.enable_conda ? "bioconda::tiddit=2.12.1" : null)
conda (params.enable_conda ? "bioconda::tiddit=3.0.0" : null)
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/tiddit:2.12.1--py38h1773678_0' :
'quay.io/biocontainers/tiddit:2.12.1--py38h1773678_0' }"
'https://depot.galaxyproject.org/singularity/tiddit:3.0.0--py39h59fae87_1' :
'quay.io/biocontainers/tiddit:3.0.0--py39h59fae87_1' }"
input:
tuple val(meta), path(bam)
tuple val(meta), path(input)
path fasta
output:
tuple val(meta), path("*.tab"), optional: true, emit: cov
tuple val(meta), path("*.bed"), optional: true, emit: cov
tuple val(meta), path("*.wig"), optional: true, emit: wig
path "versions.yml" , emit: versions
@ -28,12 +28,12 @@ process TIDDIT_COV {
--cov \\
-o $prefix \\
$args \\
--bam $bam \\
--bam $input \\
$reference
cat <<-END_VERSIONS > versions.yml
"${task.process}":
tiddit: \$(echo \$(tiddit 2>&1) | sed 's/^.*TIDDIT-//; s/ .*\$//')
tiddit: \$(echo \$(tiddit 2>&1) | sed 's/^.*tiddit-//; s/ .*\$//')
END_VERSIONS
"""
@ -45,7 +45,7 @@ process TIDDIT_COV {
cat <<-END_VERSIONS > versions.yml
"${task.process}":
tiddit: \$(echo \$(tiddit 2>&1) | sed 's/^.*TIDDIT-//; s/ .*\$//')
tiddit: \$(echo \$(tiddit 2>&1) | sed 's/^.*tiddit-//; s/ .*\$//')
END_VERSIONS
"""
}

View file

@ -19,7 +19,7 @@ input:
description: |
Groovy Map containing sample information
e.g. [ id:'test', single_end:false ]
- bam:
- input:
type: file
description: BAM/CRAM file
pattern: "*.{bam,cram}"

View file

@ -2,22 +2,41 @@
nextflow.enable.dsl = 2
include { TIDDIT_COV } from '../../../../modules/tiddit/cov/main.nf'
include { TIDDIT_COV as TIDDIT_COV_BED } from '../../../../modules/tiddit/cov/main.nf'
include { TIDDIT_COV as TIDDIT_COV_WIG } from '../../../../modules/tiddit/cov/main.nf'
workflow test_tiddit_cov {
workflow test_tiddit_cov_cram_bed {
input = [ [ id:'test', single_end:false ], // meta map
file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_cram'], checkIfExists: true) ]
fasta = file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true)
TIDDIT_COV_BED ( input, fasta )
}
workflow test_tiddit_cov_bam_bed {
input = [ [ id:'test', single_end:false ], // meta map
file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true) ]
fasta = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true)
TIDDIT_COV ( input, fasta )
TIDDIT_COV_BED ( input, [] )
}
workflow test_tiddit_cov_no_ref {
workflow test_tiddit_cov_cram_wig {
input = [ [ id:'test', single_end:false ], // meta map
file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_cram'], checkIfExists: true) ]
fasta = file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true)
TIDDIT_COV_WIG ( input, fasta )
}
workflow test_tiddit_cov_bam_wig {
input = [ [ id:'test', single_end:false ], // meta map
file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true) ]
TIDDIT_COV ( input, [] )
TIDDIT_COV_WIG ( input, [] )
}

View file

@ -2,4 +2,8 @@ process {
publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" }
withName: TIDDIT_COV_WIG {
ext.args = '-w'
}
}

View file

@ -1,17 +1,35 @@
- name: tiddit cov test_tiddit_cov
command: nextflow run ./tests/modules/tiddit/cov -entry test_tiddit_cov -c ./tests/config/nextflow.config -c ./tests/modules/tiddit/cov/nextflow.config
- name: tiddit cov test_tiddit_cov_cram_bed
command: nextflow run ./tests/modules/tiddit/cov -entry test_tiddit_cov_cram_bed -c ./tests/config/nextflow.config -c ./tests/modules/tiddit/cov/nextflow.config
tags:
- tiddit
- tiddit/cov
files:
- path: output/tiddit/test.tab
md5sum: f7974948f809f94879d8a60b726194f5
- path: output/tiddit/test.bed
md5sum: 3b1a28c62a5f25bbba77c1042e9abdf7
- name: tiddit cov test_tiddit_cov_no_ref
command: nextflow run ./tests/modules/tiddit/cov -entry test_tiddit_cov_no_ref -c ./tests/config/nextflow.config -c ./tests/modules/tiddit/cov/nextflow.config
- name: tiddit cov test_tiddit_cov_bam_bed
command: nextflow run ./tests/modules/tiddit/cov -entry test_tiddit_cov_bam_bed -c ./tests/config/nextflow.config -c ./tests/modules/tiddit/cov/nextflow.config
tags:
- tiddit
- tiddit/cov
files:
- path: output/tiddit/test.tab
md5sum: f7974948f809f94879d8a60b726194f5
- path: output/tiddit/test.bed
md5sum: 9d1474f1c7c6516205254077087bb026
- name: tiddit cov test_tiddit_cov_cram_wig
command: nextflow run ./tests/modules/tiddit/cov -entry test_tiddit_cov_cram_wig -c ./tests/config/nextflow.config -c ./tests/modules/tiddit/cov/nextflow.config
tags:
- tiddit
- tiddit/cov
files:
- path: output/tiddit/test.wig
md5sum: ca3645fd0c3491c86c075c91d16d57c4
- name: tiddit cov test_tiddit_cov_bam_wig
command: nextflow run ./tests/modules/tiddit/cov -entry test_tiddit_cov_bam_wig -c ./tests/config/nextflow.config -c ./tests/modules/tiddit/cov/nextflow.config
tags:
- tiddit
- tiddit/cov
files:
- path: output/tiddit/test.wig
md5sum: 44bea2ac6a56774738e65773065da670