fhormoz / caviar

52 stars 25 forks source link

matrix multiplication: inverse of singular matrix #8

Closed marynias closed 3 years ago

marynias commented 6 years ago

Hello, I am trying to run eCaviar on the supplied sample data, however I encounter an error regarding inverse of singular matrix. Could you please advise, as I would like to apply eCaviar's method to my own dataset.

./eCAVIAR -o sample_data/sample_results.txt \
-l sample_data/GWAS.ADGC.MC.AD.IGAP.stage1.hg19.chr.11.121344805.121517613.CHRPOSREFALT.LD.ld \
-l sample_data/eQTL.CARDIOGENICS.MC.AD.IGAP.stage1.hg19.chr.11.121344805.121517613.CHRPOSREFALT.LD.ld \
-z sample_data/GWAS.MC.AD.IGAP.stage1.hg19.chr.11.121344805.121517613.CHRPOSREFALT.Z.txt \ 
-z sample_data/eQTL.CARDIOGENICS.MC.AD.IGAP.stage1.hg19.chr.11.121344805.121517613.CHRPOSREFALT.ILMN_1810712.NM_015313.1.ARHGEF12.Z.txt \
-r 0.8 -c 2 
@-------------------------------------------------------------@
| eCAVIAR!      |      v2.2         |  10/Apr/2018        | 
|-------------------------------------------------------------|
| (C) 2018 Farhad Hormozdiari, GNU General Public License, v2 |
|-------------------------------------------------------------|
| For documentation, citation & bug-report instructions:      |
|       http://genetics.cs.ucla.edu/caviar/           |
@-------------------------------------------------------------@
Max Causal=2
35.0754%                                                         
error: matrix multiplication: inverse of singular matrix; suggest to use solve() instead
terminate called after throwing an instance of 'std::runtime_error'
  what():  matrix multiplication: inverse of singular matrix; suggest to use solve() instead
Aborted
fhormoz commented 6 years ago

Hi,

Thank you for informing us. We just add an update patch can you pull the new version.

Best, Farhad

marynias commented 6 years ago

Hi Farhad, Thanks for your prompt response! I compiled the new version and here is what it produces, after ONLY specifying the input files above with z and l flags.

@-------------------------------------------------------------@
| eCAVIAR!      |      v2.2         |  10/Apr/2018        | 
|-------------------------------------------------------------|
| (C) 2018 Farhad Hormozdiari, GNU General Public License, v2 |
|-------------------------------------------------------------|
| For documentation, citation & bug-report instructions:      |
|       http://genetics.cs.ucla.edu/caviar/           |
@-------------------------------------------------------------@
Max Causal=2

warning: solve(): system seems singular; attempting approx solution

warning: solve(): system seems singular; attempting approx solution

warning: solve(): system seems singular; attempting approx solution

warning: solve(): system seems singular; attempting approx solution

warning: solve(): system seems singular; attempting approx solution

warning: solve(): system seems singular; attempting approx solution

warning: solve(): system seems singular; attempting approx solution

warning: solve(): system seems singular; attempting approx solution

warning: solve(): system seems singular; attempting approx solution

warning: solve(): system seems singular; attempting approx solution
Total Likelihood= 1.750154e+01 SNP=75 

30 5.044290e-01

Max Causal=2
Total Likelihood= -1.421363e+00 SNP=75 

24 3.324406e-02

Does the likelihood look correct to you?

fhormoz commented 6 years ago

Yes. This is what I get. I think it is right.