mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2024-11-13 05:13:09 +00:00
feat(homer): Add groseq subworkflow (#1492)
* feat(homer): Add groseq subworkflow * fix(homer): Update groseq paths * test(homer): Update groseq bam md5sums * test(homer): Update bed process args wildcard * test(homer): Update groseq bed md5s * style: Run prettier * style(homer): Align comments Co-authored-by: Friederike Hanssen <Friederike.hanssen@qbic.uni-tuebingen.de> * docs(homer): Add groseq meta.yml Co-authored-by: Friederike Hanssen <Friederike.hanssen@qbic.uni-tuebingen.de>
This commit is contained in:
parent
ae48653bd2
commit
13cc32399c
5 changed files with 158 additions and 0 deletions
50
subworkflows/nf-core/homer/groseq/main.nf
Normal file
50
subworkflows/nf-core/homer/groseq/main.nf
Normal file
|
@ -0,0 +1,50 @@
|
|||
/*
|
||||
* Identify transcripts with homer
|
||||
*/
|
||||
|
||||
include { HOMER_MAKETAGDIRECTORY } from '../../../../modules/homer/maketagdirectory/main'
|
||||
include { HOMER_MAKEUCSCFILE } from '../../../../modules/homer/makeucscfile/main'
|
||||
include { HOMER_FINDPEAKS } from '../../../../modules/homer/findpeaks/main'
|
||||
include { HOMER_POS2BED } from '../../../../modules/homer/pos2bed/main'
|
||||
|
||||
workflow HOMER_GROSEQ {
|
||||
take:
|
||||
bam // channel: [ val(meta), [ reads ] ]
|
||||
fasta // file: /path/to/bwa/index/
|
||||
|
||||
main:
|
||||
|
||||
ch_versions = Channel.empty()
|
||||
|
||||
/*
|
||||
* Create a Tag Directory From The GRO-Seq experiment
|
||||
*/
|
||||
HOMER_MAKETAGDIRECTORY ( bam, fasta )
|
||||
ch_versions = ch_versions.mix(HOMER_MAKETAGDIRECTORY.out.versions.first())
|
||||
|
||||
/*
|
||||
* Creating UCSC Visualization Files
|
||||
*/
|
||||
HOMER_MAKEUCSCFILE ( HOMER_MAKETAGDIRECTORY.out.tagdir )
|
||||
ch_versions = ch_versions.mix(HOMER_MAKEUCSCFILE.out.versions.first())
|
||||
|
||||
/*
|
||||
* Find transcripts directly from GRO-Seq
|
||||
*/
|
||||
HOMER_FINDPEAKS ( HOMER_MAKETAGDIRECTORY.out.tagdir )
|
||||
ch_versions = ch_versions.mix(HOMER_FINDPEAKS.out.versions.first())
|
||||
|
||||
/*
|
||||
* Convert peak file to bed file
|
||||
*/
|
||||
HOMER_POS2BED ( HOMER_FINDPEAKS.out.txt )
|
||||
ch_versions = ch_versions.mix(HOMER_POS2BED.out.versions.first())
|
||||
|
||||
emit:
|
||||
tagdir = HOMER_MAKETAGDIRECTORY.out.tagdir // channel: [ val(meta), [ tagdir ] ]
|
||||
bed_graph = HOMER_MAKEUCSCFILE.out.bedGraph // channel: [ val(meta), [ tag_dir/*ucsc.bedGraph.gz ] ]
|
||||
peaks = HOMER_FINDPEAKS.out.txt // channel: [ val(meta), [ *peaks.txt ] ]
|
||||
bed = HOMER_POS2BED.out.bed // channel: [ val(meta), [ *peaks.txt ] ]
|
||||
|
||||
versions = ch_versions // channel: [ versions.yml ]
|
||||
}
|
48
subworkflows/nf-core/homer/groseq/meta.yml
Normal file
48
subworkflows/nf-core/homer/groseq/meta.yml
Normal file
|
@ -0,0 +1,48 @@
|
|||
name: homer_groseq
|
||||
description: Perform variant calling on a set of normal samples using mutect2 panel of normals mode. Group them into a genomicsdbworkspace using genomicsdbimport, then use this to create a panel of normals using createsomaticpanelofnormals.
|
||||
keywords:
|
||||
- homer
|
||||
- groseq
|
||||
- nascent
|
||||
modules:
|
||||
- homer/maketagdirectory
|
||||
- homer/makeucscfile
|
||||
- homer/findpeaks
|
||||
- homer/pos2bed
|
||||
input:
|
||||
- meta:
|
||||
type: map
|
||||
description: |
|
||||
Groovy Map containing sample information
|
||||
e.g. [ id:'test' ]
|
||||
- input:
|
||||
type: list
|
||||
description: list of BAM files, also able to take SAM and BED as input
|
||||
pattern: "[ *.{bam/sam/bed} ]"
|
||||
- fasta:
|
||||
type: file
|
||||
description: The reference fasta file
|
||||
pattern: "*.fasta"
|
||||
output:
|
||||
- tagdir:
|
||||
type: directory
|
||||
description: The "Tag Directory"
|
||||
pattern: "*_tagdir"
|
||||
- bedGraph:
|
||||
type: file
|
||||
description: The UCSC bed graph
|
||||
pattern: "*.bedGraph.gz"
|
||||
- peaks:
|
||||
type: file
|
||||
description: The found peaks
|
||||
pattern: "*.peaks.txt"
|
||||
- bed:
|
||||
type: file
|
||||
description: A BED file of the found peaks
|
||||
pattern: "*.bed"
|
||||
- versions:
|
||||
type: file
|
||||
description: File containing software versions
|
||||
pattern: "versions.yml"
|
||||
authors:
|
||||
- "@Emiller88"
|
24
tests/subworkflows/nf-core/homer/groseq/main.nf
Normal file
24
tests/subworkflows/nf-core/homer/groseq/main.nf
Normal file
|
@ -0,0 +1,24 @@
|
|||
#!/usr/bin/env nextflow
|
||||
|
||||
nextflow.enable.dsl = 2
|
||||
|
||||
include { HOMER_GROSEQ as HOMER_GROSEQ_BAM
|
||||
HOMER_GROSEQ as HOMER_GROSEQ_BED } from '../../../../../subworkflows/nf-core/homer/groseq/main'
|
||||
|
||||
workflow test_homer_groseq_bam {
|
||||
def input = []
|
||||
input = [[ id: 'test' ],
|
||||
[ file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true)]]
|
||||
def fasta = [ file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) ]
|
||||
|
||||
HOMER_GROSEQ_BAM ( input, fasta )
|
||||
}
|
||||
|
||||
workflow test_homer_groseq_bed {
|
||||
def input = []
|
||||
input = [[ id: 'test' ],
|
||||
[ file(params.test_data['sarscov2']['genome']['test_bed'], checkIfExists: true)]]
|
||||
def fasta = [ file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) ]
|
||||
|
||||
HOMER_GROSEQ_BED ( input, fasta )
|
||||
}
|
9
tests/subworkflows/nf-core/homer/groseq/nextflow.config
Normal file
9
tests/subworkflows/nf-core/homer/groseq/nextflow.config
Normal file
|
@ -0,0 +1,9 @@
|
|||
process {
|
||||
|
||||
publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" }
|
||||
|
||||
withName: '.*:HOMER_GROSEQ_BED:HOMER_MAKETAGDIRECTORY' {
|
||||
ext.args = "-checkGC -format bed"
|
||||
}
|
||||
|
||||
}
|
27
tests/subworkflows/nf-core/homer/groseq/test.yml
Normal file
27
tests/subworkflows/nf-core/homer/groseq/test.yml
Normal file
|
@ -0,0 +1,27 @@
|
|||
- name: subworkflow homer_groseq bam
|
||||
command: nextflow run ./tests/subworkflows/nf-core/homer/groseq/ -entry test_homer_groseq_bam -c tests/config/nextflow.config -c tests/subworkflows/nf-core/homer/groseq/nextflow.config
|
||||
tags:
|
||||
- homer
|
||||
files:
|
||||
- path: output/homer/test.bed
|
||||
md5sum: 8d40034dfe22c5cf973071aa1e8d3617
|
||||
- path: output/homer/test.bedGraph.gz
|
||||
md5sum: de2b2f8ab90a909b8bfbe755bdaba407
|
||||
- path: output/homer/test.peaks.txt
|
||||
md5sum: 8d40034dfe22c5cf973071aa1e8d3617
|
||||
- path: output/homer/versions.yml
|
||||
md5sum: c85dee03f1afabe406a87743a4c5506d
|
||||
|
||||
- name: subworkflow homer_groseq bed
|
||||
command: nextflow run ./tests/subworkflows/nf-core/homer/groseq/ -entry test_homer_groseq_bed -c tests/config/nextflow.config -c tests/subworkflows/nf-core/homer/groseq/nextflow.config
|
||||
tags:
|
||||
- homer
|
||||
files:
|
||||
- path: output/homer/test.bed
|
||||
md5sum: 25e8b64946012d1c4567a04062e90fae
|
||||
- path: output/homer/test.bedGraph.gz
|
||||
md5sum: 2d2d1c2d3242ff74c7a922695accb9d2
|
||||
- path: output/homer/test.peaks.txt
|
||||
md5sum: 25e8b64946012d1c4567a04062e90fae
|
||||
- path: output/homer/versions.yml
|
||||
md5sum: c9b5f1248d28c216b000cba8da738455
|
Loading…
Reference in a new issue