AntonelliLab / seqcap_processor

Bioinformatic pipeline for processing Sequence Capture data for Phylogenetics
MIT License
21 stars 12 forks source link

KeyError in locus_selection.py #22

Open ThibauldMichel opened 3 years ago

ThibauldMichel commented 3 years ago

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