broadinstitute / tensorqtl

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

Error - lengths must match to compare #110

Closed inabro closed 1 year ago

inabro commented 1 year ago

Hello! I am facing an error with tensorqtl that I cannot seem to be able to fix. It was successful with one dataset, however, now I'm stuck. I have double, triple checked that my files match in regards to smaple IDs, number of samples, order of samples, columns, and so on. But, this error still comes up. Is there anyone who knows what it could be? I'd appreciate any thoguhts! I have pasted the log below.

Mapping files: 0%| | 0/3 [00:00<?, ?it/s] Mapping files: 33%|███▎ | 1/3 [00:07<00:15, 7.99s/it] Mapping files: 67%|██████▋ | 2/3 [00:08<00:03, 3.78s/it] Mapping files: 100%|██████████| 3/3 [00:11<00:00, 3.49s/it] Mapping files: 100%|██████████| 3/3 [00:11<00:00, 3.99s/it] Traceback (most recent call last): File "/cluster/software/EASYBUILD/Python/3.9.5-GCCcore-10.3.0/lib/python3.9/runpy.py", line 197, in _run_module_as_main return _run_code(code, main_globals, None, File "/cluster/software/EASYBUILD/Python/3.9.5-GCCcore-10.3.0/lib/python3.9/runpy.py", line 87, in _run_code exec(code, run_globals) File "/tsd/p566/home/p566-inasb/.local/lib/python3.9/site-packages/tensorqtl/main.py", line 2, in tensorqtl.main() File "/tsd/p566/home/p566-inasb/.local/lib/python3.9/site-packages/tensorqtl/tensorqtl.py", line 142, in main res_df = cis.map_cis(genotype_df, variant_df, phenotype_df, phenotype_pos_df, covariates_df=covariates_df, File "/tsd/p566/home/p566-inasb/.local/lib/python3.9/site-packages/tensorqtl/cis.py", line 677, in map_cis igc = genotypeio.InputGeneratorCis(genotype_df, variant_df, phenotype_df, phenotype_pos_df, group_s=group_s, window=window) File "/tsd/p566/home/p566-inasb/.local/lib/python3.9/site-packages/tensorqtl/genotypeio.py", line 428, in init assert (phenotype_df.index == phenotype_df.index.unique()).all() File "/cluster/software/EASYBUILD/SciPy-bundle/2021.05-foss-2021a/lib/python3.9/site-packages/pandas/core/ops/common.py", line 65, in new_method return method(self, other) File "/cluster/software/EASYBUILD/SciPy-bundle/2021.05-foss-2021a/lib/python3.9/site-packages/pandas/core/arraylike.py", line 29, in eq return self._cmp_method(other, operator.eq) File "/cluster/software/EASYBUILD/SciPy-bundle/2021.05-foss-2021a/lib/python3.9/site-packages/pandas/core/indexes/base.py", line 5615, in _cmp_method raise ValueError("Lengths must match to compare") ValueError: Lengths must match to compare cis-QTL mapping: empirical p-values for phenotypes

netwon123 commented 6 months ago

Sorry, could you solved this problem?

inabro commented 5 months ago

Sorry, could you solved this problem?

Hey! I think it was duplicated phenotype_ids, they need to be unique!