Simon Pearce
05/26/2025, 8:35 AMfasta_index_dna subworkflow to nf-test.
This is proving trickier that I'd expect. @Matthias De Smet, you originally implemented this module by the looks of it.
This subworkflow takes the fasta, but also an extra altliftover channel:
ch_fasta // channel: [mandatory] [ val(meta), path(fasta) ]
ch_altliftover // channel: [mandatory, if aligner is bwamem or bwamem2 or snap] [ val(meta), path(altliftover) ]
The issue is in this section of the code:
BWAMEM1_INDEX.out.index
.join(ch_altliftover)
.map { meta, index, alt -> [meta, index + alt] }
which I believe is trying to add the altliftover file inside the folder that is output by bwamem.
But I don't think we can use + to do this, because it is a file not a meta map, and what we get from nf-test begins (condensing and truncating for space):
"0": [[{"id": "test"},
["/workspace/modules/.nf-test/tests/fcebacc24247d7e952390921d1be834a/workspace",
"/workspace/modules/.nf-test/tests/fcebacc24247d7e952390921d1be834a/modules",
"/workspace/modules/.nf-test/tests/fcebacc24247d7e952390921d1be834a/.nf-test",
"/workspace/modules/.nf-test/tests/fcebacc24247d7e952390921d1be834a/tests",
"/workspace/modules/.nf-test/tests/fcebacc24247d7e952390921d1be834a/fcebacc24247d7e952390921d1be834a",
[[[
".command.begin:md5,d41d8cd98f00b204e9800998ecf8427e",
i.e. it returns a list of all the files and folders with full paths.
If I actually give a file to ch_altliftover, it still gives full paths but only the new file not the original bwa folder at all.
I don't know how to pass this file inside the folder, without adding an extra process.Mahesh Binzer-Panchal
05/26/2025, 8:53 AMSimon Pearce
05/26/2025, 8:53 AMSimon Pearce
05/26/2025, 8:54 AMMatthias De Smet
05/26/2025, 8:56 AM*_INDEX processes (in the case of BWAMEM and BWAMEM2) and to add it as input to the index process for SNAPALIGNER. All three of those support lifting alignments for alt contigs to the canonical chromosome, if the altliftover file is availableSimon Pearce
05/26/2025, 8:58 AMMahesh Binzer-Panchal
05/26/2025, 8:58 AMMaxime Garcia
05/26/2025, 8:58 AMMaxime Garcia
05/26/2025, 8:58 AMMahesh Binzer-Panchal
05/26/2025, 8:59 AMMaxime Garcia
05/26/2025, 8:59 AMSimon Pearce
05/26/2025, 9:02 AMSimon Pearce
05/26/2025, 9:04 AMMatthias De Smet
05/26/2025, 9:04 AM-j treat ALT contigs as part of the primary assembly (i.e. ignore <idxbase>.alt file)
Which led me to believe the the *.alt file needs to be in the same directory and use the same naming scheme as the rest of the indexMahesh Binzer-Panchal
05/26/2025, 9:06 AMMaxime Garcia
05/26/2025, 9:07 AMSimon Pearce
05/26/2025, 10:42 AMMaxime Garcia
05/26/2025, 10:45 AMMaxime Garcia
05/26/2025, 10:45 AMSimon Pearce
05/26/2025, 10:47 AMMaxime Garcia
05/26/2025, 10:47 AMMaxime Garcia
05/26/2025, 10:48 AMMaxime Garcia
05/26/2025, 10:48 AMSimon Pearce
05/26/2025, 10:49 AMMaxime Garcia
05/26/2025, 10:49 AMMaxime Garcia
05/26/2025, 10:49 AMSimon Pearce
05/26/2025, 10:49 AMMaxime Garcia
05/26/2025, 10:50 AMSimon Pearce
05/26/2025, 10:50 AMMaxime Garcia
05/26/2025, 10:50 AMMaxime Garcia
05/26/2025, 10:51 AMMaxime Garcia
05/26/2025, 10:51 AMMaxime Garcia
05/26/2025, 10:52 AMMaxime Garcia
05/26/2025, 10:52 AMMaxime Garcia
05/26/2025, 10:52 AMSimon Pearce
05/26/2025, 10:54 AMMaxime Garcia
05/26/2025, 11:21 AMMaxime Garcia
05/26/2025, 11:21 AMMaxime Garcia
05/26/2025, 11:21 AMSimon Pearce
05/26/2025, 12:05 PM