mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2024-12-22 11:08:17 +00:00
Add samtools to homer/maketagdirectory to use bam files (#1437)
* fix(homer): Update dependancies for maketagdirectory Closes #1363 * test(homer): Add tests for bam usage * style(homer): Rename meta test * fix(homer): Update args order and add missing \\ * docs(homer): Add DESeq2 and edgeR Co-authored-by: FriederikeHanssen <Friederike.hanssen@qbic.uni-tuebingen.de> * test(homer): Update md5sum * test(homer): bam => sam * fix(homer): Use nextflow conda recipe instead of biocontainers with commas Co-authored-by: FriederikeHanssen <Friederike.hanssen@qbic.uni-tuebingen.de>
This commit is contained in:
parent
7111e571cc
commit
27936729f2
5 changed files with 81 additions and 23 deletions
|
@ -4,13 +4,13 @@ process HOMER_MAKETAGDIRECTORY {
|
||||||
tag "$meta.id"
|
tag "$meta.id"
|
||||||
label 'process_medium'
|
label 'process_medium'
|
||||||
|
|
||||||
conda (params.enable_conda ? "bioconda::homer=4.11=pl526hc9558a2_3" : null)
|
conda (params.enable_conda ? "bioconda::homer=4.11 bioconda::samtools=1.11 conda-forge::r-base=4.0.2 bioconda::bioconductor-deseq2=1.30.0 bioconda::bioconductor-edger=3.32.0 anaconda::perl=5.26.2" : null)
|
||||||
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
||||||
'https://depot.galaxyproject.org/singularity/homer:4.11--pl526hc9558a2_3' :
|
'https://depot.galaxyproject.org/singularity/mulled-v2-29293b111ffe5b4c1d1e14c711264aaed6b97b4a:594338b771cacf1623bd27772b5e12825f8835f2-0' :
|
||||||
'quay.io/biocontainers/homer:4.11--pl526hc9558a2_3' }"
|
'quay.io/biocontainers/mulled-v2-29293b111ffe5b4c1d1e14c711264aaed6b97b4a:594338b771cacf1623bd27772b5e12825f8835f2-0' }"
|
||||||
|
|
||||||
input:
|
input:
|
||||||
tuple val(meta), path(bed)
|
tuple val(meta), path(bam)
|
||||||
path fasta
|
path fasta
|
||||||
|
|
||||||
output:
|
output:
|
||||||
|
@ -26,13 +26,14 @@ process HOMER_MAKETAGDIRECTORY {
|
||||||
"""
|
"""
|
||||||
makeTagDirectory \\
|
makeTagDirectory \\
|
||||||
tag_dir \\
|
tag_dir \\
|
||||||
|
-genome $fasta \\
|
||||||
$args \\
|
$args \\
|
||||||
$bed \\
|
$bam
|
||||||
-genome $fasta
|
|
||||||
|
|
||||||
cat <<-END_VERSIONS > versions.yml
|
cat <<-END_VERSIONS > versions.yml
|
||||||
"${task.process}":
|
"${task.process}":
|
||||||
homer: $VERSION
|
homer: $VERSION
|
||||||
|
samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//')
|
||||||
END_VERSIONS
|
END_VERSIONS
|
||||||
"""
|
"""
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,6 +3,8 @@ description: Create a tag directory with the HOMER suite
|
||||||
keywords:
|
keywords:
|
||||||
- peaks
|
- peaks
|
||||||
- bed
|
- bed
|
||||||
|
- bam
|
||||||
|
- sam
|
||||||
tools:
|
tools:
|
||||||
- homer:
|
- homer:
|
||||||
description: |
|
description: |
|
||||||
|
@ -10,16 +12,41 @@ tools:
|
||||||
documentation: http://homer.ucsd.edu/homer/
|
documentation: http://homer.ucsd.edu/homer/
|
||||||
doi: 10.1016/j.molcel.2010.05.004.
|
doi: 10.1016/j.molcel.2010.05.004.
|
||||||
licence: ["GPL-3.0-or-later"]
|
licence: ["GPL-3.0-or-later"]
|
||||||
|
- samtools:
|
||||||
|
description: |
|
||||||
|
SAMtools is a set of utilities for interacting with and post-processing
|
||||||
|
short DNA sequence read alignments in the SAM, BAM and CRAM formats, written by Heng Li.
|
||||||
|
These files are generated as output by short read aligners like BWA.
|
||||||
|
homepage: http://www.htslib.org/
|
||||||
|
documentation: hhttp://www.htslib.org/doc/samtools.html
|
||||||
|
doi: 10.1093/bioinformatics/btp352
|
||||||
|
licence: ["MIT"]
|
||||||
|
- DESeq2:
|
||||||
|
description: |
|
||||||
|
Differential gene expression analysis based on the negative binomial distribution
|
||||||
|
homepage: "https://bioconductor.org/packages/DESeq2"
|
||||||
|
documentation: "https://bioconductor.org/packages/DESeq2"
|
||||||
|
tool_dev_url: "https://github.com/mikelove/DESeq2"
|
||||||
|
doi: 10.18129/B9.bioc.DESeq2
|
||||||
|
licence: ["LGPL-3.0-or-later"]
|
||||||
|
- edgeR:
|
||||||
|
description: |
|
||||||
|
Empirical Analysis of Digital Gene Expression Data in R
|
||||||
|
homepage: "https://bioinf.wehi.edu.au/edgeR"
|
||||||
|
documentation: "https://bioconductor.org/packages/edgeR"
|
||||||
|
tool_dev_url: " https://git.bioconductor.org/packages/edgeR"
|
||||||
|
doi: 10.18129/B9.bioc.edgeR
|
||||||
|
licence: ["GPL >=2"]
|
||||||
input:
|
input:
|
||||||
- meta:
|
- meta:
|
||||||
type: map
|
type: map
|
||||||
description: |
|
description: |
|
||||||
Groovy Map containing sample information
|
Groovy Map containing sample information
|
||||||
e.g. [ id:'test', single_end:false ]
|
e.g. [ id:'test', single_end:false ]
|
||||||
- bed:
|
- bam:
|
||||||
type: file
|
type: file
|
||||||
description: The peak files in bed format
|
description: BAM/BED/SAM file
|
||||||
pattern: "*.bed"
|
pattern: "*.{bam,bed,sam}"
|
||||||
- fasta:
|
- fasta:
|
||||||
type: file
|
type: file
|
||||||
description: Fasta file of reference genome
|
description: Fasta file of reference genome
|
||||||
|
|
|
@ -2,19 +2,22 @@
|
||||||
|
|
||||||
nextflow.enable.dsl = 2
|
nextflow.enable.dsl = 2
|
||||||
|
|
||||||
include { HOMER_MAKETAGDIRECTORY } from '../../../../modules/homer/maketagdirectory/main.nf'
|
include {
|
||||||
|
HOMER_MAKETAGDIRECTORY as HOMER_MAKETAGDIRECTORY_BED
|
||||||
|
HOMER_MAKETAGDIRECTORY as HOMER_MAKETAGDIRECTORY_BAM
|
||||||
|
} from '../../../../modules/homer/maketagdirectory/main.nf'
|
||||||
|
|
||||||
workflow test_homer_maketagdirectory {
|
workflow test_homer_maketagdirectory_bed {
|
||||||
input = [[id:'test'],
|
input = [[id:'test'],
|
||||||
[file(params.test_data['sarscov2']['genome']['test_bed'], checkIfExists: true),
|
[file(params.test_data['sarscov2']['genome']['test_bed'], checkIfExists: true),
|
||||||
file(params.test_data['sarscov2']['genome']['test2_bed'], checkIfExists: true)]]
|
file(params.test_data['sarscov2']['genome']['test2_bed'], checkIfExists: true)]]
|
||||||
fasta = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true)
|
fasta = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true)
|
||||||
|
|
||||||
HOMER_MAKETAGDIRECTORY (input, fasta)
|
HOMER_MAKETAGDIRECTORY_BED (input, fasta)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
workflow test_homer_meta_maketagdirectory {
|
workflow test_homer_maketagdirectory_meta {
|
||||||
input =
|
input =
|
||||||
[[[ id:'test1'],
|
[[[ id:'test1'],
|
||||||
[file(params.test_data['sarscov2']['genome']['test_bed'], checkIfExists: true)]],
|
[file(params.test_data['sarscov2']['genome']['test_bed'], checkIfExists: true)]],
|
||||||
|
@ -25,8 +28,14 @@ workflow test_homer_meta_maketagdirectory {
|
||||||
|
|
||||||
meta_input = [[id: 'meta_test']] + [ input.collect{it[1]}.flatten() ]
|
meta_input = [[id: 'meta_test']] + [ input.collect{it[1]}.flatten() ]
|
||||||
|
|
||||||
HOMER_MAKETAGDIRECTORY (meta_input, fasta)
|
HOMER_MAKETAGDIRECTORY_BED (meta_input, fasta)
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO Make a failing bam test
|
workflow test_homer_maketagdirectory_bam {
|
||||||
// TODO Make a pass bam test that feeds the bam through samtools first
|
input = [[id:'test'],
|
||||||
|
[file(params.test_data['sarscov2']['illumina']['test_single_end_sorted_bam'], checkIfExists: true),
|
||||||
|
file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true)]]
|
||||||
|
fasta = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true)
|
||||||
|
|
||||||
|
HOMER_MAKETAGDIRECTORY_BAM (input, fasta)
|
||||||
|
}
|
||||||
|
|
|
@ -2,8 +2,12 @@ process {
|
||||||
|
|
||||||
publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" }
|
publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" }
|
||||||
|
|
||||||
withName: HOMER_MAKETAGDIRECTORY {
|
withName: HOMER_MAKETAGDIRECTORY_BED {
|
||||||
ext.args = '-format bed'
|
ext.args = '-format bed'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
withName: HOMER_MAKETAGDIRECTORY_BAM {
|
||||||
|
ext.args = '-format sam'
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
- name: homer maketagdirectory
|
- name: homer maketagdirectory bed
|
||||||
command: nextflow run ./tests/modules/homer/maketagdirectory -entry test_homer_maketagdirectory -c ./tests/config/nextflow.config -c ./tests/modules/homer/maketagdirectory/nextflow.config
|
command: nextflow run ./tests/modules/homer/maketagdirectory -entry test_homer_maketagdirectory_bed -c ./tests/config/nextflow.config -c ./tests/modules/homer/maketagdirectory/nextflow.config
|
||||||
tags:
|
tags:
|
||||||
- homer
|
- homer
|
||||||
- homer/maketagdirectory
|
- homer/maketagdirectory
|
||||||
|
@ -11,12 +11,12 @@
|
||||||
- path: output/homer/tag_dir/tagCountDistribution.txt
|
- path: output/homer/tag_dir/tagCountDistribution.txt
|
||||||
md5sum: fd4ee7ce7c5dfd7c9d739534b8180578
|
md5sum: fd4ee7ce7c5dfd7c9d739534b8180578
|
||||||
- path: output/homer/tag_dir/tagInfo.txt
|
- path: output/homer/tag_dir/tagInfo.txt
|
||||||
md5sum: 816baa642c946f8284eaa465638e9abb
|
md5sum: ff56f30411b221b847aa4e6e9a6098a1
|
||||||
- path: output/homer/tag_dir/tagLengthDistribution.txt
|
- path: output/homer/tag_dir/tagLengthDistribution.txt
|
||||||
md5sum: e5aa2b9843ca9c04ace297280aed6af4
|
md5sum: e5aa2b9843ca9c04ace297280aed6af4
|
||||||
|
|
||||||
- name: homer meta maketagdirectory
|
- name: homer maketagdirectory meta
|
||||||
command: nextflow run ./tests/modules/homer/maketagdirectory -entry test_homer_meta_maketagdirectory -c ./tests/config/nextflow.config -c ./tests/modules/homer/maketagdirectory/nextflow.config
|
command: nextflow run ./tests/modules/homer/maketagdirectory -entry test_homer_maketagdirectory_meta -c ./tests/config/nextflow.config -c ./tests/modules/homer/maketagdirectory/nextflow.config
|
||||||
tags:
|
tags:
|
||||||
- homer
|
- homer
|
||||||
- homer/maketagdirectory
|
- homer/maketagdirectory
|
||||||
|
@ -28,6 +28,23 @@
|
||||||
- path: output/homer/tag_dir/tagCountDistribution.txt
|
- path: output/homer/tag_dir/tagCountDistribution.txt
|
||||||
md5sum: fd4ee7ce7c5dfd7c9d739534b8180578
|
md5sum: fd4ee7ce7c5dfd7c9d739534b8180578
|
||||||
- path: output/homer/tag_dir/tagInfo.txt
|
- path: output/homer/tag_dir/tagInfo.txt
|
||||||
md5sum: 816baa642c946f8284eaa465638e9abb
|
md5sum: ff56f30411b221b847aa4e6e9a6098a1
|
||||||
- path: output/homer/tag_dir/tagLengthDistribution.txt
|
- path: output/homer/tag_dir/tagLengthDistribution.txt
|
||||||
md5sum: e5aa2b9843ca9c04ace297280aed6af4
|
md5sum: e5aa2b9843ca9c04ace297280aed6af4
|
||||||
|
|
||||||
|
- name: homer maketagdirectory bam
|
||||||
|
command: nextflow run ./tests/modules/homer/maketagdirectory -entry test_homer_maketagdirectory_bam -c ./tests/config/nextflow.config -c ./tests/modules/homer/maketagdirectory/nextflow.config
|
||||||
|
tags:
|
||||||
|
- homer
|
||||||
|
- homer/maketagdirectory
|
||||||
|
files:
|
||||||
|
- path: output/homer/tag_dir/MT192765.1.tags.tsv
|
||||||
|
md5sum: 365808c4751ef6dd7085ac52037a22bc
|
||||||
|
- path: output/homer/tag_dir/tagAutocorrelation.txt
|
||||||
|
md5sum: 8b396f2aef1cdd3af4fab57b142d3250
|
||||||
|
- path: output/homer/tag_dir/tagCountDistribution.txt
|
||||||
|
md5sum: afc6d007096c3872bbe84c9dc8edb832
|
||||||
|
- path: output/homer/tag_dir/tagInfo.txt
|
||||||
|
md5sum: fbaf46eeb8a0723fa8b5eabd93f9d821
|
||||||
|
- path: output/homer/tag_dir/tagLengthDistribution.txt
|
||||||
|
md5sum: 44f231adb2a705ae81950808c55cf248
|
||||||
|
|
Loading…
Reference in a new issue