steinbock icon indicating copy to clipboard operation
steinbock copied to clipboard

MCD Directory Checked Even if Only TXT Path Specified

Open DarioS opened this issue 8 months ago • 2 comments

I specified --txt . but have error Error: Invalid value for '--mcd': Directory 'raw' does not exist.. The breast cancer data I downloaded has only TXT files and no MCD ones. I had to set the dummy --mcd . for it to work.

DarioS avatar Jul 25 '25 00:07 DarioS

@DarioS Please provide more context to your issue, eg. full command run, OS, steinbock version, if run on a pip installation or docker container.

victorjonathanibanez avatar Sep 22 '25 13:09 victorjonathanibanez

Sometimes, a data set e.g. Bodenmiller's breast cancer provides only TXT files and no MCDs.

# In current version of software:
@click.option(
    "--mcd",
    "mcd_dir",
    type=click.Path(exists=True, file_okay=False),
    default="raw",
    show_default=True,
    help="Path to the IMC .mcd/.zip file directory",
)

@click.option(
    "--txt",
    "txt_dir",
    type=click.Path(exists=True, file_okay=False),
    default="raw",
    show_default=True,
    help="Path to the IMC .txt/.zip file directory",
)

Having a default value of --mcd causes an issue because there is no directory named raw. All I was suggesting is that --mcd could be gracefully ignored if only --txt was user-specified. In any case, I am unsure why raw is the default folder name for either of these two parameters if that is not what the Hyperion instrument always creates.

DarioS avatar Sep 22 '25 21:09 DarioS