Add task.ext.args to phantompeakqualtools and finish the module (#1474)

* Add --max--ppsize option

* Add args to phantompeakqualtools and all the missing files (test, yml, ...)

* Fix tests

* Add the nextflow.config

* Fix tests
This commit is contained in:
Jose Espinosa-Carrasco 2022-03-31 23:59:21 +02:00 committed by GitHub
parent 64b06baa06
commit 5e7daa7b96
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 118 additions and 1 deletions

View file

@ -26,7 +26,7 @@ process PHANTOMPEAKQUALTOOLS {
def prefix = task.ext.prefix ?: "${meta.id}"
"""
RUN_SPP=`which run_spp.R`
Rscript -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" -p=$task.cpus
cat <<-END_VERSIONS > versions.yml
"${task.process}":

View file

@ -0,0 +1,60 @@
name: "phantompeakqualtools"
description:
keywords:
- "ChIP-Seq"
- "QC"
- "phantom peaks"
tools:
- "phantompeakqualtools":
description: |
"This package computes informative enrichment and quality measures
for ChIP-seq/DNase-seq/FAIRE-seq/MNase-seq data. It can also be used
to obtain robust estimates of the predominant fragment length or
characteristic tag shift values in these assays."
homepage: "None"
documentation: "https://github.com/kundajelab/phantompeakqualtools"
tool_dev_url: "https://github.com/kundajelab/phantompeakqualtools"
doi: "https://doi.org/10.1101/gr.136184.111"
licence: "['BSD-3-clause']"
input:
- meta:
type: map
description: |
Groovy Map containing sample information
e.g. [ id:'test', single_end:false ]
- bam:
type: file
description: BAM/CRAM/SAM file
pattern: "*.{bam,cram,sam}"
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"
- spp:
type: file
description: |
A ChIP-Seq Processing Pipeline file containing
peakshift/phantomPeak results
pattern: "*.{out}"
- pdf:
type: file
description: A pdf containing save cross-correlation plots
pattern: "*.{pdf}"
- rdata:
type: file
description: Rdata file containing the R session
pattern: "*.{Rdata}"
authors:
- "@drpatelh"
- "@Emiller88"
- "@JoseEspinosa"

View file

@ -1303,6 +1303,10 @@ peddy:
- modules/peddy/**
- tests/modules/peddy/**
phantompeakqualtools:
- modules/phantompeakqualtools/**
- tests/modules/phantompeakqualtools/**
phyloflash:
- modules/phyloflash/**
- tests/modules/phyloflash/**

View file

@ -0,0 +1,25 @@
#!/usr/bin/env nextflow
nextflow.enable.dsl = 2
include { PHANTOMPEAKQUALTOOLS } from '../../../modules/phantompeakqualtools/main.nf'
workflow test_phantompeakqualtools_single_end {
input = [
[ id:'test', single_end:true ], // meta map
file(params.test_data['sarscov2']['illumina']['test_single_end_bam'], checkIfExists: true)
]
PHANTOMPEAKQUALTOOLS ( input )
}
workflow test_phantompeakqualtools_paired_end {
input = [
[ id:'test', single_end:false ], // meta map
file(params.test_data['sarscov2']['illumina']['test_paired_end_bam'], checkIfExists: true)
]
PHANTOMPEAKQUALTOOLS ( input )
}

View file

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

View file

@ -0,0 +1,23 @@
- name: phantompeakqualtools test_phantompeakqualtools_single_end
command: nextflow run tests/modules/phantompeakqualtools -entry test_phantompeakqualtools_single_end -c tests/config/nextflow.config
tags:
- phantompeakqualtools
files:
- path: output/phantompeakqualtools/test.spp.Rdata
- path: output/phantompeakqualtools/test.spp.out
md5sum: b01d976506b6fe45b66c821b1e8a1d15
- path: output/phantompeakqualtools/test.spp.pdf
- path: output/phantompeakqualtools/versions.yml
md5sum: 6c2ede1aac4c574e3c72fbe09f15c03f
- name: phantompeakqualtools test_phantompeakqualtools_paired_end
command: nextflow run tests/modules/phantompeakqualtools -entry test_phantompeakqualtools_paired_end -c tests/config/nextflow.config
tags:
- phantompeakqualtools
files:
- path: output/phantompeakqualtools/test.spp.Rdata
- path: output/phantompeakqualtools/test.spp.out
md5sum: eed46e75eab119224f397a7a8b5924e6
- path: output/phantompeakqualtools/test.spp.pdf
- path: output/phantompeakqualtools/versions.yml
md5sum: 383d2dd583fcb40451bde0d3840bdb72