Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Input structure to run .nd2 files as FOVs #512

Open
Boehmin opened this issue Jul 27, 2023 · 4 comments
Open

Input structure to run .nd2 files as FOVs #512

Boehmin opened this issue Jul 27, 2023 · 4 comments

Comments

@Boehmin
Copy link

Boehmin commented Jul 27, 2023

I've been trying to run the stitching+registration on my data: .nd2 files, FOVs saved individually: In total 8 rounds a 47 FOVs a 5 channels each

Going through some of the issues on github I saw that some others had similar file structures (img_cycle_FOV.filename), however reading through the ashlar documentation I read that only one image file should be processed per cycle?

How do I go about supplying the right information in params.yml for the ashlar module in mcmicro to recognise that I have multiple FOVs? Is this possible? Attached are myparams.yml and markers.csv the way I ran them currently.
markers.csv
myparams.txt

That's the error I receive (full nextflow log attached
nextflowlog.txt
):

Command exit status:
  1

Command output:
  
          merging tile 1/1
  Cycle 194:
      Channel 0:
  
          merging tile 1/1
      Channel 1:
  
          merging tile 1/1
      Channel 2:
  
          merging tile 1/1
      Channel 3:
  
          merging tile 1/1
      Channel 4:
  
          merging tile 1/1
  Cycle 195:
      Channel 0:
  
          merging tile 1/1
      Channel 1:
  
          merging tile 1/1
      Channel 2:
  
          merging tile 1/1
      Channel 3:
  
          merging tile 1/1
      Channel 4:
  
          merging tile 1/1
  Cycle 196:
      Channel 0:
  
          merging tile 1/1
      Channel 1:
  
          merging tile 1/1
      Channel 2:
  
          merging tile 1/1
      Channel 3:
  
          merging tile 1/1
      Channel 4:
  
          merging tile 1/1

Command error:
  Cycle 196:
      Channel 0:
  
          merging tile 1/1
      Channel 1:
  
          merging tile 1/1
      Channel 2:
  
          merging tile 1/1
      Channel 3:
  
          merging tile 1/1
      Channel 4:
  
          merging tile 1/1Traceback (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 277, in process_single
      writer.run()
    File "/usr/local/lib/python3.10/dist-packages/ashlar/reg.py", line 1228, in run
      tiff.write(
    File "/usr/local/lib/python3.10/dist-packages/tifffile/tifffile.py", line 3049, in write
      iteritem, dataiter = peek_iterator(dataiter)
    File "/usr/local/lib/python3.10/dist-packages/tifffile/tifffile.py", line 21409, in peek_iterator
      first = next(iterator)
    File "/usr/local/lib/python3.10/dist-packages/tifffile/tifffile.py", line 21413, in newiter
      yield from iterator
    File "/usr/local/lib/python3.10/dist-packages/tifffile/tifffile.py", line 21413, in newiter
      yield from iterator
    File "/usr/local/lib/python3.10/dist-packages/tifffile/tifffile.py", line 21413, in newiter
      yield from iterator
    [Previous line repeated 981 more times]
    File "/usr/local/lib/python3.10/dist-packages/ashlar/reg.py", line 1180, in base_tiles
      img = mosaic.assemble_channel(channel)
    File "/usr/local/lib/python3.10/dist-packages/ashlar/reg.py", line 1088, in assemble_channel
      img = self.aligner.reader.read(c=channel, series=si)
    File "/usr/local/lib/python3.10/dist-packages/ashlar/reg.py", line 405, in read
      dtype = self.metadata.pixel_dtype
    File "/usr/local/lib/python3.10/dist-packages/ashlar/reg.py", line 304, in pixel_dtype
      return self._pixel_dtypes[self._metadata.getPixelsType(0).value]
    File "jnius/jnius_export_class.pxi", line 885, in jnius.JavaMethod.__call__
    File "jnius/jnius_export_class.pxi", line 967, in jnius.JavaMethod.call_method
    File "jnius/jnius_conversion.pxi", line 240, in jnius.convert_jobject_to_python
    File "/usr/local/lib/python3.10/dist-packages/jnius/reflect.py", line 203, in autoclass
      cls = MetaJavaClass.get_javaclass(jniname, classparams=(include_protected, include_private))
    File "jnius/jnius_export_class.pxi", line 164, in jnius.MetaJavaClass.get_javaclass
  RecursionError: maximum recursion depth exceeded in comparison

Work dir:
  /scicore/home/rueegg/boehm0002/miniconda3/envs/nextflow/work/9b/3ff3a47792c4b7d4cc97a922918444

Tip: you can replicate the issue by changing to the process work dir and entering the command `bash .command.run`

 -- Check '.nextflow.log' file for details
@ArtemSokolov
Copy link
Collaborator

@jmuhlich, @Yu-AnChen Should this be handled using the fileseries interface?

@Boehmin
Copy link
Author

Boehmin commented Aug 2, 2023

@ArtemSokolov are you referring to the Galaxy workflow? This I haven`t tried yet.

@ArtemSokolov
Copy link
Collaborator

No, ASHLAR has an undocumented feature called fileseries, which lets you explicitly map parts of the filename to tile number and cycle number.

Some discussions about it can be found in:

MCMICRO doesn't wrap this feature, so you would need to run ASHLAR "by hand" (using instructions at https://github.com/labsyspharm/ashlar). However, once you have a registered image, you can place it into the registration/ subfolder of your project and add the following to your params.yml to run the rest of the pipeline:

workflow:
  start-at: segmentation

@Boehmin
Copy link
Author

Boehmin commented Aug 4, 2023

Thank you for the advice, I will try this! I do not acquire images in a conventional grid so I`m waiting for some support from the ASHLAR team.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants