- `bwamem2/index`. I’d use `${prefix}/${prefix}` ...
# team-maintainers
m
•
bwamem2/index
. I’d use
${prefix}/${prefix}
or
${prefix}/${fasta.getBaseName()}
•
bamcmp
. I’d use
${prefix}
with some neutral qualifiers like
_A
and
_B
(and rename the output channels too !)
m
I need prefix/something else
j
In what situation would you have multiple indexes that would share the same directory name, that couldn’t be solved by making the directory name more specific?
m
Fastqscreen
j
Ah, looking at it - you pass it a directory full of multiple e.g. bwa indexes?
m
So our implementation in #C06PHJM0Y3D slightly differs from the regular modules. https://github.com/nf-core/seqinspector/blob/dev/modules/nf-core/fastqscreen/fastqscreen/main.nf And I'm hoping to port some of the logic back
m
and you don't want to
nf-core modules patch
it? I'm not sure nf-core modules needs to cater to everything, given we can write patches
Ah, never mind. It is patched
m
Pipeline wouldn't pass linting without patching
s
Please can we not just assume that patching fixes everything! Particularly when it is so easy to make this work in a reasonable way.
party this 1
m
Yes
especially when you want to share a particular module within subworkflows in multiple pipelines
j
Question, apart from for tidiness reasons, why do we even put the index in a directory?
s
Good question. Historical reasons?
j
Copy code
def config_content = ref_names.withIndex().collect { name, i -> "DATABASE ${name} ./${ref_dirs[i]}/${ref_basenames[i]} ${ref_aligners[i]}" }.join('\n')
Perhaps I'm missing something, but this approach doesn't preclude providing a bunch of references as
${prefix}/${fasta.baseName}
(would need a little modification)? Perhaps we could even just drop the directory entirely, emitting the raw index files with a simple
${prefix}
, and do:
Copy code
input:
tuple val(basenames), path(index_files, stageAs: "ref/*"), val(aligners)

script:
def config_content = ref_names.withIndex().collect { name, i -> "DATABASE ${name} ./ref/${ref_basenames[i]} ${ref_aligners[i]}" }.join('\n')
m
alternative
Copy code
script:
def config_content = [basenames, index_files, aligners].transpose().collect { name, idx, aligner -> "DATABASE ${name} ${idx} ${aligner}" }.join('\n')
👍 1