nf-core_modules/software/star/genomegenerate/main.nf

47 lines
1.4 KiB
Text
Raw Normal View History

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 = [:]
options = initOptions(params.options)
2020-10-14 17:29:50 +00:00
2020-09-10 15:45:11 +00:00
process STAR_GENOMEGENERATE {
tag "$fasta"
label 'process_high'
publishDir "${params.outdir}",
mode: params.publish_dir_mode,
saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:'index', 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.
2021-02-16 23:58:23 +00:00
conda (params.enable_conda ? "bioconda::star=2.6.1d" : null)
if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) {
container "https://depot.galaxyproject.org/singularity/star:2.6.1d--0"
} else {
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
"""
}