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

Running an "IndexError: list index out of range" error #178

Open
XNN19 opened this issue Jan 23, 2024 · 5 comments
Open

Running an "IndexError: list index out of range" error #178

XNN19 opened this issue Jan 23, 2024 · 5 comments

Comments

@XNN19
Copy link

XNN19 commented Jan 23, 2024

Hi folks:

I installed the CyLinter environment on a macOS platform. Using these commends:

  545  mkdir -p ./miniconda3
  546  ls
  547  curl https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-arm64.sh -o ~/miniconda3/miniconda.sh\nbash ~/miniconda3/miniconda.sh -b -u -p ~/miniconda3
  548  ls
  549  ls miniconda3
  550  bash ~/miniconda3/miniconda.sh -b -u -p ~/miniconda3
  551  rm -rf ./miniconda3/miniconda.sh
  552  conda update -n base conda
  553  conda install -n base conda-libmamba-solver
  554  conda config --set solver libmamba
  555  conda create -n cylinter -c conda-forge -c gjbaker -c labsyspharm python=3 cylinter=0.0.47
  556  ls
  557  ls miniconda3/envs/cylinter/lib/python3.10/site-packages/cylinter
  558  conda activate cylinter
  559  conda init
  560  conda activate cylinter
  561  cylinter ./miniconda3/envs/cylinter/lib/python3.10/site-packages/cylinter/config.yml
  562  pwd
  563  cylinter /Users/xyun/miniconda3/envs/cylinter/lib/python3.10/site-packages/cylinter/config.yml
  564  sudo cylinter /Users/xyun/miniconda3/envs/cylinter/lib/python3.10/site-packages/cylinter/config.yml
  565  conda install -c bioconda synapseclient
  566  synapse get -r syn52859560 --downloadLocation ~/Desktop/cylinter_demo  # Enter Synapse ID and password when prompted.
  567  vim ./Desktop/cylinter_demo/config.yml
  568  cylinter ./Desktop/cylinter_demo/config.yml

But when I ran the 561 and 568 commands, I met the following error:

(cylinter) xyun@DN2tfcym ~ » cylinter ./Desktop/cylinter_demo/config.yml
INFO: Reading configuration file
INFO: Executing pipeline
Running: <function aggregateData at 0x1531172e0>
INFO: ======================================================================
INFO: RUNNING MODULE: aggregateData

Traceback (most recent call last):
  File "/Users/xyun/miniconda3/envs/cylinter/bin/cylinter", line 10, in <module>
    sys.exit(main())
  File "/Users/xyun/miniconda3/envs/cylinter/lib/python3.10/site-packages/cylinter/cylinter.py", line 49, in main
    pipeline.run_pipeline(config, args.module)
  File "/Users/xyun/miniconda3/envs/cylinter/lib/python3.10/site-packages/cylinter/pipeline.py", line 132, in run_pipeline
    data = module(data, qc, config)  # getattr(qc, module)
  File "/Users/xyun/miniconda3/envs/cylinter/lib/python3.10/site-packages/cylinter/components.py", line 56, in wrapper
    result = func(*args, **kwargs)
  File "/Users/xyun/miniconda3/envs/cylinter/lib/python3.10/site-packages/cylinter/modules/aggregateData.py", line 14, in aggregateData
    check, markers_filepath = input_check(self)
  File "/Users/xyun/miniconda3/envs/cylinter/lib/python3.10/site-packages/cylinter/utils.py", line 139, in input_check
    segmentation_method = key.split('--')[1].split('_')[0]
IndexError: list index out of range

I tried but still couldn't figure out the problem. I am afraid I am missing something silly, thank you for the help.

Best regards,

@gjbaker
Copy link
Member

gjbaker commented Jan 24, 2024

Hi @XNN19!

The error suggests you are trying to pass native MCMICRO output files as input into CyLinter, but the names of the csv files (containing single cell data) which are passed as keys to the sampleMetadata parameter in the config.yml file do not contain the expected '--' delimiter. Have you updated the config.yml template with your experiment specific file names? To better diagnose the problem, it would be helpful to see your current config.yml file and CyLinter input directory tree structure. More details on CyLinter input directory structure can be found here: https://labsyspharm.github.io/cylinter/structure/.

-Greg

@XNN19
Copy link
Author

XNN19 commented Jan 25, 2024

Hi @gjbaker

Thank you for your patient reply.
It turns out that the issue was indeed with the config.yml file, which I have now set up correctly. However, I encountered another error even after fixing the configuration. The error message is:

TypeError: cannot unpack non-iterable bool object

I suspected the issue might be related to the dependencies in conda environment, so I re-installed CyLinter in a new conda environment. I'm pleased to report that it seems to be working fine now.

Best regards,

@josenimo
Copy link

@XNN19 @gjbaker
I am trying to setup a workstation (win10) at the lab that can allow other users to use cylinter.
Right now, I am actually having the same exact stack trace that @XNN19 had above, I cannot run the example dataset for some reason. I looked into the sampleMetadata parameter inside the config.yml and the filenames are the same as the csv.

15 minutes later, I downloaded the sample data again and it worked, perhaps this helps someone :)

@AditiSirsikar
Copy link

I received the same two errors mentioned above. If the suggestions already provided do not work, I noticed that ome.tif files versus ome.tiff are preferred regardless of the directions in the YAML Configuration File.

@gjbaker
Copy link
Member

gjbaker commented Feb 27, 2024

Thank you for your comment @AditiSirsikar! I have updated the YAML configuration file to specify TIF (not TIFF). We will be releasing a new version soon with new features and which hopefully avoids future errors related to parsing input data files.

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

4 participants