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

IndexError: list index out of range #32

Closed
wdecoster opened this issue Jun 25, 2021 · 4 comments
Closed

IndexError: list index out of range #32

wdecoster opened this issue Jun 25, 2021 · 4 comments

Comments

@wdecoster
Copy link

Hi,

I just pulled from GitHub to see if it was already solved, but also the most recent version raises the error below.

This is my command, force calling variants in a bam split by phase

bash <path>/run_clair3.sh --bam_fn=<path>/alignment_HP2.bam --vcf_fn=called_variants.vcf.gz --print_ref_calls --ref_fn=GRCh38.fa --threads=5 --platform="ont" --model_path="<path>/Clair3/models/ont" --output=$output --haploid_sensitive --ctg_name=<chrom> --sample_name=$name

There is a bunch of output before this, and I can email the log files (but not post them here publicly).

== SUMMARY ==
Total alignments processed:                     18712
Alignments that could be tagged:                  641
Alignments spanning multiple phase sets:            0
haplotag - total processing time: 14.516802549362183

real	0m15.604s
user	0m14.753s
sys	0m0.862s

real	0m0.507s
user	0m3.805s
sys	0m0.247s
[INFO] 5/7 Select candidates for full alignment
[INFO] Select variant quality cut off 7.0
[INFO] Select reference quality cut off 21.0
[INFO] Total low qual ref variants to procceed in <chrom>: 11607
[INFO] Total low qual variants to procceed in <chrom>: 261

real	0m0.448s
user	0m0.334s
sys	0m0.134s
[INFO] 6/7 Calling variants using Full Alignment
[INFO] Delay 9 seconds before starting variant calling ...
[mpileup] 1 samples in 1 input files
Traceback (most recent call last):
  File "/home/wdecoster/repositories/Clair3/clair3/../clair3.py", line 89, in <module>
    main()
  File "/home/wdecoster/repositories/Clair3/clair3/../clair3.py", line 83, in main
    submodule.main()
  File "/home/wdecoster/repositories/Clair3/preprocess/CreateTensorFullAlignment.py", line 945, in main
    CreateTensorFullAlignment(args)
  File "/home/wdecoster/repositories/Clair3/preprocess/CreateTensorFullAlignment.py", line 723, in CreateTensorFullAlignment
    pos = next(samtools_pileup_generator)
  File "/home/wdecoster/repositories/Clair3/preprocess/CreateTensorFullAlignment.py", line 661, in samtools_pileup_generator_from
    if hap in '12' and read_name_list[hap_idx] not in hap_dict:
IndexError: list index out of range
Calling variants ...
Total process positions in <chrom> : 0
Total time elapsed: 0.00 s
[INFO] No vcf output for file <path>/alignment_HP2/tmp/full_alignment_output/full_alignment_<chrom>.0_2.vcf, remove empty file
CreateTensor.py exited with exceptions. Exiting...
[INFO] Delay 6 seconds before starting variant calling ...
[mpileup] 1 samples in 1 input files
Traceback (most recent call last):
  File "/home/wdecoster/repositories/Clair3/clair3/../clair3.py", line 89, in <module>
    main()
  File "/home/wdecoster/repositories/Clair3/clair3/../clair3.py", line 83, in main
    submodule.main()
  File "/home/wdecoster/repositories/Clair3/preprocess/CreateTensorFullAlignment.py", line 945, in main
    CreateTensorFullAlignment(args)
  File "/home/wdecoster/repositories/Clair3/preprocess/CreateTensorFullAlignment.py", line 723, in CreateTensorFullAlignment
    pos = next(samtools_pileup_generator)
  File "/home/wdecoster/repositories/Clair3/preprocess/CreateTensorFullAlignment.py", line 661, in samtools_pileup_generator_from
    if hap in '12' and read_name_list[hap_idx] not in hap_dict:
IndexError: list index out of range
Calling variants ...
Total process positions in <chrom> : 0
Total time elapsed: 0.00 s
[INFO] No vcf output for file <path>/alignment_HP2/tmp/full_alignment_output/full_alignment_<chrom>.1_2.vcf, remove empty file
CreateTensor.py exited with exceptions. Exiting...

real	0m33.027s
user	0m9.886s
sys	0m1.735s
cat: <path>/alignment_HP2/tmp/full_alignment_output/full_alignment_*.vcf: No such file or directory

Thanks,
Wouter

@aquaskyline
Copy link
Member

Seems to be an error different from the last time. Yes please send me the logs at [email protected].

@wdecoster
Copy link
Author

Fixed in the latest version, thanks @aquaskyline !

@mcortes-lopez
Copy link

I am having the same issue with the version installed via bioconda.

@aquaskyline
Copy link
Member

@mcortes-lopez probably not the same problem, if you can send me your logs, I can give them a check.

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

3 participants