Skip to content

Division by zero error on aDNA dataset #23

@ThibauldMichel

Description

@ThibauldMichel

Hello Tobias,

Here is another issue, with a dataset including aDNA samples. I am not sure if an insufficient coverage is the cause of the problem here, as there is a division by zero error at the locus selection step of the pipeline.
I am using secapr 2.1.1.

Not sufficiently many loci (2500) were found that have an average read-coverage of 3.000000 for all samples. Extracting all 0 loci that fulfil this requirement.
Traceback (most recent call last):
  File "/mnt/shared/scratch/tmichel/apps/conda/envs/secapr_env/bin/secapr", line 10, in <module>
    sys.exit(main())
  File "/mnt/shared/scratch/tmichel/apps/conda/envs/secapr_env/lib/python3.8/site-packages/secapr/__main__.py", line 55, in main
    args.func(args)
  File "/mnt/shared/scratch/tmichel/apps/conda/envs/secapr_env/lib/python3.8/site-packages/secapr/locus_selection.py", line 352, in main
    target_loci = extract_best_loci(subfolder_file_dict,sample_bam_dict,output_folder,n,threshold,input_type,input_dir,new_file_plot)
  File "/mnt/shared/scratch/tmichel/apps/conda/envs/secapr_env/lib/python3.8/site-packages/secapr/locus_selection.py", line 215, in extract_best_loci
    average = sum(selection[column])/no_of_loci
ZeroDivisionError: division by zero

Kind regards,

Thibauld

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions