forked from nf-core/modules
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add new module iCount-mini/metagene (nf-core#3612)
* add module template * first version * update testing and linting * update file naming * update test * fix test
- Loading branch information
1 parent
c32c0e6
commit c441209
Showing
6 changed files
with
139 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
process ICOUNTMINI_METAGENE { | ||
tag "$meta.id" | ||
label 'process_low' | ||
|
||
conda "bioconda::icount-mini=3.0.0" | ||
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? | ||
'https://depot.galaxyproject.org/singularity/icount-mini:3.0.0--pyh7cba7a3_0': | ||
'biocontainers/icount-mini:3.0.0--pyh7cba7a3_0' }" | ||
|
||
input: | ||
tuple val(meta), path(bed) | ||
path segmentation | ||
|
||
output: | ||
tuple val(meta), path("metagene_*/*plot_data.tsv"), emit: tsv | ||
path "versions.yml" , emit: versions | ||
|
||
when: | ||
task.ext.when == null || task.ext.when | ||
|
||
script: | ||
def args = task.ext.args ?: '' | ||
def prefix = task.ext.prefix ?: "${meta.id}" | ||
|
||
""" | ||
mv $bed ${prefix}.bed | ||
iCount-Mini metagene \\ | ||
${prefix}.bed \\ | ||
$segmentation \\ | ||
$args | ||
cat <<-END_VERSIONS > versions.yml | ||
"${task.process}": | ||
iCount-Mini: \$(iCount-Mini -v) | ||
END_VERSIONS | ||
""" | ||
|
||
stub: | ||
def prefix = task.ext.prefix ?: "${meta.id}" | ||
""" | ||
touch metagene_${prefix}/${prefix}_plot_data.tsv | ||
cat <<-END_VERSIONS > versions.yml | ||
"${task.process}": | ||
iCount-Mini: \$(iCount-Mini -v) | ||
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,44 @@ | ||
--- | ||
name: icountmini_metagene | ||
description: Plot a metagene of cross-link events/sites around various transcriptomic landmarks. | ||
keywords: | ||
- iCLIP | ||
- gtf | ||
- genomics | ||
tools: | ||
- icount: | ||
description: Computational pipeline for analysis of iCLIP data | ||
homepage: https://icount.readthedocs.io/en/latest/ | ||
documentation: https://icount.readthedocs.io/en/latest/ | ||
licence: ["MIT"] | ||
input: | ||
- meta: | ||
type: map | ||
description: | | ||
Groovy Map containing sample information | ||
e.g. [ id:'test', single_end:false ] | ||
- bed: | ||
type: file | ||
description: BED file of crosslinks | ||
- segmentation: | ||
type: file | ||
description: A iCount segmentation file | ||
pattern: "*.{gtf}" | ||
output: | ||
- meta: | ||
type: map | ||
description: | | ||
Groovy Map containing sample information | ||
e.g. [ id:'test', single_end:false ] | ||
- tsv: | ||
type: file | ||
description: Metagene table | ||
pattern: "*.tsv" | ||
- versions: | ||
type: file | ||
description: File containing software versions | ||
pattern: "versions.yml" | ||
authors: | ||
- "@marc-jones" | ||
- "@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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#!/usr/bin/env nextflow | ||
|
||
nextflow.enable.dsl = 2 | ||
|
||
include { ICOUNTMINI_SEGMENT } from '../../../../../modules/nf-core/icountmini/segment/main.nf' | ||
include { ICOUNTMINI_METAGENE} from '../../../../../modules/nf-core/icountmini/metagene/main.nf' | ||
|
||
workflow test_icountmini_metagene { | ||
input = [ | ||
[ id:'test', single_end:false ], // meta map | ||
file(params.test_data['homo_sapiens']['genome']['genome_21_gencode_gtf'], checkIfExists: true) | ||
] | ||
|
||
ICOUNTMINI_SEGMENT ( | ||
input, | ||
file(params.test_data['homo_sapiens']['genome']['genome_21_fasta_fai'], checkIfExists: true) | ||
) | ||
|
||
bed = [ | ||
[ id:'test' ], // meta map | ||
file("https://raw.githubusercontent.com/nf-core/test-datasets/clipseq/crosslinks/clippy.bed", checkIfExists: true) | ||
] | ||
|
||
ICOUNTMINI_METAGENE ( | ||
bed, | ||
ICOUNTMINI_SEGMENT.out.gtf.map{ it[1] } | ||
) | ||
} | ||
|
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,5 @@ | ||
process { | ||
|
||
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: icountmini metagene test_icountmini_metagene | ||
command: nextflow run ./tests/modules/nf-core/icountmini/metagene -entry test_icountmini_metagene -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/icountmini/metagene/nextflow.config | ||
tags: | ||
- icountmini | ||
- icountmini/metagene | ||
files: | ||
- path: output/icountmini/metagene_test/test_plot_data.tsv | ||
md5sum: 63032c9e159e81f617e30bcb1c3c8509 | ||
- path: output/icountmini/versions.yml |