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

Error using --sel-excl flag: TypeError: 'in <string>' requires string as left operand, not list #543

Open
nleroy917 opened this issue Feb 7, 2025 · 1 comment
Labels

Comments

@nleroy917
Copy link
Member

I just hit an error using looper and the --sel-excl flag. I was trying to exclude a specific set of samples from running through my pipeline. As such I was using the --sel-attr + --sel-excl flags. Here is the full traceback:

 Traceback (most recent call last):
  File "/sfs/gpfs/tardis/home/xjk5hp/code/scripts/model-training/atacformer-scatlas-base/.venv/bin/looper", line 8, in <module>
    sys.exit(main_cli())
             ^^^^^^^^^^
  File "/sfs/gpfs/tardis/home/xjk5hp/code/scripts/model-training/atacformer-scatlas-base/.venv/lib/python3.11/site-packages/looper/cli_pydantic.py", line 357, in main_cli
    main()
  File "/sfs/gpfs/tardis/home/xjk5hp/code/scripts/model-training/atacformer-scatlas-base/.venv/lib/python3.11/site-packages/looper/cli_pydantic.py", line 353, in main
    return run_looper(args, parser, test_args=test_args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/sfs/gpfs/tardis/home/xjk5hp/code/scripts/model-training/atacformer-scatlas-base/.venv/lib/python3.11/site-packages/looper/cli_pydantic.py", line 269, in run_looper
    run = Runner(prj)
          ^^^^^^^^^^^
  File "/sfs/gpfs/tardis/home/xjk5hp/code/scripts/model-training/atacformer-scatlas-base/.venv/lib/python3.11/site-packages/looper/looper.py", line 74, in __init__
    self.counter = LooperCounter(len(prj.samples))
                                     ^^^^^^^^^^^
  File "/sfs/gpfs/tardis/home/xjk5hp/code/scripts/model-training/atacformer-scatlas-base/.venv/lib/python3.11/site-packages/looper/project.py", line 63, in __getattr__
    return fetch_samples(
           ^^^^^^^^^^^^^^
  File "/sfs/gpfs/tardis/home/xjk5hp/code/scripts/model-training/atacformer-scatlas-base/.venv/lib/python3.11/site-packages/looper/project.py", line 829, in fetch_samples
    kept_samples = list(filter(keep, kept_samples))
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/sfs/gpfs/tardis/home/xjk5hp/code/scripts/model-training/atacformer-scatlas-base/.venv/lib/python3.11/site-packages/looper/project.py", line 818, in keep
    return not hasattr(s, selector_attribute) or getattr(
                                                 ^^^^^^^^
TypeError: 'in <string>' requires string as left operand, not list

The reason I believe its the --sel-excl flag killing things is because of where this error originates. Moreover, running without this flag lets the pipeline run as normal.

@nleroy917
Copy link
Member Author

nleroy917 commented Feb 7, 2025

Here is the data -- although I don't think its PEP-specific:
subsamples.csv
samples.csv

pep_version: 2.1.0
sample_table: samples.csv
subsample_table: subsamples.csv
sample_table_index: cr_sample_name
subsample_table_index: file_uuid
name: atlas
description: Datasets (fastqs) to be used in the training of Atacformer.

@nleroy917 nleroy917 added the bug label Feb 7, 2025
@nleroy917 nleroy917 marked this as a duplicate of #542 Feb 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant