diff --git a/modules/hmmcopy/generatemap/main.nf b/modules/hmmcopy/generatemap/main.nf index bedbffdb..1d248853 100644 --- a/modules/hmmcopy/generatemap/main.nf +++ b/modules/hmmcopy/generatemap/main.nf @@ -1,5 +1,5 @@ def VERSION = '0.1.1' - + process HMMCOPY_GENERATEMAP { tag '$bam' label 'process_long' diff --git a/modules/rseqc/tin/main.nf b/modules/rseqc/tin/main.nf new file mode 100644 index 00000000..4c449973 --- /dev/null +++ b/modules/rseqc/tin/main.nf @@ -0,0 +1,33 @@ +process RSEQC_TIN { + tag "$meta.id" + label 'process_medium' + + conda (params.enable_conda ? "bioconda::rseqc=3.0.1 'conda-forge::r-base>=3.5'" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/rseqc:3.0.1--py37h516909a_1' : + 'quay.io/biocontainers/rseqc:3.0.1--py37h516909a_1' }" + + input: + tuple val(meta), path(bam) + path bed + + output: + tuple val(meta), path("*.txt"), emit: txt + path "versions.yml" , emit: versions + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + """ + tin.py \\ + -i $bam \\ + -r $bed \\ + $args \\ + > ${prefix}.tin.txt + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + rseqc: \$(tin.py --version | sed -e "s/tin.py //g") + END_VERSIONS + """ +} diff --git a/modules/rseqc/tin/meta.yml b/modules/rseqc/tin/meta.yml new file mode 100644 index 00000000..2c711f30 --- /dev/null +++ b/modules/rseqc/tin/meta.yml @@ -0,0 +1,40 @@ +name: rseqc_tin +description: Calculte TIN (transcript integrity number) from RNA-seq reads +keywords: + - rnaseq + - transcript + - integrity +tools: + - rseqc: + description: | + RSeQC package provides a number of useful modules that can comprehensively evaluate + high throughput sequence data especially RNA-seq data. + homepage: http://rseqc.sourceforge.net/ + documentation: http://rseqc.sourceforge.net/ + doi: 10.1093/bioinformatics/bts356 + licence: ['GPL-3.0-or-later'] +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - bam: + type: file + description: Input BAM file + pattern: "*.{bam}" + - bed: + type: file + description: BED file containing the reference gene model + pattern: "*.{bed}" +output: + - txt: + type: file + description: tin.py results file + pattern: "*.tin.txt" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" +authors: + - "@drpatelh" diff --git a/tests/config/pytest_modules.yml b/tests/config/pytest_modules.yml index 74719a30..cc4356a7 100644 --- a/tests/config/pytest_modules.yml +++ b/tests/config/pytest_modules.yml @@ -270,21 +270,19 @@ cat/fastq: - modules/cat/fastq/** - tests/modules/cat/fastq/** -cellranger/gtf: # &cellranger/gtf - - modules/cellranger/gtf/** - - tests/modules/cellranger/gtf/** - -cellranger/mkref: # &cellranger/mkref - - modules/cellranger/mkref/** - - tests/modules/cellranger/mkref/** - # - *cellranger/gtf - - modules/cellranger/gtf/** - - tests/modules/cellranger/gtf/** - cellranger/count: - modules/cellranger/count/** - tests/modules/cellranger/count/** - # - *cellranger/mkref + - modules/cellranger/mkref/** + - tests/modules/cellranger/mkref/** + - modules/cellranger/gtf/** + - tests/modules/cellranger/gtf/** + +cellranger/gtf: + - modules/cellranger/gtf/** + - tests/modules/cellranger/gtf/** + +cellranger/mkref: - modules/cellranger/mkref/** - tests/modules/cellranger/mkref/** - modules/cellranger/gtf/** @@ -514,7 +512,7 @@ gatk4/bedtointervallist: - modules/gatk4/bedtointervallist/** - tests/modules/gatk4/bedtointervallist/** -gatk4/calculatecontamination: #&gatk4_calculatecontamination +gatk4/calculatecontamination: - modules/gatk4/calculatecontamination/** - tests/modules/gatk4/calculatecontamination/** @@ -522,7 +520,7 @@ gatk4/createsequencedictionary: - modules/gatk4/createsequencedictionary/** - tests/modules/gatk4/createsequencedictionary/** -gatk4/createsomaticpanelofnormals: #&gatk4_createsomaticpanelofnormals +gatk4/createsomaticpanelofnormals: - modules/gatk4/createsomaticpanelofnormals/** - tests/modules/gatk4/createsomaticpanelofnormals/** @@ -534,7 +532,7 @@ gatk4/fastqtosam: - modules/gatk4/fastqtosam/** - tests/modules/gatk4/fastqtosam/** -gatk4/filtermutectcalls: #&gatk4_filtermutectcalls +gatk4/filtermutectcalls: - modules/gatk4/filtermutectcalls/** - tests/modules/gatk4/filtermutectcalls/** @@ -542,7 +540,7 @@ gatk4/gatherbqsrreports: - modules/gatk4/gatherbqsrreports/** - tests/modules/gatk4/gatherbqsrreports/** -gatk4/genomicsdbimport: #&gatk4_genomicsdbimport +gatk4/genomicsdbimport: - modules/gatk4/genomicsdbimport/** - tests/modules/gatk4/genomicsdbimport/** @@ -550,7 +548,7 @@ gatk4/genotypegvcfs: - modules/gatk4/genotypegvcfs/** - tests/modules/gatk4/genotypegvcfs/** -gatk4/getpileupsummaries: #&gatk4_getpileupsummaries +gatk4/getpileupsummaries: - modules/gatk4/getpileupsummaries/** - tests/modules/gatk4/getpileupsummaries/** @@ -566,7 +564,7 @@ gatk4/intervallisttools: - modules/gatk4/intervallisttools/** - tests/modules/gatk4/intervallisttools/** -gatk4/learnreadorientationmodel: #&gatk4_learnreadorientationmodel +gatk4/learnreadorientationmodel: - modules/gatk4/learnreadorientationmodel/** - tests/modules/gatk4/learnreadorientationmodel/** @@ -582,7 +580,7 @@ gatk4/mergevcfs: - modules/gatk4/mergevcfs/** - tests/modules/gatk4/mergevcfs/** -gatk4/mutect2: #&gatk4_mutect2 +gatk4/mutect2: - modules/gatk4/mutect2/** - tests/modules/gatk4/mutect2/** @@ -1207,6 +1205,10 @@ rseqc/readduplication: - modules/rseqc/readduplication/** - tests/modules/rseqc/readduplication/** +rseqc/tin: + - modules/rseqc/tin/** + - tests/modules/rseqc/tin/** + salmon/index: - modules/salmon/index/** - tests/modules/salmon/index/** @@ -1251,7 +1253,7 @@ samtools/idxstats: - modules/samtools/idxstats/** - tests/modules/samtools/idxstats/** -samtools/index: #&samtools_index +samtools/index: - modules/samtools/index/** - tests/modules/samtools/index/** @@ -1263,7 +1265,7 @@ samtools/mpileup: - modules/samtools/mpileup/** - tests/modules/samtools/mpileup/** -samtools/sort: #&samtools_sort +samtools/sort: - modules/samtools/sort/** - tests/modules/samtools/sort/** @@ -1339,11 +1341,11 @@ spatyper: - modules/spatyper/** - tests/modules/spatyper/** -sratools/fasterqdump: #&sratools_fasterqdump +sratools/fasterqdump: - modules/sratools/fasterqdump/** - tests/modules/sratools/fasterqdump/** -sratools/prefetch: #&sratools_prefetch +sratools/prefetch: - modules/sratools/prefetch/** - tests/modules/sratools/prefetch/** @@ -1462,56 +1464,3 @@ yara/index: yara/mapper: - modules/yara/mapper/** - tests/modules/yara/mapper/** - -# subworkflows/align_bowtie2: -# - subworkflows/nf-core/align_bowtie2/** -# - tests/subworkflows/nf-core/align_bowtie2/** -# - *subworkflows_bam_sort_samtools - -# subworkflows/annotation_ensemblvep: &subworkflows_annotation_ensemblvep -# - subworkflows/nf-core/annotation_ensemblvep/** -# - tests/subworkflows/nf-core/annotation_ensemblvep/** - -# subworkflows/annotation_snpeff: &subworkflows_annotation_snpeff -# - subworkflows/nf-core/annotation_snpeff/** -# - tests/subworkflows/nf-core/annotation_snpeff/** - -# subworkflows/bam_stats_samtools: &subworkflows_bam_stats_samtools -# - subworkflows/nf-core/bam_stats_samtools/** -# - tests/subworkflows/nf-core/bam_stats_samtools/** - -# subworkflows/bam_sort_samtools: &subworkflows_bam_sort_samtools -# - subworkflows/nf-core/bam_sort_samtools/** -# - tests/subworkflows/nf-core/bam_sort_samtools/** -# - *samtools_sort -# - *samtools_index -# - *subworkflows_bam_stats_samtools - -# subworkflows/gatk_create_som_pon: -# - subworkflows/nf-core/gatk_create_som_pon/** -# - tests/subworkflows/nf-core/gatk_create_som_pon/** -# - *gatk4_genomicsdbimport -# - *gatk4_createsomaticpanelofnormals - -# subworkflows/gatk_tumor_normal_somatic_variant_calling: -# - subworkflows/nf-core/gatk_tumor_normal_somatic_variant_calling/** -# - tests/subworkflows/nf-core/gatk_tumor_normal_somatic_variant_calling/** -# - *gatk4_mutect2 -# - *gatk4_learnreadorientationmodel -# - *gatk4_getpileupsummaries -# - *gatk4_calculatecontamination -# - *gatk4_filtermutectcalls - -# subworkflows/gatk_tumor_only_somatic_variant_calling: -# - subworkflows/nf-core/gatk_tumor_only_somatic_variant_calling/** -# - tests/subworkflows/nf-core/gatk_tumor_only_somatic_variant_calling/** -# - *gatk4_mutect2 -# - *gatk4_getpileupsummaries -# - *gatk4_calculatecontamination -# - *gatk4_filtermutectcalls - -# subworkflows/sra_fastq: -# - subworkflows/nf-core/sra_fastq/** -# - tests/subworkflows/nf-core/sra_fastq/** -# - *sratools_fasterqdump -# - *sratools_prefetch diff --git a/tests/modules/rseqc/tin/main.nf b/tests/modules/rseqc/tin/main.nf new file mode 100644 index 00000000..9b987a8e --- /dev/null +++ b/tests/modules/rseqc/tin/main.nf @@ -0,0 +1,17 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { RSEQC_TIN } from '../../../../modules/rseqc/tin/main.nf' + +workflow test_rseqc_tin { + + input = [ + [ id:'test' ], // meta map + file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true) + ] + + bed = file(params.test_data['sarscov2']['genome']['test_bed'], checkIfExists: true) + + RSEQC_TIN ( input, bed ) +} diff --git a/tests/modules/rseqc/tin/nextflow.config b/tests/modules/rseqc/tin/nextflow.config new file mode 100644 index 00000000..50f50a7a --- /dev/null +++ b/tests/modules/rseqc/tin/nextflow.config @@ -0,0 +1,5 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + +} \ No newline at end of file diff --git a/tests/modules/rseqc/tin/test.yml b/tests/modules/rseqc/tin/test.yml new file mode 100644 index 00000000..f99ce7cc --- /dev/null +++ b/tests/modules/rseqc/tin/test.yml @@ -0,0 +1,7 @@ +- name: rseqc tin + command: nextflow run ./tests/modules/rseqc/tin -entry test_rseqc_tin -c ./tests/config/nextflow.config -c ./tests/modules/rseqc/tin/nextflow.config + tags: + - rseqc + - rseqc/tin + files: + - path: output/rseqc/test.tin.txt