Add RSeqC tin.py module (#1174)

* Add RSeqC tin.py module

* Fix EC lint for unrelated hmmcopy module

* Remove md5sum for empty file
This commit is contained in:
Harshil Patel 2021-12-15 21:26:43 +00:00 committed by GitHub
parent ae92159762
commit 67571c4e79
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 128 additions and 77 deletions

33
modules/rseqc/tin/main.nf Normal file
View file

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

View file

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

View file

@ -270,21 +270,19 @@ cat/fastq:
- modules/cat/fastq/** - modules/cat/fastq/**
- tests/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: cellranger/count:
- modules/cellranger/count/** - modules/cellranger/count/**
- tests/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/** - modules/cellranger/mkref/**
- tests/modules/cellranger/mkref/** - tests/modules/cellranger/mkref/**
- modules/cellranger/gtf/** - modules/cellranger/gtf/**
@ -514,7 +512,7 @@ gatk4/bedtointervallist:
- modules/gatk4/bedtointervallist/** - modules/gatk4/bedtointervallist/**
- tests/modules/gatk4/bedtointervallist/** - tests/modules/gatk4/bedtointervallist/**
gatk4/calculatecontamination: #&gatk4_calculatecontamination gatk4/calculatecontamination:
- modules/gatk4/calculatecontamination/** - modules/gatk4/calculatecontamination/**
- tests/modules/gatk4/calculatecontamination/** - tests/modules/gatk4/calculatecontamination/**
@ -522,7 +520,7 @@ gatk4/createsequencedictionary:
- modules/gatk4/createsequencedictionary/** - modules/gatk4/createsequencedictionary/**
- tests/modules/gatk4/createsequencedictionary/** - tests/modules/gatk4/createsequencedictionary/**
gatk4/createsomaticpanelofnormals: #&gatk4_createsomaticpanelofnormals gatk4/createsomaticpanelofnormals:
- modules/gatk4/createsomaticpanelofnormals/** - modules/gatk4/createsomaticpanelofnormals/**
- tests/modules/gatk4/createsomaticpanelofnormals/** - tests/modules/gatk4/createsomaticpanelofnormals/**
@ -534,7 +532,7 @@ gatk4/fastqtosam:
- modules/gatk4/fastqtosam/** - modules/gatk4/fastqtosam/**
- tests/modules/gatk4/fastqtosam/** - tests/modules/gatk4/fastqtosam/**
gatk4/filtermutectcalls: #&gatk4_filtermutectcalls gatk4/filtermutectcalls:
- modules/gatk4/filtermutectcalls/** - modules/gatk4/filtermutectcalls/**
- tests/modules/gatk4/filtermutectcalls/** - tests/modules/gatk4/filtermutectcalls/**
@ -542,7 +540,7 @@ gatk4/gatherbqsrreports:
- modules/gatk4/gatherbqsrreports/** - modules/gatk4/gatherbqsrreports/**
- tests/modules/gatk4/gatherbqsrreports/** - tests/modules/gatk4/gatherbqsrreports/**
gatk4/genomicsdbimport: #&gatk4_genomicsdbimport gatk4/genomicsdbimport:
- modules/gatk4/genomicsdbimport/** - modules/gatk4/genomicsdbimport/**
- tests/modules/gatk4/genomicsdbimport/** - tests/modules/gatk4/genomicsdbimport/**
@ -550,7 +548,7 @@ gatk4/genotypegvcfs:
- modules/gatk4/genotypegvcfs/** - modules/gatk4/genotypegvcfs/**
- tests/modules/gatk4/genotypegvcfs/** - tests/modules/gatk4/genotypegvcfs/**
gatk4/getpileupsummaries: #&gatk4_getpileupsummaries gatk4/getpileupsummaries:
- modules/gatk4/getpileupsummaries/** - modules/gatk4/getpileupsummaries/**
- tests/modules/gatk4/getpileupsummaries/** - tests/modules/gatk4/getpileupsummaries/**
@ -566,7 +564,7 @@ gatk4/intervallisttools:
- modules/gatk4/intervallisttools/** - modules/gatk4/intervallisttools/**
- tests/modules/gatk4/intervallisttools/** - tests/modules/gatk4/intervallisttools/**
gatk4/learnreadorientationmodel: #&gatk4_learnreadorientationmodel gatk4/learnreadorientationmodel:
- modules/gatk4/learnreadorientationmodel/** - modules/gatk4/learnreadorientationmodel/**
- tests/modules/gatk4/learnreadorientationmodel/** - tests/modules/gatk4/learnreadorientationmodel/**
@ -582,7 +580,7 @@ gatk4/mergevcfs:
- modules/gatk4/mergevcfs/** - modules/gatk4/mergevcfs/**
- tests/modules/gatk4/mergevcfs/** - tests/modules/gatk4/mergevcfs/**
gatk4/mutect2: #&gatk4_mutect2 gatk4/mutect2:
- modules/gatk4/mutect2/** - modules/gatk4/mutect2/**
- tests/modules/gatk4/mutect2/** - tests/modules/gatk4/mutect2/**
@ -1207,6 +1205,10 @@ rseqc/readduplication:
- modules/rseqc/readduplication/** - modules/rseqc/readduplication/**
- tests/modules/rseqc/readduplication/** - tests/modules/rseqc/readduplication/**
rseqc/tin:
- modules/rseqc/tin/**
- tests/modules/rseqc/tin/**
salmon/index: salmon/index:
- modules/salmon/index/** - modules/salmon/index/**
- tests/modules/salmon/index/** - tests/modules/salmon/index/**
@ -1251,7 +1253,7 @@ samtools/idxstats:
- modules/samtools/idxstats/** - modules/samtools/idxstats/**
- tests/modules/samtools/idxstats/** - tests/modules/samtools/idxstats/**
samtools/index: #&samtools_index samtools/index:
- modules/samtools/index/** - modules/samtools/index/**
- tests/modules/samtools/index/** - tests/modules/samtools/index/**
@ -1263,7 +1265,7 @@ samtools/mpileup:
- modules/samtools/mpileup/** - modules/samtools/mpileup/**
- tests/modules/samtools/mpileup/** - tests/modules/samtools/mpileup/**
samtools/sort: #&samtools_sort samtools/sort:
- modules/samtools/sort/** - modules/samtools/sort/**
- tests/modules/samtools/sort/** - tests/modules/samtools/sort/**
@ -1339,11 +1341,11 @@ spatyper:
- modules/spatyper/** - modules/spatyper/**
- tests/modules/spatyper/** - tests/modules/spatyper/**
sratools/fasterqdump: #&sratools_fasterqdump sratools/fasterqdump:
- modules/sratools/fasterqdump/** - modules/sratools/fasterqdump/**
- tests/modules/sratools/fasterqdump/** - tests/modules/sratools/fasterqdump/**
sratools/prefetch: #&sratools_prefetch sratools/prefetch:
- modules/sratools/prefetch/** - modules/sratools/prefetch/**
- tests/modules/sratools/prefetch/** - tests/modules/sratools/prefetch/**
@ -1462,56 +1464,3 @@ yara/index:
yara/mapper: yara/mapper:
- modules/yara/mapper/** - modules/yara/mapper/**
- tests/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

View file

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

View file

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

View file

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