Merge branch 'master' into tool/elprep-merge

This commit is contained in:
Matthias De Smet 2022-04-24 10:08:29 +02:00 committed by GitHub
commit 978f665c0a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
18 changed files with 177 additions and 35 deletions

View file

@ -4,8 +4,8 @@ process CAT_FASTQ {
conda (params.enable_conda ? "conda-forge::sed=4.7" : null)
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://containers.biocontainers.pro/s3/SingImgsRepo/biocontainers/v1.2.0_cv1/biocontainers_v1.2.0_cv1.img' :
'biocontainers/biocontainers:v1.2.0_cv1' }"
'https://depot.galaxyproject.org/singularity/ubuntu:20.04' :
'ubuntu:20.04' }"
input:
tuple val(meta), path(reads, stageAs: "input*/*")

41
modules/gamma/main.nf Normal file
View file

@ -0,0 +1,41 @@
def VERSION = '2.1' // Version information not provided by tool on CLI
process GAMMA {
tag "$meta.id"
label 'process_low'
conda (params.enable_conda ? "bioconda::gamma=2.1" : null)
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/gamma%3A2.1--hdfd78af_0':
'quay.io/biocontainers/gamma:2.1--hdfd78af_0' }"
input:
tuple val(meta), path(fasta)
path(db)
output:
tuple val(meta), path("*.gamma") , emit: gamma
tuple val(meta), path("*.psl") , emit: psl
tuple val(meta), path("*.gff") , optional:true , emit: gff
tuple val(meta), path("*.fasta"), optional:true , emit: fasta
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}"
"""
GAMMA.py \\
$args \\
$fasta \\
$db \\
$prefix
cat <<-END_VERSIONS > versions.yml
"${task.process}":
gamma: $VERSION
END_VERSIONS
"""
}

63
modules/gamma/meta.yml Normal file
View file

@ -0,0 +1,63 @@
name: "gamma"
description: Gene Allele Mutation Microbial Assessment
keywords:
- gamma
- gene-calling
tools:
- "gamma":
description: "Tool for Gene Allele Mutation Microbial Assessment"
homepage: "https://github.com/rastanton/GAMMA"
documentation: "https://github.com/rastanton/GAMMA"
tool_dev_url: "https://github.com/rastanton/GAMMA"
doi: "10.1093/bioinformatics/btab607"
licence: "['Apache License 2.0']"
input:
- meta:
type: map
description: |
Groovy Map containing sample information
e.g. [ id:'test', single_end:false ]
- fasta:
type: file
description: FASTA file
pattern: "*.{fa,fasta}"
- db:
type: file
description: Database in FASTA format
pattern: "*.{fa,fasta}"
output:
- meta:
type: map
description: |
Groovy Map containing sample information
e.g. [ id:'test', single_end:false ]
- versions:
type: file
description: File containing software versions
pattern: "versions.yml"
- gamma:
type: file
description: GAMMA file with annotated gene matches
pattern: "*.{gamma}"
- psl:
type: file
description: PSL file with all gene matches found
pattern: "*.{psl}"
- gff:
type: file
description: GFF file
pattern: "*.{gff}"
- fasta:
type: file
description: multifasta file of the gene matches
pattern: "*.{fasta}"
authors:
- "@sateeshperi"
- "@rastanton"

View file

@ -4,8 +4,8 @@ process GUNZIP {
conda (params.enable_conda ? "conda-forge::sed=4.7" : null)
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://containers.biocontainers.pro/s3/SingImgsRepo/biocontainers/v1.2.0_cv1/biocontainers_v1.2.0_cv1.img' :
'biocontainers/biocontainers:v1.2.0_cv1' }"
'https://depot.galaxyproject.org/singularity/ubuntu:20.04' :
'ubuntu:20.04' }"
input:
tuple val(meta), path(archive)

View file

@ -26,7 +26,7 @@ process PHANTOMPEAKQUALTOOLS {
def prefix = task.ext.prefix ?: "${meta.id}"
"""
RUN_SPP=`which run_spp.R`
Rscript $args -e "library(caTools); source(\\"\$RUN_SPP\\")" -c="$bam" -savp="${prefix}.spp.pdf" -savd="${prefix}.spp.Rdata" -out="${prefix}.spp.out" -p=$task.cpus
Rscript $args -e "library(caTools); source(\\"\$RUN_SPP\\")" -c="$bam" -savp="${prefix}.spp.pdf" -savd="${prefix}.spp.Rdata" -out="${prefix}.spp.out"
cat <<-END_VERSIONS > versions.yml
"${task.process}":

View file

@ -2,10 +2,10 @@ process STRINGTIE_MERGE {
label 'process_medium'
// Note: 2.7X indices incompatible with AWS iGenomes.
conda (params.enable_conda ? "bioconda::stringtie=2.1.7" : null)
conda (params.enable_conda ? "bioconda::stringtie=2.2.1" : null)
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/stringtie:2.1.7--h978d192_0' :
'quay.io/biocontainers/stringtie:2.1.7--h978d192_0' }"
'https://depot.galaxyproject.org/singularity/stringtie:2.2.1--hecb563c_2' :
'quay.io/biocontainers/stringtie:2.2.1--hecb563c_2' }"
input:
path stringtie_gtf

View file

@ -1,11 +1,11 @@
process STRINGTIE {
process STRINGTIE_STRINGTIE {
tag "$meta.id"
label 'process_medium'
conda (params.enable_conda ? "bioconda::stringtie=2.1.7" : null)
conda (params.enable_conda ? "bioconda::stringtie=2.2.1" : null)
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/stringtie:2.1.7--h978d192_0' :
'quay.io/biocontainers/stringtie:2.1.7--h978d192_0' }"
'https://depot.galaxyproject.org/singularity/stringtie:2.2.1--hecb563c_2' :
'quay.io/biocontainers/stringtie:2.2.1--hecb563c_2' }"
input:
tuple val(meta), path(bam)

View file

@ -1,4 +1,4 @@
name: stringtie
name: stringtie_stringtie
description: Transcript assembly and quantification for RNA-Se
keywords:
- transcript

View file

@ -2,10 +2,10 @@ process UNTAR {
tag "$archive"
label 'process_low'
conda (params.enable_conda ? "conda-forge::tar=1.34" : null)
conda (params.enable_conda ? "conda-forge::sed=4.7" : null)
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://containers.biocontainers.pro/s3/SingImgsRepo/biocontainers/v1.2.0_cv2/biocontainers_v1.2.0_cv2.img' :
'biocontainers/biocontainers:v1.2.0_cv2' }"
'https://depot.galaxyproject.org/singularity/ubuntu:20.04' :
'ubuntu:20.04' }"
input:
tuple val(meta), path(archive)

View file

@ -679,6 +679,10 @@ freebayes:
- modules/freebayes/**
- tests/modules/freebayes/**
gamma:
- modules/gamma/**
- tests/modules/gamma/**
gatk4/applybqsr:
- modules/gatk4/applybqsr/**
- tests/modules/gatk4/applybqsr/**

View file

@ -335,6 +335,7 @@ params {
'bacteroides_fragilis' {
'genome' {
genome_fna_gz = "${test_data_dir}/genomics/prokaryotes/bacteroides_fragilis/genome/genome.fna.gz"
genome_gbff_gz = "${test_data_dir}/genomics/prokaryotes/bacteroides_fragilis/genome/genome.gbff.gz"
genome_paf = "${test_data_dir}/genomics/prokaryotes/bacteroides_fragilis/genome/genome.paf"
genome_mapping_potential_arg = "${test_data_dir}/genomics/prokaryotes/bacteroides_fragilis/genome/genome.mapping.potential.ARG"

View file

@ -0,0 +1,17 @@
#!/usr/bin/env nextflow
nextflow.enable.dsl = 2
include { GAMMA } from '../../../modules/gamma/main.nf'
workflow test_gamma {
input = [
[ id:'test', single_end:false ], // meta map
file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true)
]
db = [ file(params.test_data['sarscov2']['genome']['transcriptome_fasta'], checkIfExists: true) ]
GAMMA ( input, db )
}

View file

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

View file

@ -0,0 +1,13 @@
- name: gamma test_gamma
command: nextflow run tests/modules/gamma -entry test_gamma -c tests/config/nextflow.config
tags:
- gamma
files:
- path: output/gamma/test.fasta
md5sum: df37b48466181311e0a679f3c5878484
- path: output/gamma/test.gamma
md5sum: 3256708fa517a65ed01d99e0e3c762ae
- path: output/gamma/test.psl
md5sum: 162a2757ed3b167ae1e0cdb24213f940
- path: output/gamma/versions.yml
md5sum: 3fefb5b46c94993362243c5f9a472057

View file

@ -2,8 +2,8 @@
nextflow.enable.dsl = 2
include { STRINGTIE } from '../../../../modules/stringtie/stringtie/main.nf'
include { STRINGTIE_MERGE } from '../../../../modules/stringtie/merge/main.nf'
include { STRINGTIE_STRINGTIE } from '../../../../modules/stringtie/stringtie/main.nf'
include { STRINGTIE_MERGE } from '../../../../modules/stringtie/merge/main.nf'
/*
* Test with forward strandedness
@ -15,8 +15,8 @@ workflow test_stringtie_forward_merge {
]
annotation_gtf = file(params.test_data['homo_sapiens']['genome']['genome_gtf'], checkIfExists: true)
STRINGTIE ( input, annotation_gtf )
STRINGTIE
STRINGTIE_STRINGTIE ( input, annotation_gtf )
STRINGTIE_STRINGTIE
.out
.transcript_gtf
.map { it -> it[1] }
@ -35,8 +35,8 @@ workflow test_stringtie_reverse_merge {
]
annotation_gtf = file(params.test_data['homo_sapiens']['genome']['genome_gtf'], checkIfExists: true)
STRINGTIE ( input, annotation_gtf )
STRINGTIE
STRINGTIE_STRINGTIE ( input, annotation_gtf )
STRINGTIE_STRINGTIE
.out
.transcript_gtf
.map { it -> it[1] }

View file

@ -5,7 +5,7 @@
- stringtie/merge
files:
- path: output/stringtie/stringtie.merged.gtf
md5sum: 9fab7049ef2eafdea246fc787d1def40
md5sum: d959eb2fab0db48ded7275e0a2e83c05
- path: output/stringtie/test.ballgown/e2t.ctab
md5sum: 9ae42e056c955a88a883e5e917840d77
- path: output/stringtie/test.ballgown/e_data.ctab
@ -17,11 +17,10 @@
- path: output/stringtie/test.ballgown/t_data.ctab
md5sum: 92a98902784e7406ffe054d2adbabc7c
- path: output/stringtie/test.coverage.gtf
md5sum: d41d8cd98f00b204e9800998ecf8427e
- path: output/stringtie/test.gene.abundance.txt
md5sum: 9708811bcefe0f6384293d6f419f3250
md5sum: 8bcd8e2730ed3337e2730186dbc184f3
- path: output/stringtie/test.transcripts.gtf
md5sum: 0e42709bfe30c2c7f2574ba664f5fa9f
md5sum: a914bd55b68a4b5f607738b17861e362
- name: stringtie merge test_stringtie_reverse_merge
command: nextflow run ./tests/modules/stringtie/merge -entry test_stringtie_reverse_merge -c ./tests/config/nextflow.config -c ./tests/modules/stringtie/merge/nextflow.config
@ -30,7 +29,7 @@
- stringtie/merge
files:
- path: output/stringtie/stringtie.merged.gtf
md5sum: afc461bb3cbc368f268a7a45c1b54497
md5sum: 6da479298d73d5b3216d4e1576a2bdf4
- path: output/stringtie/test.ballgown/e2t.ctab
md5sum: 9ae42e056c955a88a883e5e917840d77
- path: output/stringtie/test.ballgown/e_data.ctab
@ -42,8 +41,7 @@
- path: output/stringtie/test.ballgown/t_data.ctab
md5sum: 92a98902784e7406ffe054d2adbabc7c
- path: output/stringtie/test.coverage.gtf
md5sum: d41d8cd98f00b204e9800998ecf8427e
- path: output/stringtie/test.gene.abundance.txt
md5sum: 94b85145d60ab1b80a7f0f6cf08418b0
md5sum: f289f41b3ba1b9f0aa05d14408f1a5da
- path: output/stringtie/test.transcripts.gtf
md5sum: 3196e3d50fd461aae6408e0a70acae68
md5sum: 9dcdc9577c0fdbb25089eda210267546

View file

@ -2,7 +2,7 @@
nextflow.enable.dsl = 2
include { STRINGTIE } from '../../../../modules/stringtie/stringtie/main.nf'
include { STRINGTIE_STRINGTIE } from '../../../../modules/stringtie/stringtie/main.nf'
//
// Test with forward strandedness
//
@ -13,7 +13,7 @@ workflow test_stringtie_forward {
]
annotation_gtf = file(params.test_data['sarscov2']['genome']['genome_gtf'], checkIfExists: true)
STRINGTIE ( input, annotation_gtf )
STRINGTIE_STRINGTIE ( input, annotation_gtf )
}
//
@ -26,5 +26,5 @@ workflow test_stringtie_reverse {
]
annotation_gtf = file(params.test_data['sarscov2']['genome']['genome_gtf'], checkIfExists: true)
STRINGTIE ( input, annotation_gtf )
STRINGTIE_STRINGTIE ( input, annotation_gtf )
}

View file

@ -8,7 +8,6 @@
- path: ./output/stringtie/test.gene.abundance.txt
md5sum: 7d8bce7f2a922e367cedccae7267c22e
- path: ./output/stringtie/test.coverage.gtf
md5sum: d41d8cd98f00b204e9800998ecf8427e
- path: ./output/stringtie/test.ballgown/e_data.ctab
md5sum: 6b4cf69bc03f3f69890f972a0e8b7471
- path: ./output/stringtie/test.ballgown/i_data.ctab
@ -30,7 +29,6 @@
- path: ./output/stringtie/test.gene.abundance.txt
md5sum: 7385b870b955dae2c2ab78a70cf05cce
- path: ./output/stringtie/test.coverage.gtf
md5sum: d41d8cd98f00b204e9800998ecf8427e
- path: ./output/stringtie/test.ballgown/e_data.ctab
md5sum: 879b6696029d19c4737b562e9d149218
- path: ./output/stringtie/test.ballgown/i_data.ctab