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: tuple index out of range #157

Open
emersond368 opened this issue May 24, 2022 · 2 comments
Open

IndexError: tuple index out of range #157

emersond368 opened this issue May 24, 2022 · 2 comments
Assignees

Comments

@emersond368
Copy link

Not sure how to fix the problem, but I performed several different parameter settings, including all the default settings for dumpSTR on the the *.vcf input ( dumpSTR --vcf input.vcf --out output). All of which returned:

Traceback (most recent call last):
File "/project/jcreminslab/emersond_projects/4d_nucleome/clctools_hic_loop_calling_pipeline/venv/bin/dumpSTR", line 33, in
sys.exit(load_entry_point('trtools', 'console_scripts', 'dumpSTR')())
File "/project/jcreminslab/emersond_projects/4d_nucleome/ALS/TRTools/trtools/dumpSTR/dumpSTR.py", line 1245, in run
retcode = main(args)
File "/project/jcreminslab/emersond_projects/4d_nucleome/ALS/TRTools/trtools/dumpSTR/dumpSTR.py", line 1204, in main
record.vcfrecord.INFO['HWEP'] = utils.GetHardyWeinbergBinomialTest(allele_freqs, genotype_counts)
File "/project/jcreminslab/emersond_projects/4d_nucleome/ALS/TRTools/trtools/utils/utils.py", line 312, in GetHardyWeinbergBinomialTest
if gt[1] not in allele_freqs.keys():
IndexError: tuple index out of range

@LiterallyUniqueLogin LiterallyUniqueLogin self-assigned this Aug 3, 2022
@LiterallyUniqueLogin
Copy link
Contributor

Hi there,

My guess is that you're running this on a haploid sample (probably a male with one X chromosome). Is that correct? As it says on our README, we currently only support diploid genotypes (though our error message around this should be better). That's something we want to change and is quite doable, but is a decent amount of effort and so hasn't been prioritized yet.

If that's not what's happening, can you share the VCF you're working with so that we can look into it further?

@seboyden
Copy link

See issue #89
dumpSTR doesn't handle chrX in males
To verify this is your problem, delete chrX variants from gangSTR output and try dumpSTR again

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