import magenpy as mgp
gdl = mgp.GWADataLoader("./LD_reference/plink/plink",
backend='plink')
gdl.compute_ld(estimator='shrinkage',
genetic_map_ne=11400,
genetic_map_sample_size=183,
output_dir='./LD_reference/EUR/VIPRS')
> Reading BED file...
Computing LD matrices: 0%| | 0/22 [00:00<?, ?it/s]/software/conda/envs/wdl/lib/python3.7/site-packages/scipy/sparse/_index.py:125: SparseEfficiencyWarning: Changing the sparsity structure of a csr_matrix is expensive. lil_matrix is more efficient.
self._set_arrayXarray(i, j, x)
Traceback (most recent call last):
File "VIPRS_EURLD.py", line 7, in <module>
output_dir='./LD_reference/EUR/VIPRS')
File "/software/conda/envs/wdl/lib/python3.7/site-packages/magenpy/GWADataLoader.py", line 563, in compute_ld
disable=not self.verbose or len(self.genotype) < 2)
File "/software/conda/envs/wdl/lib/python3.7/site-packages/magenpy/GWADataLoader.py", line 560, in <dictcomp>
for c, g in tqdm(sorted(self.genotype.items(), key=lambda x: x[0]),
File "/software/conda/envs/wdl/lib/python3.7/site-packages/ma
genpy/GenotypeMatrix.py", line 260, in compute_ld
return ld_est.compute(output_dir, temp_dir=tmp_ld_dir.name)
File "/software/conda/envs/wdl/lib/python3.7/site-packages/magenpy/stats/ld/estimator.py", line 227, in compute
temp_dir)
File "/software/conda/envs/wdl/lib/python3.7/site-packages/magenpy/stats/ld/estimator.py", line 90, in compute
if _validate_ld_matrix(ld_mat):
File "/software/conda/envs/wdl/lib/python3.7/site-packages/magenpy/stats/ld/utils.py", line 45, in _validate_ld_matrix
raise ValueError(f"Invalid LD Matrix: Element {i} does not have matching LD boundaries!")
ValueError: Invalid LD Matrix: Element 0 does not have matching LD boundaries!
Computing LD matrices: 0%| | 0/22 [01:07<?, ?it/s]
Do you know what caused this error, and how to fix it? If you need additional information, please feel free to ask me.
Thank you so much in advance!