Closed hlnicholls closed 1 year ago
Hi, thank you for taking an interest in CARMA!
I am positive the installation error is associated with the M1 chip, as CARMA can be installed on Win, Linux, Mac with Intel chip. I experienced the errors with M1 chip before for installing CARMA. Unfortunately, I don't have a M1 apple at hand, but I will try to find one and see if I can work this out.
In the meantime, if you solved the problem, please let me know the solution. It would be a great help. Thanks.
Thank you for your response! I'm keen to run CARMA locally so I'll keep trying to find the M1 solution and let you know if I find one.
In the meantime, I've installed CARMA on a linux OS, and I have a follow-up question if that's ok. I'm running CARMA and getting this error:
CARMA.results<-CARMA_fixed_sigma(z.list,ld.list,lambda.list=lambda.list,
outlier.switch=F)
set.index gamma.set.index margin
1 1 NA NA
2 1 426 1957.626
3 1 NA NA
[1] "this is running S: 426"
set.index gamma.set.index margin
1 1 1 0.000
2 2 346 27803.580
3 3 425 1887.074
[1] "this is running S: 346,426"
set.index gamma.set.index margin
1 1 2 1957.626
2 2 424 32094.078
3 3 906 6114.166
[1] "this is running S: 346,425,426"
set.index gamma.set.index margin
1 1 2 27803.58
2 2 392 58621.64
3 3 2074 31496.53
...
[1] "this is running S: 346,393,398,402,419,423,425,426,431,436"
set.index gamma.set.index margin
1 1 7 125887.6
2 2 398 137111.4
3 3 5402 133102.8
[1] "this is running S: 346,393,398,401,419,423,425,426,431,436"
set.index gamma.set.index margin
1 1 7 125887.6
2 2 398 137111.4
3 3 5402 134122.9
[1] "this is running S: 346,393,398,402,419,423,425,426,431,436"
set.index gamma.set.index margin
1 1 7 125887.6
2 2 398 137111.4
3 3 5402 133102.8
[1] "this is running S: 346,393,398,401,419,423,425,426,431,436"
[1] 0
[1] "This is locus 1 computing time"
Time difference of 49.86474 secs
[1] "This is difference; 0"
Error in if (sum(pip[cor.group]) > rho) { :
missing value where TRUE/FALSE needed
Is there something potentially wrong with my input data that would cause this error? For example, I am just putting in summary statistics but I haven't ran any conditional analysis to refine my SNPs beforehand. The margins also look much larger than the package's simulated example.
Hi, thank you for the reply. One thing I notice here is that the outlier detection function has been turned off, which is suggested to be turned on for potential discrepancies. As shown in the second iteration here, it seems like the LD between the two selected SNPs significantly increased the likelihood, which could be due to discrepancies.
Another thing that I noticed is the large values of the input Z-scores. In general, the null Z-scores should follow a standard normal distribution, and the Z-scores with signals should not be greater than 10 more or less. If the loci you are examining here have extremely strong signals, I suggest increasing the prior variance and restricting the total number of causal variant L, such as L=3 etc..
Thank you so much for your response, I really appreciate the guidance. From testing the parameter settings, only changing the tau setting to at least 5 seems to get the function to run without that error - although despite having a SNP with < 5x10-8 p-value the PIPs are all quite low and no SNPs are in the credible set. No SNPs are also in the credible set on running the example simulated data either (running on the example function parameter settings) so not sure if I've got something else wrong too.
From checking my z-scores they seem ok in terms of not being greater than 10 (min value is -8, max value is 4.2, median is 0.16 and mean is -0.2540) but at any rate, I'll investigate this further, and see if the issue is my data.
Thank you again for your help! I'll let you know if I address the M1 issue in the future.
Hi,
I have been trying to install CARMA on my M1 Mac, and finally successfully installed CARMA on M1. One difference between what you showed here and what I did is that I added one line in the .R/Makevars file,
"PKG_LIBS=-L/opt/homebrew/lib -lgsl -lgslcblas -lm"
And it fixed the problem. I guess you can also use Sys.setenv function to local the lib. Please give it a try and see if it works.
Hi, this also works for me and I now have CARMA running locally with no issues! Thank you for looking into this further, I really appreciate it!
Hi, I am very interested in using this package but I'm having issues installing it. Originally I had an error stating
fatal error: 'gsl/gsl_vector.h' file not found #include <gsl/gsl_vector.h>
which I solved via setting up a symlink on my mac to my gsl include files inside /Users/name/Library/R/arm64/4.3/library/RcppGSL/include (I believe I needed to do this as I have gsl installed via homebrew in /opt/homebrew/Cellar/gsl).However, I now get this error which I am stuck on:
I've tried setting the library path for lgsl by checking my gsl-config and then running:
I've also tried:
export LIBRARY_PATH=-/opt/homebrew/Cellar/gsl/2.7.1/lib
However, these output the same error. In general, from googling, I can't find my specific error's solution - is there anything I am missing to install CARMA with my setup?
I'm using an M1 apple mac and my R session is: