Skip to content

KeyError in locus_selection.py #22

@ThibauldMichel

Description

@ThibauldMichel

Hello Tobias,

I am reporting an issue, but I am not sure if the problem is the code or my dataset format.
I am using secapr 2.1.1.
During the locus selection step of the pipeline, a KeyError appear:

Reading read-depth info for B.........
Generating locus database.........
Traceback (most recent call last):
  File "/mnt/shared/scratch/usr/apps/conda/envs/secapr_env/bin/secapr", line 10, in <module>
    sys.exit(main())
  File "/mnt/shared/scratch/usr/apps/conda/envs/secapr_env/lib/python3.8/site-packages/secapr/__main__.py", line 55, in main
    args.func(args)
  File "/mnt/shared/scratch/usr/apps/conda/envs/secapr_env/lib/python3.8/site-packages/secapr/locus_selection.py", line 312, in main
    reference_pickle = reference_file_dict[sample]
KeyError: 'B'

Given my still rudimentary understanding of Python code, I know the script is trying to access the key inside a non-existent dictionary. But I can't find the source of the problem.
Would you think it is a problem with the code, or with my dataset?

Kind regards,

Thibauld

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions