2020-09-10 15:09:54 +00:00
|
|
|
// Import generic module functions
|
|
|
|
include { initOptions; saveFiles; getSoftwareName } from './functions'
|
|
|
|
|
2020-10-14 17:29:50 +00:00
|
|
|
params.options = [:]
|
|
|
|
def options = initOptions(params.options)
|
|
|
|
|
2020-09-10 15:09:54 +00:00
|
|
|
process RSEM_PREPAREREFERENCE {
|
|
|
|
tag "$fasta"
|
|
|
|
label 'process_high'
|
|
|
|
publishDir "${params.outdir}",
|
|
|
|
mode: params.publish_dir_mode,
|
2020-10-14 17:29:50 +00:00
|
|
|
saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), publish_id:'') }
|
2020-09-10 15:09:54 +00:00
|
|
|
|
2020-11-12 14:55:16 +00:00
|
|
|
conda (params.enable_conda ? "bioconda::rsem=1.3.3 bioconda::star=2.7.6a" : null)
|
|
|
|
container "quay.io/biocontainers/mulled-v2-cf0123ef83b3c38c13e3b0696a3f285d3f20f15b:606b713ec440e799d53a2b51a6e79dbfd28ecf3e-0"
|
2020-09-10 15:09:54 +00:00
|
|
|
|
|
|
|
input:
|
|
|
|
path fasta
|
|
|
|
path gtf
|
2020-10-14 17:29:50 +00:00
|
|
|
|
2020-09-10 15:09:54 +00:00
|
|
|
output:
|
|
|
|
path "rsem" , emit: index
|
|
|
|
path "*.version.txt", emit: version
|
|
|
|
|
|
|
|
script:
|
|
|
|
def software = getSoftwareName(task.process)
|
|
|
|
"""
|
|
|
|
mkdir rsem
|
|
|
|
rsem-prepare-reference \\
|
|
|
|
--gtf $gtf \\
|
|
|
|
--num-threads $task.cpus \\
|
2020-10-14 17:29:50 +00:00
|
|
|
$options.args \\
|
2020-09-10 15:09:54 +00:00
|
|
|
$fasta \\
|
|
|
|
rsem/genome
|
|
|
|
|
|
|
|
rsem-calculate-expression --version | sed -e "s/Current version: RSEM v//g" > ${software}.version.txt
|
|
|
|
"""
|
|
|
|
}
|