-
Notifications
You must be signed in to change notification settings - Fork 695
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/purecn/run' into purecn/run
- Loading branch information
Showing
12 changed files
with
251 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
process PEKA { | ||
tag "$meta.id" | ||
label 'process_low' | ||
|
||
conda "bioconda::peka=1.0.0" | ||
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? | ||
'https://depot.galaxyproject.org/singularity/peka:1.0.0--pyhdfd78af_0': | ||
'biocontainers/peka:1.0.0--pyhdfd78af_0' }" | ||
|
||
input: | ||
tuple val(meta), path(peaks) | ||
tuple val(meta), path(crosslinks) | ||
path fasta | ||
path fai | ||
path gtf | ||
|
||
output: | ||
tuple val(meta), path("*mer_cluster_distribution*"), emit: cluster, optional: true | ||
tuple val(meta), path("*mer_distribution*") , emit: distribution, optional: true | ||
tuple val(meta), path("*.pdf") , emit: pdf, optional: true | ||
path "versions.yml" , emit: versions | ||
|
||
when: | ||
task.ext.when == null || task.ext.when | ||
|
||
script: | ||
def args = task.ext.args ?: '' | ||
def VERSION = '1.0.0' // WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions. | ||
""" | ||
# If the modification date and time of the fai is before the fasta then | ||
# there will be an error. Touching the file first avoids that. | ||
touch $fai | ||
mkdir tmp | ||
TMPDIR=\$(pwd)/tmp peka \ | ||
-i $peaks \ | ||
-x $crosslinks \ | ||
-g $fasta \ | ||
-gi $fai \ | ||
-r $gtf \ | ||
$args | ||
cat <<-END_VERSIONS > versions.yml | ||
"${task.process}": | ||
peka: $VERSION | ||
END_VERSIONS | ||
""" | ||
stub: | ||
def prefix = task.ext.prefix ?: "${meta.id}" | ||
def VERSION = '1.0.0' // WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions. | ||
""" | ||
touch ${prefix}_4mer_cluster_distribution_genome.tsv | ||
touch ${prefix}_4mer_distribution_genome.tsv | ||
touch ${prefix}_4mer_genome.pdf | ||
cat <<-END_VERSIONS > versions.yml | ||
"${task.process}": | ||
peka: $VERSION | ||
END_VERSIONS | ||
""" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
--- | ||
name: "peka" | ||
description: Runs PEKA CLIP peak k-mer analysis | ||
keywords: | ||
- motif | ||
- CLIP | ||
- iCLIP | ||
- genomics | ||
- k-mer | ||
tools: | ||
- "peka": | ||
description: "Positionally-enriched k-mer analysis (PEKA) is a software package for identifying enriched protein-RNA binding motifs from CLIP datasets" | ||
homepage: "https://github.com/ulelab/peka" | ||
documentation: "https://github.com/ulelab/peka" | ||
tool_dev_url: "https://github.com/ulelab/peka" | ||
doi: "10.1186/s13059-022-02755-2" | ||
licence: "['GPL v3']" | ||
|
||
input: | ||
- meta: | ||
type: map | ||
description: | | ||
Groovy Map containing sample information | ||
e.g. [ id:'test', single_end:false ] | ||
- peaks: | ||
type: file | ||
description: BED file of peak regions | ||
pattern: "*.{bed,bed.gz}" | ||
- crosslinks: | ||
type: file | ||
description: BED file of crosslinks | ||
pattern: "*.{bed,bed.gz}" | ||
- fasta: | ||
type: file | ||
description: Genome reference sequence used | ||
pattern: "*.{fa,fasta}" | ||
- fai: | ||
type: file | ||
description: FAI file corresponding to the reference sequence | ||
pattern: "*.{fai}" | ||
- gtf: | ||
type: file | ||
description: A segmented GTF used to annotate peaks | ||
pattern: "*.{gtf}" | ||
|
||
output: | ||
- cluster: | ||
type: file | ||
description: TSV file of summed occurrence distributions of k-mers within defined clusters | ||
pattern: "*.tsv" | ||
- distribution: | ||
type: file | ||
description: TSV file with calculated PEKA score and occurrence distribution for all possible k-mers | ||
pattern: "*.tsv" | ||
- pdf: | ||
type: file | ||
description: PDF file with graphs showing k-mer occurrence distributions around thresholded crosslink sites | ||
pattern: "*.pdf" | ||
- versions: | ||
type: file | ||
description: File containing software versions | ||
pattern: "versions.yml" | ||
|
||
authors: | ||
- "@kkuret" | ||
- "@codeprimate123" | ||
- "@chris-cheshire" | ||
- "@charlotteanne" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/usr/bin/env nextflow | ||
|
||
nextflow.enable.dsl = 2 | ||
|
||
include { PEKA } from '../../../../modules/nf-core/peka/main.nf' | ||
|
||
workflow test_peka { | ||
|
||
bed_crosslinks = [ [ id:'test' ], file("https://raw.githubusercontent.com/nf-core/test-datasets/clipseq/peka/chr21_HepG2-PCBP1-merged.xl.bed", checkIfExists: true) ] | ||
bed_peaks = [ [ id:'test' ], file("https://raw.githubusercontent.com/nf-core/test-datasets/clipseq/peka/chr21_HepG2-PCBP1-merged.xl10_200_density2_peaks.bed", checkIfExists: true) ] | ||
regions = file("https://raw.githubusercontent.com/nf-core/test-datasets/clipseq/peka/chr21_gencode_regions.gtf", checkIfExists: true) | ||
fasta = file("https://raw.githubusercontent.com/nf-core/test-datasets/clipseq/peka/chr21.GRCh38.p12.genome.masked.fa", checkIfExists: true) | ||
fai = file("https://raw.githubusercontent.com/nf-core/test-datasets/clipseq/peka/chr21.GRCh38.p12.genome.masked.fa.fai", checkIfExists: true) | ||
|
||
PEKA( | ||
bed_peaks, | ||
bed_crosslinks, | ||
fasta, | ||
fai, | ||
regions | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
process { | ||
withName: 'PEKA' { | ||
ext.args = { "-sr 'genome' -re 'unmasked' -k 4 -p 0" } | ||
} | ||
publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
- name: peka test_peka | ||
command: nextflow run ./tests/modules/nf-core/peka -entry test_peka -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/peka/nextflow.config | ||
tags: | ||
- peka | ||
files: | ||
- path: output/peka/chr21_HepG2-PCBP1-merged_4mer_cluster_distribution_genome.tsv | ||
- path: output/peka/chr21_HepG2-PCBP1-merged_4mer_distribution_genome.tsv | ||
- path: output/peka/chr21_HepG2-PCBP1-merged_4mer_genome.pdf | ||
- path: output/peka/versions.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters