mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2024-11-11 04:33:10 +00:00
e937c7950a
* Update README * Rename pytest_software.yml to pytest_modules.yml * Rename main software directory to modules * Remove deprecated modules * Rename tests software to modules * Replace paths for tests in pytest_modules.yml * Replace software with modules in Github Actions * Replace software with modules in main.nf tests * Rename software to modules in test.yml
61 lines
2.4 KiB
Text
61 lines
2.4 KiB
Text
// Import generic module functions
|
|
include { initOptions; saveFiles; getSoftwareName } from './functions'
|
|
|
|
params.options = [:]
|
|
options = initOptions(params.options)
|
|
|
|
process RSEM_CALCULATEEXPRESSION {
|
|
tag "$meta.id"
|
|
label 'process_high'
|
|
publishDir "${params.outdir}",
|
|
mode: params.publish_dir_mode,
|
|
saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), meta:meta, publish_by_meta:['id']) }
|
|
|
|
conda (params.enable_conda ? "bioconda::rsem=1.3.3 bioconda::star=2.7.6a" : null)
|
|
if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) {
|
|
container "https://depot.galaxyproject.org/singularity/mulled-v2-cf0123ef83b3c38c13e3b0696a3f285d3f20f15b:606b713ec440e799d53a2b51a6e79dbfd28ecf3e-0"
|
|
} else {
|
|
container "quay.io/biocontainers/mulled-v2-cf0123ef83b3c38c13e3b0696a3f285d3f20f15b:606b713ec440e799d53a2b51a6e79dbfd28ecf3e-0"
|
|
}
|
|
|
|
input:
|
|
tuple val(meta), path(reads)
|
|
path index
|
|
|
|
output:
|
|
tuple val(meta), path("*.genes.results") , emit: counts_gene
|
|
tuple val(meta), path("*.isoforms.results"), emit: counts_transcript
|
|
tuple val(meta), path("*.stat") , emit: stat
|
|
tuple val(meta), path("*.log") , emit: logs
|
|
path "*.version.txt" , emit: version
|
|
|
|
tuple val(meta), path("*.STAR.genome.bam") , optional:true, emit: bam_star
|
|
tuple val(meta), path("${prefix}.genome.bam") , optional:true, emit: bam_genome
|
|
tuple val(meta), path("${prefix}.transcript.bam"), optional:true, emit: bam_transcript
|
|
|
|
script:
|
|
def software = getSoftwareName(task.process)
|
|
prefix = options.suffix ? "${meta.id}${options.suffix}" : "${meta.id}"
|
|
|
|
def strandedness = ''
|
|
if (meta.strandedness == 'forward') {
|
|
strandedness = '--strandedness forward'
|
|
} else if (meta.strandedness == 'reverse') {
|
|
strandedness = '--strandedness reverse'
|
|
}
|
|
def paired_end = meta.single_end ? "" : "--paired-end"
|
|
"""
|
|
INDEX=`find -L ./ -name "*.grp" | sed 's/.grp//'`
|
|
rsem-calculate-expression \\
|
|
--num-threads $task.cpus \\
|
|
--temporary-folder ./tmp/ \\
|
|
$strandedness \\
|
|
$paired_end \\
|
|
$options.args \\
|
|
$reads \\
|
|
\$INDEX \\
|
|
$prefix
|
|
|
|
rsem-calculate-expression --version | sed -e "s/Current version: RSEM v//g" > ${software}.version.txt
|
|
"""
|
|
}
|