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

error with --return_dense #185

Open
liaguiro opened this issue Feb 28, 2025 · 0 comments
Open

error with --return_dense #185

liaguiro opened this issue Feb 28, 2025 · 0 comments

Comments

@liaguiro
Copy link

Hello,

I'm running the tensorqtl with the trans mode, and it works, but I get an error when I run it with --return_dense to get the beta values.

python3 -m tensorqtl SNPs.step5.v2.reconstructed TPMmatrix.tensorqtl_format.bed interaction.clones --covariates covariance.matrix.txt --interaction interaction.info.txt --mode trans -o test.trans.dense.output --window 500000 --return_dense

can you please advise on how to fix the error?

[Feb 27 16:57:26] Running TensorQTL: trans-QTL mapping

  • WARNING: using CPU!
  • reading phenotypes (TPMmatrix.tensorqtl_format.bed)
  • reading covariates (covariance.matrix.txt)
  • reading interaction term(s) (interaction.infol.txt)
  • loading genotypes
    Mapping files: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:00<00:00, 260.68it/s]
    trans-QTL mapping
  • 287 samples
  • 22447 phenotypes
  • 1 covariates
  • 1111 variants
  • including interaction term
    tensorqtl/lib/python3.11/site-packages/tensorqtl/trans.py:188: FutureWarning: Series.getitem treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use ser.iloc[pos]
    interaction_mask_t = torch.BoolTensor(mask_s).to(device)
    processing batch 1/1
    Traceback (most recent call last):
    File "", line 198, in _run_module_as_main
    File "", line 88, in _run_code
    File "tensorqtl/lib/python3.11/site-packages/tensorqtl/main.py", line 2, in
    tensorqtl.main()
    File "tensorqtl/lib/python3.11/site-packages/tensorqtl/tensorqtl.py", line 328, in main
    pairs_df = trans.map_trans(genotype_df, phenotype_df, covariates_df=covariates_df, interaction_s=interaction_df,
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "tensorqtl/lib/python3.11/site-packages/tensorqtl/trans.py", line 276, in map_trans
    res = calculate_interaction_nominal(genotypes_t, phenotypes_t, interaction_t, residualizer,
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "tensorqtl/lib/python3.11/site-packages/tensorqtl/core.py", line 189, in calculate_interaction_nominal
    i0_t = residualizer.transform(i0_t.t(), center=False).t()
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "tensorqtl/lib/python3.11/site-packages/tensorqtl/core.py", line 62, in transform
    M0_t = M_t - torch.mm(torch.mm(M0_t, self.Q_t), self.Q_t.t())
    ^^^^^^^^^^^^^^^^^^^^^^^^
    RuntimeError: mat1 and mat2 shapes cannot be multiplied (287x1 and 287x1)
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

1 participant