Skip to content

Commit

Permalink
Merge pull request #152 from nf-core/115-add-bioconda-recipe-for-psirc
Browse files Browse the repository at this point in the history
Use psirc bioconda package
  • Loading branch information
nictru authored Jun 19, 2024
2 parents 995775b + 9b57e7f commit 98923dd
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 6 deletions.
6 changes: 6 additions & 0 deletions modules/local/psirc/index/environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
name: psirc_index
channels:
- conda-forge
- bioconda
dependencies:
- bioconda::psirc=1.0.0
8 changes: 5 additions & 3 deletions modules/local/psirc/index/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@ process PSIRC_INDEX {
tag "${meta.id}"
label 'process_high'

container "registry.hub.docker.com/bigdatainbiomedicine/psirc"
conda "${moduleDir}/environment.yml"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/psirc:1.0.0--he1fd2f9_0' :
'biocontainers/psirc:1.0.0--he1fd2f9_0' }"

input:
tuple val(meta), path(fasta)
Expand All @@ -12,13 +15,12 @@ process PSIRC_INDEX {
path "versions.yml", emit: versions

script:
def VERSION = '1.0'
"""
psirc-quant index -i psirc.index --make-unique $fasta
cat <<-END_VERSIONS > versions.yml
"${task.process}":
psirc-quant: $VERSION
psirc-quant: \$(psirc-quant version | sed -n 's/^psirc-quant, version \\([0-9.]*\\).*\$/\\1/p')
END_VERSIONS
"""
}
6 changes: 6 additions & 0 deletions modules/local/psirc/quant/environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
name: psirc_quant
channels:
- conda-forge
- bioconda
dependencies:
- bioconda::psirc=1.0.0
8 changes: 5 additions & 3 deletions modules/local/psirc/quant/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@ process PSIRC_QUANT {
tag "${meta.id}"
label 'process_high'

container "registry.hub.docker.com/bigdatainbiomedicine/psirc"
conda "${moduleDir}/environment.yml"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/psirc:1.0.0--he1fd2f9_0' :
'biocontainers/psirc:1.0.0--he1fd2f9_0' }"

input:
tuple val(meta), path(reads)
Expand All @@ -19,13 +22,12 @@ process PSIRC_QUANT {
def single_end = meta.single_end ? "--single -l 76 -s 20" : ""
def genomebam = gtf ? "--genomebam -g $gtf" : ""
def chromosomes = chrom_sizes ? "-c $chrom_sizes" : ""
def VERSION = '1.0'
"""
psirc-quant quant -t $task.cpus -i $index -o $meta.id $single_end $reads -b $bootstrap_samples $genomebam $chromosomes
cat <<-END_VERSIONS > versions.yml
"${task.process}":
psirc-quant: $VERSION
psirc-quant: \$(psirc-quant version | sed -n 's/^psirc-quant, version \\([0-9.]*\\).*\$/\\1/p')
END_VERSIONS
"""
}

0 comments on commit 98923dd

Please sign in to comment.