add qualimap with cram files + remove val from qualimap/bam, instead use empty list as everywhere else (#1320)

Co-authored-by: Maxime U. Garcia <max.u.garcia@gmail.com>
This commit is contained in:
FriederikeHanssen 2022-02-18 09:43:53 +01:00 committed by GitHub
parent 3f364e2f31
commit e31f1ff3b1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 220 additions and 8 deletions

View file

@ -10,7 +10,6 @@ process QUALIMAP_BAMQC {
input: input:
tuple val(meta), path(bam) tuple val(meta), path(bam)
path gff path gff
val use_gff
output: output:
tuple val(meta), path("${prefix}"), emit: results tuple val(meta), path("${prefix}"), emit: results
@ -25,7 +24,7 @@ process QUALIMAP_BAMQC {
def collect_pairs = meta.single_end ? '' : '--collect-overlap-pairs' def collect_pairs = meta.single_end ? '' : '--collect-overlap-pairs'
def memory = task.memory.toGiga() + "G" def memory = task.memory.toGiga() + "G"
def regions = use_gff ? "--gff $gff" : '' def regions = gff ? "--gff $gff" : ''
def strandedness = 'non-strand-specific' def strandedness = 'non-strand-specific'
if (meta.strandedness == 'forward') { if (meta.strandedness == 'forward') {

View file

@ -29,9 +29,6 @@ input:
type: file type: file
description: Feature file with regions of interest description: Feature file with regions of interest
pattern: "*.{gff,gtf,bed}" pattern: "*.{gff,gtf,bed}"
- use_gff:
type: boolean
description: Specifies if feature file should be used or not
output: output:
- meta: - meta:
type: map type: map

View file

@ -0,0 +1,60 @@
process QUALIMAP_BAMQCCRAM {
tag "$meta.id"
label 'process_medium'
conda (params.enable_conda ? "bioconda::qualimap=2.2.2d bioconda::samtools=1.12" : null)
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/mulled-v2-d3934ca6bb4e61334891ffa2e9a4c87a530e3188:4bf11d12f2c3eccf1eb585097c0b6fd31c18c418-0' :
'quay.io/biocontainers/mulled-v2-d3934ca6bb4e61334891ffa2e9a4c87a530e3188:4bf11d12f2c3eccf1eb585097c0b6fd31c18c418-0' }"
input:
tuple val(meta), path(cram), path(crai)
path gff
path fasta
path fasta_fai
output:
tuple val(meta), path("${prefix}"), emit: results
path "versions.yml" , emit: versions
when:
task.ext.when == null || task.ext.when
script:
def args = task.ext.args ?: ''
prefix = task.ext.prefix ?: "${meta.id}"
def collect_pairs = meta.single_end ? '' : '--collect-overlap-pairs'
def memory = task.memory.toGiga() + "G"
def regions = gff ? "--gff $gff" : ''
def strandedness = 'non-strand-specific'
if (meta.strandedness == 'forward') {
strandedness = 'strand-specific-forward'
} else if (meta.strandedness == 'reverse') {
strandedness = 'strand-specific-reverse'
}
"""
unset DISPLAY
mkdir tmp
export _JAVA_OPTIONS=-Djava.io.tmpdir=./tmp
samtools view -hb -T ${fasta} ${cram} |
qualimap \\
--java-mem-size=$memory \\
bamqc \\
$args \\
-bam /dev/stdin \\
$regions \\
-p $strandedness \\
$collect_pairs \\
-outdir $prefix \\
-nt $task.cpus
cat <<-END_VERSIONS > versions.yml
"${task.process}":
qualimap: \$(echo \$(qualimap 2>&1) | sed 's/^.*QualiMap v.//; s/Built.*\$//')
samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//')
END_VERSIONS
"""
}

View file

@ -0,0 +1,51 @@
name: qualimap_bamqccram
description: Evaluate alignment data
keywords:
- quality control
- qc
- bam
tools:
- qualimap:
description: |
Qualimap 2 is a platform-independent application written in
Java and R that provides both a Graphical User Interface and
a command-line interface to facilitate the quality control of
alignment sequencing data and its derivatives like feature counts.
homepage: http://qualimap.bioinfo.cipf.es/
documentation: http://qualimap.conesalab.org/doc_html/index.html
doi: 10.1093/bioinformatics/bts503
licence: ["GPL-2.0-only"]
input:
- meta:
type: map
description: |
Groovy Map containing sample information
e.g. [ id:'test', single_end:false ]
- bacramm:
type: file
description: BAM file
pattern: "*.{bam}"
- gff:
type: file
description: Feature file with regions of interest
pattern: "*.{gff,gtf,bed}"
- fasta:
type: file
description: Reference file of cram file
pattern: "*.{fasta,fa,fna}"
output:
- meta:
type: map
description: |
Groovy Map containing sample information
e.g. [ id:'test', single_end:false ]
- results:
type: dir
description: Qualimap results dir
pattern: "*/*"
- versions:
type: file
description: File containing software versions
pattern: "versions.yml"
authors:
- "@FriederikeHanssen"

View file

@ -1233,6 +1233,10 @@ qualimap/bamqc:
- modules/qualimap/bamqc/** - modules/qualimap/bamqc/**
- tests/modules/qualimap/bamqc/** - tests/modules/qualimap/bamqc/**
qualimap/bamqccram:
- modules/qualimap/bamqccram/**
- tests/modules/qualimap/bamqccram/**
quast: quast:
- modules/quast/** - modules/quast/**
- tests/modules/quast/** - tests/modules/quast/**

View file

@ -8,8 +8,7 @@ workflow test_qualimap_bamqc {
input = [ [ id:'test', single_end:false ], // meta map input = [ [ id:'test', single_end:false ], // meta map
[ file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true) ] [ file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true) ]
] ]
gff = file("dummy_file.txt") gff = []
use_gff = false
QUALIMAP_BAMQC ( input, gff, use_gff ) QUALIMAP_BAMQC ( input, gff )
} }

View file

@ -0,0 +1,17 @@
#!/usr/bin/env nextflow
nextflow.enable.dsl = 2
include { QUALIMAP_BAMQCCRAM } from '../../../../modules/qualimap/bamqccram/main.nf'
workflow test_qualimap_bamqc {
input = [ [ id:'test', single_end:false ], // meta map
file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_cram'], checkIfExists: true),
file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_cram_crai'], checkIfExists: true)
]
gff = []
fasta = file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true)
fai = file(params.test_data['homo_sapiens']['genome']['genome_fasta_fai'], checkIfExists: true)
QUALIMAP_BAMQCCRAM ( input, gff, fasta, fai )
}

View file

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

View file

@ -0,0 +1,80 @@
- name: qualimap bamqccram test_qualimap_bamqc
command: nextflow run tests/modules/qualimap/bamqccram -entry test_qualimap_bamqc -c tests/config/nextflow.config
tags:
- qualimap/bamqccram
- qualimap
files:
- path: ./output/qualimap/test/qualimapReport.html
- path: ./output/qualimap/test/genome_results.txt
md5sum: 61d8b36507652fd7d7db9583de708161
- path: ./output/qualimap/test/css/plus.png
md5sum: 0125e6faa04e2cf0141a2d599d3bb220
- path: ./output/qualimap/test/css/down-pressed.png
md5sum: ebe8979581eda700fb234a73c661a4b9
- path: ./output/qualimap/test/css/underscore.js
md5sum: db5ba047a66617d4cd3e8c5099cc51db
- path: ./output/qualimap/test/css/ajax-loader.gif
md5sum: ae6667053ad118020b8e68ccf307b519
- path: ./output/qualimap/test/css/searchtools.js
md5sum: d550841adeedc8ed47c40ee607620937
- path: ./output/qualimap/test/css/up.png
- path: ./output/qualimap/test/css/file.png
- path: ./output/qualimap/test/css/up-pressed.png
- path: ./output/qualimap/test/css/down.png
- path: ./output/qualimap/test/css/minus.png
- path: ./output/qualimap/test/css/bgtop.png
- path: ./output/qualimap/test/css/comment.png
- path: ./output/qualimap/test/css/basic.css
md5sum: 25b2823342c0604924a2870eeb4e7e94
- path: ./output/qualimap/test/css/report.css
md5sum: 7a5f09eaf7c176f966f4e8854168b812
- path: ./output/qualimap/test/css/pygments.css
md5sum: d625a0adb949f181bd0d3f1432b0fa7f
- path: ./output/qualimap/test/css/comment-close.png
- path: ./output/qualimap/test/css/doctools.js
md5sum: 5ff571aa60e63f69c1890283e240ff8d
- path: ./output/qualimap/test/css/comment-bright.png
- path: ./output/qualimap/test/css/qualimap_logo_small.png
- path: ./output/qualimap/test/css/websupport.js
md5sum: 9e61e1e8a7433c56bd7e5a615affcf85
- path: ./output/qualimap/test/css/agogo.css
md5sum: bd757b1a7ce6fdc0288ba148680f4583
- path: ./output/qualimap/test/css/bgfooter.png
- path: ./output/qualimap/test/css/jquery.js
md5sum: 10092eee563dec2dca82b77d2cf5a1ae
- path: ./output/qualimap/test/raw_data_qualimapReport/insert_size_histogram.txt
md5sum: b7aeda7558e9b31f027f7dc530df90b8
- path: ./output/qualimap/test/raw_data_qualimapReport/mapped_reads_nucleotide_content.txt
md5sum: 42774c6edd6e36538acbdb6ffbd019c2
- path: ./output/qualimap/test/raw_data_qualimapReport/genome_fraction_coverage.txt
md5sum: 972a19d4846bf4e93ba32ae3dff5289c
- path: ./output/qualimap/test/raw_data_qualimapReport/mapping_quality_histogram.txt
md5sum: 4e3918da81202b52395a576f99c1a50f
- path: ./output/qualimap/test/raw_data_qualimapReport/insert_size_across_reference.txt
- path: ./output/qualimap/test/raw_data_qualimapReport/coverage_histogram.txt
md5sum: 353e74d2a6c4281686c9063de570a64d
- path: ./output/qualimap/test/raw_data_qualimapReport/mapping_quality_across_reference.txt
md5sum: 9bf33149528be9a0e154e4ba7cb89420
- path: ./output/qualimap/test/raw_data_qualimapReport/mapped_reads_gc-content_distribution.txt
md5sum: be36d9346a402ba580718497d5075d06
- path: ./output/qualimap/test/raw_data_qualimapReport/homopolymer_indels.txt
md5sum: b0e19fcfb60e5f039eb0986ef61ab3ed
- path: ./output/qualimap/test/raw_data_qualimapReport/duplication_rate_histogram.txt
md5sum: 76e80e4ce8d0e01bbd65f1c28f5a92e7
- path: ./output/qualimap/test/raw_data_qualimapReport/coverage_across_reference.txt
md5sum: b609d33a1f98d24aa84a04e60513cbee
- path: ./output/qualimap/test/raw_data_qualimapReport/mapped_reads_clipping_profile.txt
md5sum: 7c86f7b225b99bc60008d7e4e55d6adb
- path: ./output/qualimap/test/images_qualimapReport/genome_reads_content_per_read_position.png
- path: ./output/qualimap/test/images_qualimapReport/genome_gc_content_per_window.png
- path: ./output/qualimap/test/images_qualimapReport/genome_coverage_0to50_histogram.png
- path: ./output/qualimap/test/images_qualimapReport/genome_uniq_read_starts_histogram.png
- path: ./output/qualimap/test/images_qualimapReport/genome_mapping_quality_across_reference.png
- path: ./output/qualimap/test/images_qualimapReport/genome_coverage_histogram.png
- path: ./output/qualimap/test/images_qualimapReport/genome_coverage_across_reference.png
- path: ./output/qualimap/test/images_qualimapReport/genome_homopolymer_indels.png
- path: ./output/qualimap/test/images_qualimapReport/genome_insert_size_histogram.png
- path: ./output/qualimap/test/images_qualimapReport/genome_mapping_quality_histogram.png
- path: ./output/qualimap/test/images_qualimapReport/genome_insert_size_across_reference.png
- path: ./output/qualimap/test/images_qualimapReport/genome_reads_clipping_profile.png
- path: ./output/qualimap/test/images_qualimapReport/genome_coverage_quotes.png