Comments (4)
Hi,
Which version of tensorQTL are you running? Can you try running the version from the master branch? This should in principle fix the error, which is unrelated to the warnings.
Since you're getting many warnings related to monomorphic variants, you should filter your VCF before running QTL mapping (depending on sample size, inclusion of variants with MAF < 0.01 will likely result in artifacts), or apply in-sample MAF filtering with the maf_threshold
option.
from tensorqtl.
Hi,
After updating to the latest version in the master branch, I'm now seeing the following error in the permutation analysis:
Exception in thread Thread-2:
Traceback (most recent call last):
File "/hpc/packages/minerva-centos7/anaconda3/2021.5/lib/python3.8/threading.py", line 932, in _bootstrap_inner
self.run()
File "/hpc/packages/minerva-centos7/anaconda3/2021.5/lib/python3.8/site-packages/tensorqtl/genotypeio.py", line 40, in run
for item in self.generator:
File "/hpc/packages/minerva-centos7/anaconda3/2021.5/lib/python3.8/site-packages/tensorqtl/genotypeio.py", line 451, in generate_data
assert np.all([self.cis_ranges[g.index[0]][0] == self.cis_ranges[i][0] and self.cis_ranges[g.index[0]][1] == self.cis_ranges[i][1] for i in g.index[1:]])
AssertionError
Any ideas what may be causing this error?
from tensorqtl.
Hello,
After some more troubleshooting I solved the KeyError problem on my end. Instead of subsetting directly on the pd dataframe it had to be converted to a numpy array first. The following patch worked for me:
index bc1b062..133f640 100644
--- a/tensorqtl/post.py
+++ b/tensorqtl/post.py
@@ -51,9 +51,9 @@ def calculate_qvalues(res_df, fdr=0.05, qvalue_lambda=None, logger=None):
ub = res_df.loc[res_df['qval']>fdr, 'pval_beta'].sort_values()
if lb.shape[0] > 0: # significant phenotypes
- lb = lb[-1]
+ lb = lb.to_numpy()[-1]
if ub.shape[0] > 0:
- ub = ub[0]
+ ub = ub.to_numpy()[0]
pthreshold = (lb+ub)/2
else:
pthreshold = lb
from tensorqtl.
I wasn't able to reproduce this. Please specify versions if this is still an issue.
from tensorqtl.
Related Issues (20)
- Issues with TensorQTL in Trans Mode HOT 1
- AttributeError: 'dict' object has no attribute 'T' tensorqtl HOT 2
- broken link HOT 1
- Tensorqtl installation HOT 3
- No credible sets output from susie.map because pval_nominal=0 HOT 3
- ValueError: array must not contain infs or NaNs HOT 1
- interaction HOT 1
- [Susie] ValueError: prior variance must be non-negative HOT 4
- [trans] trans.map_permutations(): KeyError: 'r2' HOT 2
- [map_trans] R2 not returned in interaction analysis HOT 2
- [pval post-processing] Interaction output for cis/trans HOT 1
- Which beta coresponds to which allele in the outputs? HOT 3
- cis-mapping with interaction HOT 1
- Errors in the BackgroundGenerator cause main thread to get stuck HOT 1
- Questions about the `map_permutations` and `apply_permutations` functions
- cis_independent requires covariate_df HOT 1
- Phenotype file format HOT 3
- Any way i can go around this error? HOT 2
- Categorical covariates HOT 1
- Corections for multiple tests for trans-eQTL HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tensorqtl.