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 with selector attribute #298

Closed
nsheff opened this issue May 2, 2019 · 1 comment

Comments

@nsheff
Copy link
Contributor

commented May 2, 2019

I'm not sure why this is not working on microtest:

looper run config/microtest_config.yaml -d --selector-attribute "protocol" --selector-include "ATAC-seq"
Command: run (Looper version: 0.11.1)
Loading divvy config file: /nm/t1/databio/pepenv/uva_rivanna.yaml
Activating compute package 'default'
Setting sample sheet from file '/sfs/lustre/scratch/ns5bc/code/microtest/config/microtest_annotation.csv'
Ignoring nonexistent pipeline interface location: '/home/ns5bc/code//open_pipelines/pipeline_interface.yaml'
Traceback (most recent call last):
  File "/home/ns5bc/.local/bin/looper", line 10, in <module>
    sys.exit(main())
  File "/home/ns5bc/.local/lib/python3.6/site-packages/looper/looper.py", line 819, in main
    run = Runner(prj)
  File "/home/ns5bc/.local/lib/python3.6/site-packages/looper/looper.py", line 65, in __init__
    self.counter = LooperCounter(len(prj.samples))
  File "/home/ns5bc/.local/lib/python3.6/site-packages/peppy/project.py", line 107, in __getattr__
    selector_include=self.include, selector_exclude=self.exclude)
  File "/home/ns5bc/.local/lib/python3.6/site-packages/peppy/utils.py", line 181, in fetch_samples
    if proj.samples and not any([hasattr(i, selector_attribute) for i in proj.samples]):
  File "/home/ns5bc/.local/lib/python3.6/site-packages/peppy/utils.py", line 181, in <listcomp>
    if proj.samples and not any([hasattr(i, selector_attribute) for i in proj.samples]):
TypeError: hasattr(): attribute name must be string

maybe a python3 problem?

@vreuter

This comment has been minimized.

Copy link
Member

commented May 2, 2019

My guess is that looper reads the inclusions/exclusions from the CLI as a list (nargs='*'), and then that value is being passed through the ProjectContext and requested as a single attribute on a Samlpe

@vreuter vreuter added the bug label May 2, 2019

@vreuter vreuter self-assigned this May 2, 2019

@vreuter vreuter added this to the 0.21 milestone May 2, 2019

vreuter added a commit to pepkit/looper that referenced this issue May 2, 2019

vreuter added a commit to vreuter/peppy that referenced this issue May 2, 2019

vreuter added a commit that referenced this issue May 2, 2019

Merge pull request #300 from vreuter/select-cli
safer sample selection; #298; fix docstring

@vreuter vreuter closed this May 2, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.