ciccalab / SIMPLI

SIMPLI is a highly configurable pipeline for the analysis of multiplexed imaging data.
https://github.com/ciccalab/SIMPLI/wiki
Other
35 stars 5 forks source link

Issue in normalization #5

Closed ernohanninen closed 2 years ago

ernohanninen commented 2 years ago

Hi! I have a problem running SIMPLI with multiple single channel samples. The problem is that SIMPLI normalizes only the first sample from the sample_metadata file. To better understand the problem I printed some output from the Nextflow process. It seems that the main.nf and workflow.nf reads the samples correct, but only the sample_1 is passed to the process.nf and that is why the sample_2 is not normalized. If I run the pipeline with SIMPLI test data everything works fine. With my data I skip the extraction step because I'm using single channel tiff images.

My terminal output:

N E X T F L O W ~ version 21.10.6 Launching main.nf [backstabbing_celsius] - revision: 1548360ea3 executor > local (2) [b9/f24b98] process > normalize_images:normalize_tiffs (1) [100%] 1 of 1 ✔ [14/107818] process > normalize_images:collect_normalize... [100%] 1 of 1 ✔ sample (printed from: main.nf) : sample_1 sample (printed from: workflow normalize_images) : sample_1 sample (printed from: main.nf) : sample_2 sample (printed from: workflow normalize_images) : sample_2 sample (printed from: process normalize_tiffs): sample_1

My metadata files are attached:

tiff_input_metadata.csv sample_metadata.csv

MicheleBortol commented 2 years ago

Hi,

I am not sure why you are getting these lines in the terminal output:

sample (printed from: main.nf) : sample_1
sample (printed from: workflow normalize_images) : sample_1
sample (printed from: main.nf) : sample_2
sample (printed from: workflow nor
[tiff_input_metadata.csv](https://github.com/ciccalab/SIMPLI/files/8777945/tiff_input_metadata.csv)
malize_images) : sample_2
sample (printed from: process normalize_tiffs): sample_1

Did you add the some extra code or options for printing? Anyway, I think your sample_metadata.csv file is OK but your tiff_input_metadata.csv has a small issue. It is not expected for samples to have different markers and labels could you retry with this attached version?

tiff_input_metadata.csv

If this does not help could you send me your nextflow log file for the run to invesstigate further?

Best,

Michele

ernohanninen commented 2 years ago

Thanks for your help, but the metadata file you provided didn't solve the issue. It still normalizes only the first sample. Here is my nextflow.log file:

nextflow.log

And about the terminal output, yes I added some extra printing to better understand where the problem might be.

Thanks!

MicheleBortol commented 2 years ago

OK, it was due to a small bug which should be now fixed. Please see this commit for details: 34b48fa

Could you give it a go and let me know if you have any issues. Thank you for reporting this.

ernohanninen commented 2 years ago

Works perfectly, thank you so much!

MicheleBortol commented 2 years ago

No problem at all, thank you for reporting this issue.