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 while parsing optional columns in snappy pull-sheets #120

Open
eudesbarbosa opened this issue Sep 9, 2022 · 0 comments
Open

Error while parsing optional columns in snappy pull-sheets #120

eudesbarbosa opened this issue Sep 9, 2022 · 0 comments

Comments

@eudesbarbosa
Copy link
Member

Issue
The pull sheet routine fails during mapping if columns that should be optional have unexpected values.

Error while mapping SEX:

I 220909 09:00:32] Starting to pull sheet...
[I 220909 09:00:32]   Args: Namespace(verbose=False, config=None, sodar_server_url=None, sodar_api_token=None, cmd='snappy', snappy_cmd=<function run at  >, base_path='/path/to/project/', yes=False, dry_run=False, show_diff=True, show_diff_side_by_side=False, library_types=[])
[I 220909 09:00:32] Will start at /path/to/project
[I 220909 09:00:32] Loading data sets from /path/to/project/.snappy_pipeline/config.yaml
[I 220909 09:00:32] Loaded 1 data sets, 1 with SODAR UUID
[I 220909 09:00:32] Pulling for 1 datasets
Traceback (most recent call last):
  File "path/to/env/bin/cubi-tk", line 33, in <module>
    sys.exit(load_entry_point('cubi-tk', 'console_scripts', 'cubi-tk')())
  File "/path/to/cubi-tk/cubi_tk/__main__.py", line 123, in main
    res = cmds[args.cmd](args, parser, subparsers.choices[args.cmd] if args.cmd else None)
  File "/path/to/cubi-tk/cubi_tk/snappy/__init__.py", line 130, in run
    return args.snappy_cmd(args, parser, subparser)
  File "/path/to/cubi-tk/cubi_tk/snappy/pull_sheets.py", line 304, in run
    build_sheet(config, dataset.sodar_uuid),
  File "/path/to/cubi-tk/cubi_tk/snappy/pull_sheets.py", line 264, in build_sheet
    MAPPING_SEX[source.sex.lower()],
KeyError: ''

Error while mapping AFFECTED:

[I 220909 09:34:05] Starting to pull sheet...
[I 220909 09:34:05]   Args: Namespace(verbose=False, config=None, sodar_server_url=None, sodar_api_token=None, cmd='snappy', snappy_cmd=<function run at  >, base_path='/path/to/project', yes=False, dry_run=False, show_diff=True, show_diff_side_by_side=False, library_types=[])
[I 220909 09:34:05] Will start at /path/to/project
[I 220909 09:34:05] Loading data sets from /path/to/project/.snappy_pipeline/config.yaml
[I 220909 09:34:05] Loaded 1 data sets, 1 with SODAR UUID
[I 220909 09:34:05] Pulling for 1 datasets
Traceback (most recent call last):
  File "path/to/env/bin/cubi-tk", line 33, in <module>
    sys.exit(load_entry_point('cubi-tk', 'console_scripts', 'cubi-tk')())
  File "/path/to/cubi-tk/cubi_tk/__main__.py", line 123, in main
    res = cmds[args.cmd](args, parser, subparsers.choices[args.cmd] if args.cmd else None)
  File "/path/to/cubi-tk/cubi_tk/snappy/__init__.py", line 130, in run
    return args.snappy_cmd(args, parser, subparser)
  File "/path/to/cubi-tk/cubi_tk/snappy/pull_sheets.py", line 304, in run
    build_sheet(config, dataset.sodar_uuid),
  File "/path/to/cubi-tk/cubi_tk/snappy/pull_sheets.py", line 265, in build_sheet
    MAPPING_STATUS[source.affected.lower()],
AttributeError: 'NoneType' object has no attribute 'lower'

To Reproduce

  1. Create snappy project for case described in Duplicate sequencing #62
  2. Run: cubi-tk snappy pull-sheets

Expected behavior
Sample sheet should creation shouldn't fail.

Additional context
NA

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant