labsyspharm / mcmicro

Multiple-choice microscopy pipeline
https://mcmicro.org/
MIT License
104 stars 58 forks source link

MCMICRO not recognizing params.yml file #520

Closed smith6jt-cop closed 12 months ago

smith6jt-cop commented 12 months ago

Hello,

I am running on WSL2. I have created a params.yml file in the project directory image image image

but nextflow starts at registration. What could be wrong?

ArtemSokolov commented 12 months ago

Hi @smith6jt-cop,

I'm not seeing any obvious problems in your screenshots. Do you get the same problem when running exemplar-001?

Also, can you look at qc/params.yml? This is where the pipeline saves every single parameter to enable full reproducibility. Does qc/params.yml show start-at: illumination?

smith6jt-cop commented 12 months ago

Thanks for helpling.

I had run exemplar-001 as downloaded earlier today with success. After I copied my params.yml file to the exemplar-oo1 folder I received:

N E X T F L O W ~ version 23.04.4 Launchinghttps://github.com/labsyspharm/mcmicro` [pensive_mclean] DSL2 - revision: 01c11e5615 [master] executor > local (1) [- ] process > illumination - [50/80a654] process > registration:ashlar [ 0%] 0 of 1 [- ] process > background:backsub - [- ] process > dearray:coreograph - [- ] process > dearray:roadie:runTask - [- ] process > segmentation:roadie:runTask - [- ] process > segmentation:worker - [- ] process > segmentation:s3seg - [- ] process > quantification:mcquant - [- ] process > downstream:worker - [- ] process > viz:autominerva - ERROR ~ Error executing process > 'registration:ashlar'

Caused by: Process registration:ashlar terminated with an error exit status (1)

Command executed:

ashlar 'exemplar-001-cycle-06.ome.tiff' 'exemplar-001-cycle-07.ome.tiff' 'exemplar-001-cycle-08.ome.tiff' --flip-y -c 5 --ffp exemplar-001-cycle-06-ffp.tif exemplar-001-cycle-07-ffp.tif exemplar-001-cycle-08-ffp.tif --dfp exemplar-001-cycle-06-dfp.tif exemplar-001-cycle-07-dfp.tif exemplar-001-cycle-08-dfp.tif -o exemplar-001.ome.tif

Command exit status: 1

Command output: Stitching and registering input images executor > local (1) [- ] process > illumination - [50/80a654] process > registration:ashlar [100%] 1 of 1, failed: 1 ✘ [- ] process > background:backsub - [- ] process > dearray:coreograph - [- ] process > dearray:roadie:runTask - [- ] process > segmentation:roadie:runTask - [- ] process > segmentation:worker - [- ] process > segmentation:s3seg - [- ] process > quantification:mcquant - [- ] process > downstream:worker - [- ] process > viz:autominerva - ERROR ~ Error executing process > 'registration:ashlar'

Caused by: Process registration:ashlar terminated with an error exit status (1)

Command executed:

ashlar 'exemplar-001-cycle-06.ome.tiff' 'exemplar-001-cycle-07.ome.tiff' 'exemplar-001-cycle-08.ome.tiff' --flip-y -c 5 --ffp exemplar-001-cycle-06-ffp.tif exemplar-001-cycle-07-ffp.tif exemplar-001-cycle-08-ffp.tif --dfp exemplar-001-cycle-06-dfp.tif exemplar-001-cycle-07-dfp.tif exemplar-001-cycle-08-dfp.tif -o exemplar-001.ome.tif

Command exit status: 1

Command output: Stitching and registering input images Cycle 0: reading exemplar-001-cycle-06.ome.tiff

  assembling thumbnail 1/6

Command error: WARNING: Stage coordinates' measurement unit is undefined; assuming μm. Stitching and registering input images Cycle 0: reading exemplar-001-cycle-06.ome.tiff

  assembling thumbnail 1/6Traceback (most recent call last):
File "/usr/local/bin/ashlar", line 8, in <module>
  sys.exit(main())
File "/usr/local/lib/python3.10/dist-packages/ashlar/scripts/ashlar.py", line 212, in main
  return process_single(
File "/usr/local/lib/python3.10/dist-packages/ashlar/scripts/ashlar.py", line 243, in process_single
  edge_aligner.run()
File "/usr/local/lib/python3.10/dist-packages/ashlar/reg.py", line 482, in run
  self.make_thumbnail()
File "/usr/local/lib/python3.10/dist-packages/ashlar/reg.py", line 493, in make_thumbnail
  self.reader.thumbnail = thumbnail.make_thumbnail(
File "/usr/local/lib/python3.10/dist-packages/ashlar/thumbnail.py", line 20, in make_thumbnail
  img = reader.read(c=channel, series=i)
File "/usr/local/lib/python3.10/dist-packages/ashlar/reg.py", line 427, in read
  img = self.reader.read(series, c)
File "/usr/local/lib/python3.10/dist-packages/ashlar/reg.py", line 403, in read
  index = self.metadata._reader.getIndex(0, c, 0)
File "jnius/jnius_export_class.pxi", line 1177, in jnius.JavaMultipleMethod.__call__
File "jnius/jnius_export_class.pxi", line 885, in jnius.JavaMethod.__call__
File "jnius/jnius_export_class.pxi", line 982, in jnius.JavaMethod.call_method
File "jnius/jnius_utils.pxi", line 91, in jnius.check_exception

jnius.JavaException: JVM exception occurred: Invalid C index: 5/4 java.lang.IllegalArgumentException

Work dir: /home/smith6jt/work/50/80a65498f09160e55d02b840bf742b

Tip: view the complete command output by changing to the process work dir and entering the command cat .command.out

-- Check '.nextflow.log' file for details`

The qc/params.yml file from the run on my data looks like default: image

ArtemSokolov commented 12 months ago

Yea, it's very clearly not picking up your params.yml, but nothing obvious jumps out from the screenshots.

Can you do cat -A params.yml on the command line in WSL2? It will display all hidden characters. My only thought is that maybe if you made the file in a Windows text editor, it may have added special characters that are making it problematic for parsing in Linux.

Here is what it should look like in Linux:

$ cat -A exemplar-001/params.yml 
workflow:$
  start-at: illumination$
  stop-at: registration$

The $ indicates end-of-line, and there should be no other special characters.

smith6jt-cop commented 12 months ago

Getting ^M$

ArtemSokolov commented 12 months ago

Do you have a text editor in WSL2? Emacs, vim, nano?

May be worth trying to create params.yml natively in Linux. If you don't have an editor, you can also do cat > params.yml, then enter the text, followed by pressing CTRL+D to terminate the file.

If it's still not working, I will try asking around to see if any other Windows users ever encountered this problem. I can't reproduce this issue in a Linux environment.

smith6jt-cop commented 12 months ago

I wrote in nano and it fixed the problem. Thank you!