Giter Site home page Giter Site logo

Comments (4)

francois-a avatar francois-a commented on August 24, 2024

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.

ddpinto avatar ddpinto commented on August 24, 2024

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.

ddpinto avatar ddpinto commented on August 24, 2024

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.

francois-a avatar francois-a commented on August 24, 2024

I wasn't able to reproduce this. Please specify versions if this is still an issue.

from tensorqtl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.