2020-09-10 15:45:11 +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:45:11 +00:00
|
|
|
process STAR_GENOMEGENERATE {
|
|
|
|
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:45:11 +00:00
|
|
|
|
2020-10-14 17:29:50 +00:00
|
|
|
// Note: 2.7X indices incompatible with AWS iGenomes.
|
2020-11-12 14:55:16 +00:00
|
|
|
conda (params.enable_conda ? "bioconda::star=2.6.1d" : null)
|
|
|
|
container "quay.io/biocontainers/star:2.6.1d--0"
|
2020-09-10 15:45:11 +00:00
|
|
|
|
|
|
|
input:
|
|
|
|
path fasta
|
|
|
|
path gtf
|
|
|
|
|
|
|
|
output:
|
|
|
|
path "star" , emit: index
|
|
|
|
path "*.version.txt", emit: version
|
|
|
|
|
|
|
|
script:
|
|
|
|
def software = getSoftwareName(task.process)
|
|
|
|
def memory = task.memory ? "--limitGenomeGenerateRAM ${task.memory.toBytes() - 100000000}" : ''
|
|
|
|
"""
|
|
|
|
mkdir star
|
|
|
|
STAR \\
|
|
|
|
--runMode genomeGenerate \\
|
|
|
|
--genomeDir star/ \\
|
|
|
|
--genomeFastaFiles $fasta \\
|
|
|
|
--sjdbGTFfile $gtf \\
|
|
|
|
--runThreadN $task.cpus \\
|
|
|
|
$memory \\
|
2020-10-14 17:29:50 +00:00
|
|
|
$options.args
|
2020-09-10 15:45:11 +00:00
|
|
|
|
|
|
|
STAR --version | sed -e "s/STAR_//g" > ${software}.version.txt
|
|
|
|
"""
|
|
|
|
}
|