-
Notifications
You must be signed in to change notification settings - Fork 658
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NEW MODULE: PURECLIP #3624
Merged
CharlotteAnne
merged 14 commits into
nf-core:master
from
CharlotteAnne:newmodule-pureclip
Jul 12, 2023
Merged
NEW MODULE: PURECLIP #3624
Changes from 13 commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
5eb7963
initial commit
CharlotteAnne c7993cf
module version 1
CharlotteAnne a6ada58
full testing
CharlotteAnne dc129d9
linting
CharlotteAnne f20142e
fix version yaml
CharlotteAnne f59f840
fix version yaml command
CharlotteAnne 3bfba81
fix version yml maybe this time please
CharlotteAnne a7f440c
fix version yml for real this time
CharlotteAnne 660d40d
try again versions yaml
CharlotteAnne 0d232d8
fix version yml
CharlotteAnne 633398e
vyml
CharlotteAnne 16c636f
version yaml
CharlotteAnne a3e4790
vyml
CharlotteAnne 0dde7b5
update ref to have meta
CharlotteAnne File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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,69 @@ | ||
process PURECLIP { | ||
tag "$meta.id" | ||
label 'process_high' | ||
|
||
conda "bioconda::pureclip=1.3.1" | ||
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? | ||
'https://depot.galaxyproject.org/singularity/pureclip:1.3.1--0': | ||
'biocontainers/pureclip:1.3.1--0' }" | ||
|
||
input: | ||
tuple val(meta), path(ipbam), path(controlbam) | ||
tuple val(meta), path(ipbai), path(controlbai) | ||
path genome_fasta | ||
val input_control | ||
|
||
output: | ||
tuple val(meta), path("${crosslinks_output_name}"), emit: crosslinks | ||
tuple val(meta), path("${peaks_output_name}") , emit: peaks | ||
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}" | ||
crosslinks_output_name = "${prefix}_pureclip_crosslinks.bed" | ||
peaks_output_name = "${prefix}_pureclip_peaks.bed" | ||
|
||
if(input_control){ | ||
control_bam = "-ibam $controlbam" | ||
control_bai = "-ibai $controlbai" | ||
} else { | ||
control_bam = "" | ||
control_bai = "" | ||
} | ||
|
||
""" | ||
pureclip \ | ||
-i $ipbam \ | ||
-bai $ipbai \ | ||
-g $genome_fasta \ | ||
-nt ${task.cpus} \ | ||
-o $crosslinks_output_name \ | ||
-or $peaks_output_name \ | ||
${control_bam} \ | ||
${control_bai} \ | ||
${args} | ||
|
||
cat <<-END_VERSIONS > versions.yml | ||
"${task.process}": | ||
pureclip: \$(echo \$(pureclip --version 2>&1) | sed 's/^.*pureclip //; s/Using.*\$//; s/version: //; s/ Seq.*//' )) | ||
END_VERSIONS | ||
""" | ||
|
||
stub: | ||
def args = task.ext.args ?: '' | ||
def prefix = task.ext.prefix ?: "${meta.id}" | ||
|
||
""" | ||
touch ${prefix}_pureclip_crosslinks.bed | ||
touch ${prefix}_pureclip_peaks.bed | ||
|
||
cat <<-END_VERSIONS > versions.yml | ||
"${task.process}": | ||
pureclip: \$(echo \$(pureclip --version 2>&1) | sed 's/^.*pureclip //; s/Using.*\$//; s/version: //; s/ Seq.*//' )) | ||
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,77 @@ | ||
--- | ||
name: "pureclip" | ||
description: PureCLIP is a tool to detect protein-RNA interaction footprints from single-nucleotide CLIP-seq data, such as iCLIP and eCLIP. | ||
keywords: | ||
- iCLIP | ||
- eCLIP | ||
- CLIP | ||
tools: | ||
- "pureclip": | ||
description: "PureCLIP is a tool to detect protein-RNA interaction footprints from single-nucleotide CLIP-seq data, such as iCLIP and eCLIP." | ||
homepage: "https://github.com/skrakau/PureCLIP" | ||
documentation: "https://pureclip.readthedocs.io/en/latest/GettingStarted/index.html" | ||
tool_dev_url: "https://github.com/skrakau/PureCLIP" | ||
doi: "10.1186/s13059-017-1364-2" | ||
licence: "['GPL v3']" | ||
|
||
input: | ||
- meta: | ||
type: map | ||
description: | | ||
Groovy Map containing sample information | ||
e.g. `[ id:'test', single_end:false ]` | ||
|
||
- ipbam: | ||
type: file | ||
description: Sorted BAM/CRAM/SAM file | ||
pattern: "*.{bam,cram,sam}" | ||
|
||
- controlbam: | ||
type: file | ||
description: Sorted BAM/CRAM/SAM file | ||
pattern: "*.{bam,cram,sam}" | ||
|
||
- ipbai: | ||
type: file | ||
description: BAM index | ||
pattern: "*.{bai}" | ||
|
||
- controlbai: | ||
type: file | ||
description: BAM index | ||
pattern: "*.{bai}" | ||
|
||
- input_control: | ||
type: boolean | ||
description: Whether to run PureCLIP with an input control | ||
|
||
- genome_fasta: | ||
type: file | ||
description: FASTA file of reference genome | ||
pattern: "*.{fa,fasta,fa.gz,fasta.gz}" | ||
|
||
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" | ||
|
||
- crosslinks: | ||
type: file | ||
description: Bed file of crosslinks | ||
pattern: "*.{bed}" | ||
|
||
- peaks: | ||
type: file | ||
description: Bed file of peaks | ||
pattern: "*.{bed}" | ||
|
||
authors: | ||
- "@charlotteanne" | ||
- "@marcjones" |
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,43 @@ | ||
#!/usr/bin/env nextflow | ||
|
||
nextflow.enable.dsl = 2 | ||
|
||
include { PURECLIP } from '../../../../modules/nf-core/pureclip/main.nf' | ||
|
||
workflow test_pureclip_no_ctrl { | ||
input_bam = [ [ id:'test', single_end:false ], // meta map | ||
[ file( params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true) ], | ||
[ file( params.test_data['homo_sapiens']['illumina']['test2_paired_end_sorted_bam'], checkIfExists: true) ]] //dummy file | ||
|
||
input_bai = [ [ id:'test', single_end:false ], // meta map | ||
[ file( params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam_bai'], checkIfExists: true) ], | ||
[ file( params.test_data['homo_sapiens']['illumina']['test2_paired_end_sorted_bam_bai'], checkIfExists: true) ]] //dummy file | ||
|
||
fasta = file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true) | ||
|
||
PURECLIP ( | ||
input_bam, | ||
input_bai, | ||
fasta, | ||
false | ||
) | ||
} | ||
|
||
workflow test_pureclip_input_ctrl { | ||
input_bam = [ [ id:'test', single_end:false ], // meta map | ||
[ file( params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true) ], | ||
[ file( params.test_data['homo_sapiens']['illumina']['test2_paired_end_sorted_bam'], checkIfExists: true) ]] | ||
|
||
input_bai = [ [ id:'test', single_end:false ], // meta map | ||
[ file( params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam_bai'], checkIfExists: true) ], | ||
[ file( params.test_data['homo_sapiens']['illumina']['test2_paired_end_sorted_bam_bai'], checkIfExists: true) ]] | ||
|
||
genome = [file( params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true)] | ||
|
||
PURECLIP ( | ||
input_bam, | ||
input_bai, | ||
genome, | ||
true | ||
) | ||
} |
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,21 @@ | ||
- name: pureclip test_pureclip_no_ctrl | ||
command: nextflow run ./tests/modules/nf-core/pureclip -entry test_pureclip_no_ctrl -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/pureclip/nextflow.config | ||
tags: | ||
- pureclip | ||
files: | ||
- path: output/pureclip/test_pureclip_crosslinks.bed | ||
md5sum: c13c98e4d205025a3a824fbf36aaeef5 | ||
- path: output/pureclip/test_pureclip_peaks.bed | ||
md5sum: 5fa8033fbe5901ac68a5b11e47aa22c6 | ||
- path: output/pureclip/versions.yml | ||
|
||
- name: pureclip test_pureclip_input_ctrl | ||
command: nextflow run ./tests/modules/nf-core/pureclip -entry test_pureclip_input_ctrl -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/pureclip/nextflow.config | ||
tags: | ||
- pureclip | ||
files: | ||
- path: output/pureclip/test_pureclip_crosslinks.bed | ||
md5sum: 511696bc8fab569c562f1cbc8ff01c45 | ||
- path: output/pureclip/test_pureclip_peaks.bed | ||
md5sum: 927987b0ab82b08255caa4b5d143729b | ||
- path: output/pureclip/versions.yml |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
have a look at some other modules, i thought the rule now was that all inputs like this now needed meta -
tuple val(meta2), path(genome_fasta)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you point me to a module like that? havent seen it in any other modules ive looked at