bcgsc / straglr

Tandem repeat expansion detection or genotyping from long-read alignments
Other
50 stars 9 forks source link

IndexError: list index out of range #25

Closed santoshe1 closed 8 months ago

santoshe1 commented 11 months ago

Hello,

I am running Straglr for multiple samples and one of the samples is unsuccessful with the below error:

Command

python straglr.py <sample.bam> <ref.fna>

Error:

Aug 04, 2023 10:00:57:IndexError: list index out of range
Aug 04, 2023 10:00:57:    allele1_repeat_count = round(cols[5])
Aug 04, 2023 10:00:57:  File "/root/miniconda3/envs/straglr/lib/python3.10/site-packages/straglr/tre.py", line 1259, in output_vcf
Aug 04, 2023 10:00:57:    tre_finder.output_vcf(variants, args.vcf, args.sample, args.loci)
Aug 04, 2023 10:00:57:  File "/root/miniconda3/envs/straglr/lib/python3.10/site-packages/straglr/straglr_genotype.py", line 78, in main
Aug 04, 2023 10:00:57:    sys.exit(main())
Aug 04, 2023 10:00:57:  File "/root/miniconda3/envs/straglr/bin/straglr-genotype", line 8, in <module>
Aug 04, 2023 10:00:57:Traceback (most recent call last):
Aug 04, 2023 10:00:50:IndexError: list index out of range
Aug 04, 2023 10:00:50:    allele1_repeat_count = round(cols[5])
Aug 04, 2023 10:00:50:  File "/root/miniconda3/envs/straglr/lib/python3.10/site-packages/straglr/tre.py", line 1259, in output_vcf
Aug 04, 2023 10:00:50:    tre_finder.output_vcf(variants, args.vcf, args.sample, args.loci)
Aug 04, 2023 10:00:44:  File "/root/miniconda3/envs/straglr/lib/python3.10/site-packages/straglr/straglr_genotype.py", line 78, in main
Aug 04, 2023 10:00:44:    sys.exit(main())
Aug 04, 2023 10:00:44:  File "/root/miniconda3/envs/straglr/bin/straglr-genotype", line 8, in <module>
Aug 04, 2023 10:00:44:Traceback (most recent call last):

Could you please let me know if the reason is no TR available? I see one similar issue reported on your Git page?

readmanchiu commented 11 months ago

Looking at the traceback it points to a script/module called straglr_genotype.py or straglr-genotype, something not in the current repository. It might be something I wrote before and removed, or it might be some wrapper other people wrote? Are you sure you are running the latest version from our repository?

santoshe1 commented 11 months ago

Yes. I am running a wrapper from https://github.com/philres/straglr. Could the index out of range be due to lack of TRs.

readmanchiu commented 11 months ago

It could be, but it could also be one problematic locus that aborted the program. I would recommend you run the latest version in our repo to see if there is any problem.