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

Python keywords cause errors when used as tag names #24

Open
karel-brinda opened this issue Apr 23, 2019 · 1 comment
Open

Python keywords cause errors when used as tag names #24

karel-brinda opened this issue Apr 23, 2019 · 1 comment
Labels

Comments

@karel-brinda
Copy link
Owner

$ samsift -i filtered.sam -f 'is>50'
...
Traceback (most recent call last):
  File "/home/kb219/miniconda/bin/samsift", line 11, in <module>
    sys.exit(main())
  File "/home/kb219/miniconda/lib/python3.6/site-packages/samsift/samsift.py", line 418, in main
    sam_sift.run()
  File "/home/kb219/miniconda/lib/python3.6/site-packages/samsift/samsift.py", line 283, in run
    self.process_alignment(alignment)
  File "/home/kb219/miniconda/lib/python3.6/site-packages/samsift/samsift.py", line 248, in process_alignment
    self._filter()
  File "/home/kb219/miniconda/lib/python3.6/site-packages/samsift/samsift.py", line 182, in _filter
    self.passes=eval(self.filter, self.vardict)
  File "<string>", line 1
    is>50
     ^
SyntaxError: invalid syntax
@karel-brinda
Copy link
Owner Author

Solution:

samsift -i filtered.sam -f 'locals()["is"]>50'

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