broadinstitute / tensorqtl

Ultrafast GPU-enabled QTL mapper
BSD 3-Clause "New" or "Revised" License
157 stars 51 forks source link

Any way i can go around this error? #144

Open maxozo opened 4 weeks ago

maxozo commented 4 weeks ago

This causes thensorqtl to fail. I have 4 phenotypes, all 4 are dropped as there are no variants in the region that are passing the thresholds predefined. As all of thme are dropped there is nothing left to test and the thread gets stuck.

cis-QTL mapping: nominal associations for all variant-phenotype pairs
  * 1033 samples
  * 4 phenotypes
  * 6 covariates
  * 6100111 variants
  * cis-window: ±1,000,000

  * checking phenotypes: 4/4
    ** dropping 4 phenotypes without variants in cis-window
  * Computing associations
    Mapping chromosome 21
Exception in thread Thread-7:
Traceback (most recent call last):
  File "/home/container_user/conda/lib/python3.9/threading.py", line 980, in _bootstrap_inner
    self.run()
  File "/home/container_user/conda/lib/python3.9/site-packages/tensorqtl/genotypeio.py", line 50, in run
    for item in self.generator:
  File "/home/container_user/conda/lib/python3.9/site-packages/tensorqtl/genotypeio.py", line 489, in generate_data
    chr_offset = offset_dict[chrom]
KeyError: '21'
maxozo commented 3 weeks ago

I resolved it by doing this as per my pull request. https://github.com/broadinstitute/tensorqtl/compare/master...maxozo:tensorqtl:patch-1 Untill this is merged i have made a copy of genotypeio.py with a patch and i load it from my local files instead of tensorqtl package.

francois-a commented 2 weeks ago

e97f4ea903b47b139a47de6e9d2e3bf140e49d6f should fix this.