mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2024-11-15 06:03:10 +00:00
d5183a7fec
* add cellranger mkref module * add cellranger mkref tests * update test yml chksum * fix module linting * fix test yml * fix getprocessname * fix versions typo * fix cellranger test.yml * fix versions.yml * test versions.yml * fix grep version * fix cellranger version * add dockerfile and readme * review container statement * Update modules/cellranger/mkref/meta.yml Co-authored-by: Gregor Sturm <mail@gregor-sturm.de> * add disclaimers * change location dockerfile Co-authored-by: Gregor Sturm <mail@gregor-sturm.de>
40 lines
1.2 KiB
Text
40 lines
1.2 KiB
Text
// Import generic module functions
|
|
include { initOptions; saveFiles; getSoftwareName; getProcessName } from './functions'
|
|
|
|
params.options = [:]
|
|
options = initOptions(params.options)
|
|
|
|
process CELLRANGER_MKREF {
|
|
tag 'mkref'
|
|
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:[:], publish_by_meta:[]) }
|
|
|
|
if (params.enable_conda) {
|
|
exit 1, "Conda environments cannot be used when using the Cell Ranger tool. Please use docker or singularity containers."
|
|
}
|
|
container "nfcore/cellranger:6.0.2"
|
|
|
|
input:
|
|
path fasta
|
|
path gtf
|
|
val(reference_name)
|
|
|
|
output:
|
|
path "versions.yml" , emit: versions
|
|
path "${reference_name}", emit: reference
|
|
|
|
script:
|
|
"""
|
|
cellranger mkref \\
|
|
--genome=${reference_name} \\
|
|
--fasta=${fasta} \\
|
|
--genes=${gtf}
|
|
|
|
cat <<-END_VERSIONS > versions.yml
|
|
${getProcessName(task.process)}:
|
|
${getSoftwareName(task.process)}: \$(echo \$( cellranger --version 2>&1) | sed 's/^.*[^0-9]\\([0-9]*\\.[0-9]*\\.[0-9]*\\).*\$/\\1/' )
|
|
END_VERSIONS
|
|
"""
|
|
}
|