Closed desireetillo closed 1 year ago
Hi, do the sample_ID's in the approx_size sheet match up with those in the sample_sheet?
Hi, yes they appear to. I'm pointing the workflow to the fastqs, the approx_size_sheet.txt, and sample_sheet.txt found in the test data set here: https://github.com/epi2me-labs/wf-clone-validation/tree/master/test_data
I don't know too much nextflow, but I think the bug in lines 406-410 of main.nf. When approx size sheet is specified it creates a dictionary approx_size
with the structure [sample_id, approx_size]. Then it attempts to create a new dictionary called final_samples
, by joining this dictionary with another dictionary named_samples
that has a completely different structure:
[[type:test_sample, barcode:barcode, sample_id:sample_id], path_to_data]. The join won't work since the two dictionaries don't have a common key.
Anyway, you probably already knew about this, but in just case you didn't! :)
I tested @desireetillo 's suggestion and can confirm something like this fixes the issue:
--- main.nf 2023-04-05 12:57:48.921601733 +0000
+++ .nextflow/assets/epi2me-labs/wf-clone-validation/main.nf 2023-04-05 12:49:52.668982569 +0000
@@ -430,13 +430,17 @@
// a single per-sample fastq file
named_samples = samples.map { it -> return tuple(it[1],it[0])}
if(params.approx_size_sheet != null) {
+ named_samples_w_key = samples.map { it -> return tuple(it[1]["sample_id"],it[1],it[0]) }
approx_size = Channel.fromPath(params.approx_size_sheet) \
| splitCsv(header:true) \
| map { row-> tuple(row.sample_id, row.approx_size) }
- final_samples = named_samples.join(approx_size)}
+ not_final_samples = named_samples_w_key.join(approx_size)
+ final_samples = not_final_samples.map { it -> return tuple(it[1],it[2],it[3]) }
+ }
else {
final_samples = samples.map { it -> return tuple(it[1],it[0], params.approx_size) }
}
sample_fastqs = combineFastq(final_samples)
// Optionally filter the data, removing reads mapping to
// the host or background genome
Hi, Thanks for the suggestion, we have update this in a latest release so it should be fixed now.
Closing as should no longer be an issues as we no longer use the approx size sheet.
What happened?
Just trying out the workflow on my local machine with the included test data. Works fine without the approx_size_sheet.txt, but when I do specify it, the workflow does not perform any of the data processing or assembly steps (see log output below).
Operating System
macOS
Workflow Execution
EPI2ME Labs desktop application
Workflow Execution - EPI2ME Labs Versions
3.1.5
Workflow Execution - Execution Profile
Docker
Workflow Version
0.2.5
Relevant log output