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 while conducting permutations for cis-eQTL #157

Open
Vibha-Acharya opened this issue Sep 24, 2024 · 8 comments
Open

error while conducting permutations for cis-eQTL #157

Vibha-Acharya opened this issue Sep 24, 2024 · 8 comments

Comments

@Vibha-Acharya
Copy link

Hello tensorqtl team,
We are using tensorqtl to conduct eQTL analysis in our datasets and while computing permutations for the cis-eQTL to get empirical values we encountered this error.

tensorqtl/core.py:315: RuntimeWarning: invalid value encountered in sqrt
return 2*stats.t.cdf(-np.abs(np.sqrt(tstat2)), dof)

We checked if there are missing in our data, however there are no missing. I was wondering if you could provide some insights into it and how we could avoid the error,

Thank you,
Regards,
Vibha

@francois-a
Copy link
Collaborator

Hi, can you please provide a small example dataset that reproduces this issue?

@Vibha-Acharya
Copy link
Author

Sure , here's a representative file :

#Chr Start End TargetID AAA AAB AAC AAD
1 11868 11869 ENSG00000290825.1_1 15.30 3.16 1.85 9.71
1 12009 12010 ENSG00000223972.6_6 1.61. 0.32 0.00. 0.00
1 24885 24886 ENSG00000227232.6_6 36.44. 22.06 29.08 24.84
1 622033 622034 ENSG00000188966.11_9 38.83 22.34 27.54 26.84

We used the linux based code and plink2 formatted genotypes,

Thank you so much,

Regards,
Vibha

@francois-a
Copy link
Collaborator

sorry, can you please provide all the inputs needed to reproduce the error?

@Vibha-Acharya
Copy link
Author

Hi francois-a,

I have attached the sample datasets in the zipfile,

I used the command

python3 -m tensorqtl Samples Phenotype_chr1.bed Chr1_
--covariates Covar.txt --maf_threshold 0.01 --window 1000000 --chunk_size 50000 --mode cis --fdr 0.05 --qvalue_lambda 0.85

Tensor_qtl_test.zip

Thank you so much,
Vibha

@luluzuo-tju
Copy link

I encountered a similar problem today, did you solve it?If you solved it, could you also share your experience?

@francois-a
Copy link
Collaborator

Thanks for sharing the example dataset. I'm not able to reproduce the error. Can you try updating to the latest version from this repository (pip install git+https://github.com/broadinstitute/tensorqtl.git), as well as torch?

@Vibha-Acharya
Copy link
Author

Hi all,
I tried with updated tensor and noticed that the error is now limited to the .out file but not apparent in each chromosome specific log file. I checked the output and the permutation p value is available in all input genes.

Also, I tried different ways to see if the warning can be avoided. During this, I noticed the permutation p values for the gene are different when I use different filter :for instance the p-beta for gene A when I use filter 10 reads in 30 % samples is 0.2586 and when I use the filter of 6 reads in 20 % samples (exclude some genes) , the p beta is 0.03. I do not understand how changing the number of genes alters the p beta as the number of variants for the specific genes remains constant. Am I missing something?

@francois-a
Copy link
Collaborator

How different are the p-values? Small differences are expected due to sampling. Otherwise can you please send another dataset that reproduces these differences?

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