BodenmillerGroup / ImcSegmentationPipeline

A pixel classification based multiplexed image segmentation pipeline
https://bodenmillergroup.github.io/ImcSegmentationPipeline/
MIT License
83 stars 35 forks source link

Assertion Error in imc_preprocessing #79

Closed marinabroz closed 2 years ago

marinabroz commented 2 years ago

Hello,

I have successfully run the pipeline before on another computer, but on my other desktop I am running into this error.

When running this chunk in the jupyter notebook:

%%time failed_images = list() re_fn = re.compile(input_file_regexp)

for fol in folders_path_inputs: for fn in fol.glob('*'): if re_fn.match(fn.name): mcdfolder2imcfolder.mcdfolder_to_imcfolder(fn, output_folder=folder_path_ome, create_zip=False)

I am getting the following error:

AssertionError Traceback (most recent call last)

in ~\Miniconda3\envs\ImcSegmentationPipeline\lib\site-packages\imctools\converters\mcdfolder2imcfolder.py in mcdfolder_to_imcfolder(input, output_folder, create_zip, parse_txt) 45 mcd_files = list(input_folder.rglob(f"*{MCD_FILENDING}")) 46 mcd_files = [f for f in mcd_files if not f.name.startswith(".")] ---> 47 assert len(mcd_files) == 1 48 input_folder = mcd_files[0].parent 49 schema_files = glob.glob(str(input_folder / f"*{SCHEMA_FILENDING}")) AssertionError: Can you please assist?
marinabroz commented 2 years ago

I am working in Windows 10, and I have two Mcd files for this analysis, they are both in separate zip folders with the individual txt files.

nilseling commented 2 years ago

Hi @marinabroz

could you please let us know the imctools version that you are using? The error likely means that no files could be read in. Please make sure that the input_file_regexp variable is correctly set to find the files that you want to process. Best,

Nils

nilseling commented 2 years ago

Assuming this is fixed now