Giter VIP home page Giter VIP logo

caviar's People

Contributors

christacaggiano avatar fhormoz avatar fhormozdiari avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

caviar's Issues

Compiling issue with RHEL 7

Hello!

I'm facing the below issue while compiling on RHEL 7.6 , I've installed gsl and used gcc versions gcc/4.9.1 gcc/5.2.0 gcc/7.2.0 gcc/8.3.0 without luck.

any suggestions ?

$ make
g++ caviar.cpp PostCal.cpp Util.cpp TopKSNP.cpp -I /path/to/app/CAVIAR/caviar/caviar-master/CAVIAR-C++/armadillo/include/ -DARMA_DONT_USE_WRAPPER -llapack -lblas -lgslcblas -lgsl -o CAVIAR
/bin/ld: /usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/liblapack.a(xerbla.o): undefined reference to symbol '_gfortran_string_len_trim@@GFORTRAN_1.0'
//usr/lib64/libgfortran.so.3: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make: *** [CAVIAR] Error 1

analysis per gene is it?

hello devs,

I understand ecaviar is awesome, works fast. However, the input data eQTL and GWAS are per gene?
If I have 20 genes, I believe ecaviar isn't scalable?

edit: ecaviar

DSO missing from command line

Sorry to bother you, but I still get the following error after repeated make.

/usr/bin/ld: /tmp/cch5vNsT.o: undefined reference to symbol 'exp@@GLIBC_2.2.5'
/usr/lib64/libm.so.6: error adding symbols: DSO missing from command line

Please advice.

eQTL Nominal file for CAVIAR input

I have a question on eQTL nominal file input prep for CAVIAR. Lets, say If a SNP1 is in 1Mb window of a gene 1 and also in gene 2. Then how do we filter that out? because LD matrix is only for unique SNPs and CAVIAR needs zscore value for SNPs that are input in LD matrix.

rm: cannot remove ‘CAVIAR’: No such file or directory

Hi,
This is the first time I try to use CAVIAR.
I have followed the instructions and cloned it as in "git clone https://github.com/fhormoz/caviar.git"

However, I don't see any executable names "CAVIAR" in any folder.

I have also downloaded and installed the the GNU scientific library. When I type "make clean" in the caviar/CAVIAR C++ repository, I get this error:

CAVIAR-C++]$ make clean
rm CAVIAR
rm: cannot remove ‘CAVIAR’: No such file or directory
make: *** [clean] Error 1
CAVIAR-C++]$

So I am not really sure what is happening? I would appreciate your help.
Thank you,
Julia

install error 'data' is ambigous

I am getting errors installing. I think 'data' from util is causing problems but I don't know what to do. here is the error message below:
g++ caviar.cpp PostCal.cpp Util.cpp TopKSNP.cpp -I /work/users/s/e/seyoun/07.Doug_thesis/09.cqtl_hic/oa_tissue/RNAPIPE-Splice/tool/caviar/CAVIAR-C++/armadillo/include/ -DARMA_DONT_USE_WRAPPER -llapack -lblas -lgslcblas -lgsl -o CAVIAR In file included from caviar.cpp:8: Util.h:22:29: error: reference to ‘data’ is ambiguous 22 | bool operator()(data const &left, data const &right) { | ^~~~ In file included from /nas/longleaf/rhel8/apps/gcc/11.2.0/include/c++/11.2.0/string:54, from /nas/longleaf/rhel8/apps/gcc/11.2.0/include/c++/11.2.0/bits/locale_classes.h:40, from /nas/longleaf/rhel8/apps/gcc/11.2.0/include/c++/11.2.0/bits/ios_base.h:41, from /nas/longleaf/rhel8/apps/gcc/11.2.0/include/c++/11.2.0/ios:42, from /nas/longleaf/rhel8/apps/gcc/11.2.0/include/c++/11.2.0/ostream:38, from /nas/longleaf/rhel8/apps/gcc/11.2.0/include/c++/11.2.0/iostream:39, from caviar.cpp:1: /nas/longleaf/rhel8/apps/gcc/11.2.0/include/c++/11.2.0/bits/range_access.h:319:5: note: candidates are: ‘template<class _Tp> constexpr const _Tp* std::data(std::initializer_list<_Tp>)’ 319 | data(initializer_list<_Tp> __il) noexcept | ^~~~ /nas/longleaf/rhel8/apps/gcc/11.2.0/include/c++/11.2.0/bits/range_access.h:310:5: note: ‘template<class _Tp, long unsigned int _Nm> constexpr _Tp* std::data(_Tp (&)[_Nm])’ 310 | data(_Tp (&__array)[_Nm]) noexcept | ^~~~ /nas/longleaf/rhel8/apps/gcc/11.2.0/include/c++/11.2.0/bits/range_access.h:300:5: note: ‘template<class _Container> constexpr decltype (__cont.data()) std::data(const _Container&)’ 300 | data(const _Container& __cont) noexcept(noexcept(__cont.data())) | ^~~~ /nas/longleaf/rhel8/apps/gcc/11.2.0/include/c++/11.2.0/bits/range_access.h:290:5: note: ‘template<class _Container> constexpr decltype (__cont.data()) std::data(_Container&)’ 290 | data(_Container& __cont) noexcept(noexcept(__cont.data())) | ^~~~ In file included from caviar.cpp:8: Util.h:10:16: note: ‘struct data’ 10 | struct data { | ^~~~ Util.h:22:29: error: ‘data’ has not been declared 22 | bool operator()(data const &left, data const &right) { | ^~~~ Util.h:22:47: error: reference to ‘data’ is ambiguous 22 | bool operator()(data const &left, data const &right) { | ^~~~ In file included from /nas/longleaf/rhel8/apps/gcc/11.2.0/include/c++/11.2.0/string:54, from /nas/longleaf/rhel8/apps/gcc/11.2.0/include/c++/11.2.0/bits/locale_classes.h:40, from /nas/longleaf/rhel8/apps/gcc/11.2.0/include/c++/11.2.0/bits/ios_base.h:41, from /nas/longleaf/rhel8/apps/gcc/11.2.0/include/c++/11.2.0/ios:42, from /nas/longleaf/rhel8/apps/gcc/11.2.0/include/c++/11.2.0/ostream:38, from /nas/longleaf/rhel8/apps/gcc/11.2.0/include/c++/11.2.0/iostream:39, from caviar.cpp:1: /nas/longleaf/rhel8/apps/gcc/11.2.0/include/c++/11.2.0/bits/range_access.h:319:5: note: candidates are: ‘template<class _Tp> constexpr const _Tp* std::data(std::initializer_list<_Tp>)’ 319 | data(initializer_list<_Tp> __il) noexcept | ^~~~ /nas/longleaf/rhel8/apps/gcc/11.2.0/include/c++/11.2.0/bits/range_access.h:310:5: note: ‘template<class _Tp, long unsigned int _Nm> constexpr _Tp* std::data(_Tp (&)[_Nm])’ 310 | data(_Tp (&__array)[_Nm]) noexcept | ^~~~ /nas/longleaf/rhel8/apps/gcc/11.2.0/include/c++/11.2.0/bits/range_access.h:300:5: note: ‘template<class _Container> constexpr decltype (__cont.data()) std::data(const _Container&)’ 300 | data(const _Container& __cont) noexcept(noexcept(__cont.data())) | ^~~~ /nas/longleaf/rhel8/apps/gcc/11.2.0/include/c++/11.2.0/bits/range_access.h:290:5: note: ‘template<class _Container> constexpr decltype (__cont.data()) std::data(_Container&)’ 290 | data(_Container& __cont) noexcept(noexcept(__cont.data())) | ^~~~ In file included from caviar.cpp:8: Util.h:10:16: note: ‘struct data’ 10 | struct data { | ^~~~ Util.h:22:47: error: ‘data’ has not been declared 22 | bool operator()(data const &left, data const &right) { | ^~~~ Util.h: In member function ‘bool by_number::operator()(const int&, const int&)’: Util.h:23:33: error: request for member ‘number’ in ‘left’, which is of non-class type ‘const int’ 23 | return abs(left.number) > abs(right.number); | ^~~~~~ Util.h:23:53: error: request for member ‘number’ in ‘right’, which is of non-class type ‘const int’ 23 | return abs(left.number) > abs(right.number); | ^~~~~~ In file included from PostCal.cpp:8: Util.h:22:29: error: reference to ‘data’ is ambiguous 22 | bool operator()(data const &left, data const &right) { | ^~~~ In file included from /nas/longleaf/rhel8/apps/gcc/11.2.0/include/c++/11.2.0/vector:69, from PostCal.cpp:1: /nas/longleaf/rhel8/apps/gcc/11.2.0/include/c++/11.2.0/bits/range_access.h:319:5: note: candidates are: ‘template<class _Tp> constexpr const _Tp* std::data(std::initializer_list<_Tp>)’ 319 | data(initializer_list<_Tp> __il) noexcept | ^~~~ /nas/longleaf/rhel8/apps/gcc/11.2.0/include/c++/11.2.0/bits/range_access.h:310:5: note: ‘template<class _Tp, long unsigned int _Nm> constexpr _Tp* std::data(_Tp (&)[_Nm])’ 310 | data(_Tp (&__array)[_Nm]) noexcept | ^~~~ /nas/longleaf/rhel8/apps/gcc/11.2.0/include/c++/11.2.0/bits/range_access.h:300:5: note: ‘template<class _Container> constexpr decltype (__cont.data()) std::data(const _Container&)’ 300 | data(const _Container& __cont) noexcept(noexcept(__cont.data())) | ^~~~ /nas/longleaf/rhel8/apps/gcc/11.2.0/include/c++/11.2.0/bits/range_access.h:290:5: note: ‘template<class _Container> constexpr decltype (__cont.data()) std::data(_Container&)’ 290 | data(_Container& __cont) noexcept(noexcept(__cont.data())) | ^~~~ In file included from PostCal.cpp:8: Util.h:10:16: note: ‘struct data’ 10 | struct data { | ^~~~ Util.h:22:29: error: ‘data’ has not been declared 22 | bool operator()(data const &left, data const &right) { | ^~~~ Util.h:22:47: error: reference to ‘data’ is ambiguous 22 | bool operator()(data const &left, data const &right) { | ^~~~ In file included from /nas/longleaf/rhel8/apps/gcc/11.2.0/include/c++/11.2.0/vector:69, from PostCal.cpp:1: /nas/longleaf/rhel8/apps/gcc/11.2.0/include/c++/11.2.0/bits/range_access.h:319:5: note: candidates are: ‘template<class _Tp> constexpr const _Tp* std::data(std::initializer_list<_Tp>)’ 319 | data(initializer_list<_Tp> __il) noexcept | ^~~~ /nas/longleaf/rhel8/apps/gcc/11.2.0/include/c++/11.2.0/bits/range_access.h:310:5: note: ‘template<class _Tp, long unsigned int _Nm> constexpr _Tp* std::data(_Tp (&)[_Nm])’ 310 | data(_Tp (&__array)[_Nm]) noexcept | ^~~~ /nas/longleaf/rhel8/apps/gcc/11.2.0/include/c++/11.2.0/bits/range_access.h:300:5: note: ‘template<class _Container> constexpr decltype (__cont.data()) std::data(const _Container&)’ 300 | data(const _Container& __cont) noexcept(noexcept(__cont.data())) | ^~~~ /nas/longleaf/rhel8/apps/gcc/11.2.0/include/c++/11.2.0/bits/range_access.h:290:5: note: ‘template<class _Container> constexpr decltype (__cont.data()) std::data(_Container&)’ 290 | data(_Container& __cont) noexcept(noexcept(__cont.data())) | ^~~~ In file included from PostCal.cpp:8: Util.h:10:16: note: ‘struct data’ 10 | struct data { | ^~~~ Util.h:22:47: error: ‘data’ has not been declared 22 | bool operator()(data const &left, data const &right) { | ^~~~ Util.h: In member function ‘bool by_number::operator()(const int&, const int&)’: Util.h:23:33: error: request for member ‘number’ in ‘left’, which is of non-class type ‘const int’ 23 | return abs(left.number) > abs(right.number); | ^~~~~~ Util.h:23:53: error: request for member ‘number’ in ‘right’, which is of non-class type ‘const int’ 23 | return abs(left.number) > abs(right.number); | ^~~~~~ PostCal.cpp: In member function ‘double PostCal::fracdmvnorm(arma::mat, arma::mat, arma::mat, arma::mat, double)’: PostCal.cpp:37:58: error: call of overloaded ‘size(arma::mat&)’ is ambiguous 37 | mat res1 = trans(ZcenterMean) * solve(R, eye(size(R))) * (ZcenterMean); | ~~~~^~~ In file included from /nas/longleaf/rhel8/apps/gcc/11.2.0/include/c++/11.2.0/vector:69, from PostCal.cpp:1: /nas/longleaf/rhel8/apps/gcc/11.2.0/include/c++/11.2.0/bits/range_access.h:245:5: note: candidate: ‘constexpr decltype (__cont.size()) std::size(const _Container&) [with _Container = arma::Mat<double>; decltype (__cont.size()) = long long unsigned int]’ 245 | size(const _Container& __cont) noexcept(noexcept(__cont.size())) | ^~~~ In file included from /work/users/s/e/seyoun/07.Doug_thesis/09.cqtl_hic/oa_tissue/RNAPIPE-Splice/tool/caviar/CAVIAR-C++/armadillo/include/armadillo:468, from PostCal.cpp:5: /work/users/s/e/seyoun/07.Doug_thesis/09.cqtl_hic/oa_tissue/RNAPIPE-Splice/tool/caviar/CAVIAR-C++/armadillo/include/armadillo_bits/fn_size.hpp:30:1: note: candidate: ‘typename arma::enable_if2<arma::is_arma_type<T1>::value, const arma::SizeMat>::result arma::size(const T1&) [with T1 = arma::Mat<double>; typename arma::enable_if2<arma::is_arma_type<T1>::value, const arma::SizeMat>::result = const arma::SizeMat]’ 30 | size(const T1& X) | ^~~~ PostCal.cpp:38:61: error: call of overloaded ‘size(arma::mat&)’ is ambiguous 38 | mat res2 = trans(ZcenterMean) * solve(newR, eye(size(newR))) * (ZcenterMean); | ~~~~^~~~~~ In file included from /nas/longleaf/rhel8/apps/gcc/11.2.0/include/c++/11.2.0/vector:69, from PostCal.cpp:1: /nas/longleaf/rhel8/apps/gcc/11.2.0/include/c++/11.2.0/bits/range_access.h:245:5: note: candidate: ‘constexpr decltype (__cont.size()) std::size(const _Container&) [with _Container = arma::Mat<double>; decltype (__cont.size()) = long long unsigned int]’ 245 | size(const _Container& __cont) noexcept(noexcept(__cont.size())) | ^~~~ In file included from /work/users/s/e/seyoun/07.Doug_thesis/09.cqtl_hic/oa_tissue/RNAPIPE-Splice/tool/caviar/CAVIAR-C++/armadillo/include/armadillo:468, from PostCal.cpp:5: /work/users/s/e/seyoun/07.Doug_thesis/09.cqtl_hic/oa_tissue/RNAPIPE-Splice/tool/caviar/CAVIAR-C++/armadillo/include/armadillo_bits/fn_size.hpp:30:1: note: candidate: ‘typename arma::enable_if2<arma::is_arma_type<T1>::value, const arma::SizeMat>::result arma::size(const T1&) [with T1 = arma::Mat<double>; typename arma::enable_if2<arma::is_arma_type<T1>::value, const arma::SizeMat>::result = const arma::SizeMat]’ 30 | size(const T1& X) | ^~~~ PostCal.cpp: In member function ‘double PostCal::findOptimalSetGreedy(double*, double, char*, int*, double, std::string)’: PostCal.cpp:325:25: error: template argument 1 is invalid 325 | std::vector<data> items; | ^ PostCal.cpp:325:25: error: template argument 2 is invalid PostCal.cpp:330:20: error: request for member ‘push_back’ in ‘items’, which is of non-class type ‘int’ 330 | items.push_back(data(exp(postValues[i]-total_post), i, 0)); | ^~~~~~~~~ PostCal.cpp:330:30: error: reference to ‘data’ is ambiguous 330 | items.push_back(data(exp(postValues[i]-total_post), i, 0)); | ^~~~ In file included from /nas/longleaf/rhel8/apps/gcc/11.2.0/include/c++/11.2.0/vector:69, from PostCal.cpp:1: /nas/longleaf/rhel8/apps/gcc/11.2.0/include/c++/11.2.0/bits/range_access.h:319:5: note: candidates are: ‘template<class _Tp> constexpr const _Tp* std::data(std::initializer_list<_Tp>)’ 319 | data(initializer_list<_Tp> __il) noexcept | ^~~~ /nas/longleaf/rhel8/apps/gcc/11.2.0/include/c++/11.2.0/bits/range_access.h:310:5: note: ‘template<class _Tp, long unsigned int _Nm> constexpr _Tp* std::data(_Tp (&)[_Nm])’ 310 | data(_Tp (&__array)[_Nm]) noexcept | ^~~~ /nas/longleaf/rhel8/apps/gcc/11.2.0/include/c++/11.2.0/bits/range_access.h:300:5: note: ‘template<class _Container> constexpr decltype (__cont.data()) std::data(const _Container&)’ 300 | data(const _Container& __cont) noexcept(noexcept(__cont.data())) | ^~~~ /nas/longleaf/rhel8/apps/gcc/11.2.0/include/c++/11.2.0/bits/range_access.h:290:5: note: ‘template<class _Container> constexpr decltype (__cont.data()) std::data(_Container&)’ 290 | data(_Container& __cont) noexcept(noexcept(__cont.data())) | ^~~~ In file included from PostCal.cpp:8: Util.h:10:16: note: ‘struct data’ 10 | struct data { | ^~~~ PostCal.cpp:333:25: error: request for member ‘begin’ in ‘items’, which is of non-class type ‘int’ 333 | std::sort(items.begin(), items.end(), by_number()); | ^~~~~ PostCal.cpp:333:40: error: request for member ‘end’ in ‘items’, which is of non-class type ‘int’ 333 | std::sort(items.begin(), items.end(), by_number()); | ^~~ PostCal.cpp:335:32: error: invalid types ‘int[int]’ for array subscript 335 | rank[i] = items[i].index1; | ^ In file included from TopKSNP.cpp:5: Util.h:22:29: error: reference to ‘data’ is ambiguous 22 | bool operator()(data const &left, data const &right) { | ^~~~ In file included from /nas/longleaf/rhel8/apps/gcc/11.2.0/include/c++/11.2.0/string:54, from /nas/longleaf/rhel8/apps/gcc/11.2.0/include/c++/11.2.0/bits/locale_classes.h:40, from /nas/longleaf/rhel8/apps/gcc/11.2.0/include/c++/11.2.0/bits/ios_base.h:41, from /nas/longleaf/rhel8/apps/gcc/11.2.0/include/c++/11.2.0/ios:42, from /nas/longleaf/rhel8/apps/gcc/11.2.0/include/c++/11.2.0/ostream:38, from /nas/longleaf/rhel8/apps/gcc/11.2.0/include/c++/11.2.0/iostream:39, from TopKSNP.cpp:2: /nas/longleaf/rhel8/apps/gcc/11.2.0/include/c++/11.2.0/bits/range_access.h:319:5: note: candidates are: ‘template<class _Tp> constexpr const _Tp* std::data(std::initializer_list<_Tp>)’ 319 | data(initializer_list<_Tp> __il) noexcept | ^~~~ /nas/longleaf/rhel8/apps/gcc/11.2.0/include/c++/11.2.0/bits/range_access.h:310:5: note: ‘template<class _Tp, long unsigned int _Nm> constexpr _Tp* std::data(_Tp (&)[_Nm])’ 310 | data(_Tp (&__array)[_Nm]) noexcept | ^~~~ /nas/longleaf/rhel8/apps/gcc/11.2.0/include/c++/11.2.0/bits/range_access.h:300:5: note: ‘template<class _Container> constexpr decltype (__cont.data()) std::data(const _Container&)’ 300 | data(const _Container& __cont) noexcept(noexcept(__cont.data())) | ^~~~ /nas/longleaf/rhel8/apps/gcc/11.2.0/include/c++/11.2.0/bits/range_access.h:290:5: note: ‘template<class _Container> constexpr decltype (__cont.data()) std::data(_Container&)’ 290 | data(_Container& __cont) noexcept(noexcept(__cont.data())) | ^~~~ In file included from TopKSNP.cpp:5: Util.h:10:16: note: ‘struct data’ 10 | struct data { | ^~~~ Util.h:22:29: error: ‘data’ has not been declared 22 | bool operator()(data const &left, data const &right) { | ^~~~ Util.h:22:47: error: reference to ‘data’ is ambiguous 22 | bool operator()(data const &left, data const &right) { | ^~~~ In file included from /nas/longleaf/rhel8/apps/gcc/11.2.0/include/c++/11.2.0/string:54, from /nas/longleaf/rhel8/apps/gcc/11.2.0/include/c++/11.2.0/bits/locale_classes.h:40, from /nas/longleaf/rhel8/apps/gcc/11.2.0/include/c++/11.2.0/bits/ios_base.h:41, from /nas/longleaf/rhel8/apps/gcc/11.2.0/include/c++/11.2.0/ios:42, from /nas/longleaf/rhel8/apps/gcc/11.2.0/include/c++/11.2.0/ostream:38, from /nas/longleaf/rhel8/apps/gcc/11.2.0/include/c++/11.2.0/iostream:39, from TopKSNP.cpp:2: /nas/longleaf/rhel8/apps/gcc/11.2.0/include/c++/11.2.0/bits/range_access.h:319:5: note: candidates are: ‘template<class _Tp> constexpr const _Tp* std::data(std::initializer_list<_Tp>)’ 319 | data(initializer_list<_Tp> __il) noexcept | ^~~~ /nas/longleaf/rhel8/apps/gcc/11.2.0/include/c++/11.2.0/bits/range_access.h:310:5: note: ‘template<class _Tp, long unsigned int _Nm> constexpr _Tp* std::data(_Tp (&)[_Nm])’ 310 | data(_Tp (&__array)[_Nm]) noexcept | ^~~~ /nas/longleaf/rhel8/apps/gcc/11.2.0/include/c++/11.2.0/bits/range_access.h:300:5: note: ‘template<class _Container> constexpr decltype (__cont.data()) std::data(const _Container&)’ 300 | data(const _Container& __cont) noexcept(noexcept(__cont.data())) | ^~~~ /nas/longleaf/rhel8/apps/gcc/11.2.0/include/c++/11.2.0/bits/range_access.h:290:5: note: ‘template<class _Container> constexpr decltype (__cont.data()) std::data(_Container&)’ 290 | data(_Container& __cont) noexcept(noexcept(__cont.data())) | ^~~~ In file included from TopKSNP.cpp:5: Util.h:10:16: note: ‘struct data’ 10 | struct data { | ^~~~ Util.h:22:47: error: ‘data’ has not been declared 22 | bool operator()(data const &left, data const &right) { | ^~~~ Util.h: In member function ‘bool by_number::operator()(const int&, const int&)’: Util.h:23:33: error: request for member ‘number’ in ‘left’, which is of non-class type ‘const int’ 23 | return abs(left.number) > abs(right.number); | ^~~~~~ Util.h:23:53: error: request for member ‘number’ in ‘right’, which is of non-class type ‘const int’ 23 | return abs(left.number) > abs(right.number); | ^~~~~~ TopKSNP.cpp: In member function ‘void TopKSNP::findCausal(int*)’: TopKSNP.cpp:10:25: error: template argument 1 is invalid 10 | std::vector<data> items; | ^ TopKSNP.cpp:10:25: error: template argument 2 is invalid TopKSNP.cpp:15:23: error: request for member ‘push_back’ in ‘items’, which is of non-class type ‘int’ 15 | items.push_back(data(stat[i], i, i)); | ^~~~~~~~~ TopKSNP.cpp:15:33: error: reference to ‘data’ is ambiguous 15 | items.push_back(data(stat[i], i, i)); | ^~~~ In file included from /nas/longleaf/rhel8/apps/gcc/11.2.0/include/c++/11.2.0/string:54, from /nas/longleaf/rhel8/apps/gcc/11.2.0/include/c++/11.2.0/bits/locale_classes.h:40, from /nas/longleaf/rhel8/apps/gcc/11.2.0/include/c++/11.2.0/bits/ios_base.h:41, from /nas/longleaf/rhel8/apps/gcc/11.2.0/include/c++/11.2.0/ios:42, from /nas/longleaf/rhel8/apps/gcc/11.2.0/include/c++/11.2.0/ostream:38, from /nas/longleaf/rhel8/apps/gcc/11.2.0/include/c++/11.2.0/iostream:39, from TopKSNP.cpp:2: /nas/longleaf/rhel8/apps/gcc/11.2.0/include/c++/11.2.0/bits/range_access.h:319:5: note: candidates are: ‘template<class _Tp> constexpr const _Tp* std::data(std::initializer_list<_Tp>)’ 319 | data(initializer_list<_Tp> __il) noexcept | ^~~~ /nas/longleaf/rhel8/apps/gcc/11.2.0/include/c++/11.2.0/bits/range_access.h:310:5: note: ‘template<class _Tp, long unsigned int _Nm> constexpr _Tp* std::data(_Tp (&)[_Nm])’ 310 | data(_Tp (&__array)[_Nm]) noexcept | ^~~~ /nas/longleaf/rhel8/apps/gcc/11.2.0/include/c++/11.2.0/bits/range_access.h:300:5: note: ‘template<class _Container> constexpr decltype (__cont.data()) std::data(const _Container&)’ 300 | data(const _Container& __cont) noexcept(noexcept(__cont.data())) | ^~~~ /nas/longleaf/rhel8/apps/gcc/11.2.0/include/c++/11.2.0/bits/range_access.h:290:5: note: ‘template<class _Container> constexpr decltype (__cont.data()) std::data(_Container&)’ 290 | data(_Container& __cont) noexcept(noexcept(__cont.data())) | ^~~~ In file included from TopKSNP.cpp:5: Util.h:10:16: note: ‘struct data’ 10 | struct data { | ^~~~ TopKSNP.cpp:17:25: error: request for member ‘begin’ in ‘items’, which is of non-class type ‘int’ 17 | std::sort(items.begin(), items.end(), by_number()); | ^~~~~ TopKSNP.cpp:17:40: error: request for member ‘end’ in ‘items’, which is of non-class type ‘int’ 17 | std::sort(items.begin(), items.end(), by_number()); | ^~~ TopKSNP.cpp:20:39: error: invalid types ‘int[int]’ for array subscript 20 | printf("%f %d ", items[i].number, items[i].index1); | ^ TopKSNP.cpp:20:56: error: invalid types ‘int[int]’ for array subscript 20 | printf("%f %d ", items[i].number, items[i].index1); | ^ TopKSNP.cpp:21:41: error: invalid types ‘int[int]’ for array subscript 21 | topKConfigure[i] = items[i].index1; | ^ make: *** [Makefile:17: CAVIAR] Error 1

using pkgconfig for LDFLAGS

as a suggestion, one could always override the LDFLAGS set in the makefile with the following, to get the library search path and library names using pkgconfig:

make LDFLAGS="$(pkg-config gsl lapack --libs) \
-I$(pwd)/armadillo/include/ -DARMA_DONT_USE_WRAPPER"

This is useful for installations where LIBRARY_PATH has not been configured correctly.

How to interpret the output files

Dear caviar developers,

Thanks for making this tool. I've been using it to look at some colocalization signals. I see in the output that three files are generated for each trait, with suffixes "_1_post", "_1_hist", "_1_set" (likewise for trait 2), and a "_col" file for the colocalization posteriors.

Could you explain the meaning of the numbers in the three files for each trait? (there are no headers)

Thanks,
Zhihao

making input files

Dear authors,

I need to run CAVIAR and eCAVIAR for GTEx eQTLs and GWAS SNPs. The readme file indicates that
"-z ZFILE, --z_file=ZFILE the GWAS z-score and rsID files
-z ZFILE, --z_file=ZFILE the eQTL z-score and rsID files"
Could you let me know where and how I can generate those z-scores? Thanks.

How to calculate the required LD r matrix as input?

Hi all,
I have tried to calculate the LD matrix for SuSiE coloc using ieugwasr, which use plink to calculate that using a reference panel for summary-level gwas data. But that did not work out well maybe because of the allele order (MRCIEU/TwoSampleMR#420). I wonder if the same problem could happen with caviar? Is there a recommended solid method to calculate the LD matrix as require as input for caviar? Thanks!

Compiling CAVIAR on Mac OS X M1 chip computer with homebrew installed GNU scientific library

If the GNU scientific library (https://www.gnu.org/software/gsl/) is installed using the homebrew package manager on a macOS X M1 chip computer :

brew install gsl

The gsl folder containing the relevant header files are in "/opt/homebrew/Cellar/gsl/2.7.1/include/"

The CAVIAR packages can be successfully compiled using "make" if the following line is added to "Makefile":

LDFLAGS += -I /opt/homebrew/Cellar/gsl/2.7.1/include/

I added the line on line 4, below

CFLAGS=-c -Wall -g -I $(DIC)

and above

LDFLAGS += -I $(DIC)/armadillo/include/ -DARMA_DONT_USE_WRAPPER -llapack -lblas -lgslcblas -lgsl

That is:

CC=g++
DIC=$(PWD)
CFLAGS=-c -Wall -g -I $(DIC)
LDFLAGS += -I /opt/homebrew/Cellar/gsl/2.7.1/include/
LDFLAGS += -I $(DIC)/armadillo/include/ -DARMA_DONT_USE_WRAPPER -llapack -lblas -lgslcblas -lgsl
SOURCES1=caviar.cpp PostCal.cpp Util.cpp TopKSNP.cpp
... etc.

GSL error

Hello,

I'm trying to run CAVIAR, not very successfully..

I tried first with my own data, but it kept failing. I tried with the sample data that you provide and I get the same error.
This is my code:
./CAVIAR –l /cvar/jhlab/Kathy/Plink/caviar/CAVIAR-C++/sample_data/50_LD.txt –z /cvar/jhlab/Kathy/Plink/caviar/CAVIAR-C++/sample_data/50_Z.txt –r 0.95 –o outputresults

And this is the error that I keep getting:
gsl: init_source.c:29: ERROR: matrix dimension n1 must be positive integer Default GSL error handler invoked. Aborted (core dumped)

Do you have any suggestions what should I change in order to fix this?
Can you also comment which file formats can CAVIAR tolerate? only .txt and .ld? or also .csv?

Thank you!

Question about

When I run the order ./CAVIAR -l snp_ld.txt -z snp_z.csv -o snp_result, the log result showed " the CAVIAR: error while loading shared libraries: liblapack.so: cannot open shared object file: No such file or directory". How to fix it? BTW, is there a software documentation to
explain how to use the caviar? Because I can't to open the ucla website, can you send a email for the documentation to [email protected]?

please tag versions

I see that you are assigning version numbers, as in

cout << "version 2.2:" << endl;
, but it would be very helpful if you could tag them here in the repository. It would be easier to see when new versions are available and to know which code corresponds to it.

matrix multiplication: inverse of singular matrix

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

BLAS and LAPACK link error

When preparing an easyconfig for CAVIAR I saw this error:

g++ caviar.cpp PostCal.cpp Util.cpp TopKSNP.cpp    -I /mnt/ds918plus/eb/nuc-centos8/build/CAVIAR/20200820/foss-2019b/caviar/CAVIAR-C++/armadillo/include/ -DARMA_DONT_USE_WRAPPER -llapack -lblas -lgslcblas  -lgsl -o CAVIAR
g++ ecaviar.cpp PostCal.cpp Util.cpp   -I /mnt/ds918plus/eb/nuc-centos8/build/CAVIAR/20200820/foss-2019b/caviar/CAVIAR-C++/armadillo/include/ -DARMA_DONT_USE_WRAPPER -llapack -lblas -lgslcblas  -lgsl -o eCAVIAR
/mnt/ds918plus/eb/nuc-centos8/software/binutils/2.32-GCCcore-8.3.0/bin/ld.gold: error: cannot find -llapack
/mnt/ds918plus/eb/nuc-centos8/software/binutils/2.32-GCCcore-8.3.0/bin/ld.gold: error: cannot find -lblas

The error was fixed by changing LDFLAGS in the Makefile to be:

LDFLAGS= -I $(DIC)/armadillo/include/ -DARMA_DONT_USE_WRAPPER -lopenblas -lgslcblas  -lgsl

LD matrix - r or r2?

Just a quick question - the LD matrix is the pairwise Pearson correlation between two SNPs. Should we provide r or r2?

Thanks
Matt

what is the -r option in input

Hi,
Thanks for the caviar software! I am wondering what the -r (rho-probability) option is for in the input. Is there a way to set the "coverage" for credible set? e.g, 95% or it's set to 95%?
Thanks a lot!

Best,
Yue

ERC1155

is this project supports ERC1155 ?
I am going to use for ERC721 and 1155, but anyone can give correct answer ?
Thank you.

Unable to run eCAVIAR with >8k SNPs

I'm having trouble running eCAVIAR when the number of SNPs is large, >8k. Jobs with fewer SNPs run without a problem, and increasing the available memory doesn't seem to be making a difference. Any tips? Thank you!

segmentation fault

Hello:

I am trying the caivar on the eQTL and GWAS data for few GWAS loci. However, some loci are completed and some loci had a error information like "segmentation fault"... Here i gave a example. Here is the output from my command. Could you help to check and fix this error? Thanks so much.

eCAVIAR -l test_GWAS.ld -l test_eQTL.ld -z test_GWAS.z -z test_eQTL.z -o output

@-------------------------------------------------------------@
| eCAVIAR! | v2.0 | 01/Aug/2017 |
|-------------------------------------------------------------|
| (C) 2017 Farhad Hormozdiari, GNU General Public License, v2 |
|-------------------------------------------------------------|
| For documentation, citation & bug-report instructions: |
| http://genetics.cs.ucla.edu/caviar/ |
@-------------------------------------------------------------@
-0 0
add
0 0.1
add
0 0.2
add
0 0.3
add
0 0.4
add
0 0.5
add
4.94066e-324 0.6
FINISH
reach=2659
2659
Max Causal=2
Total=3536471
0 5.67241e-23
100000 4.2641e-17
200000 4.98178e-17
300000 5.67564e-17
400000 6.55714e-17
500000 7.24377e-17
600000 8.29678e-17
700000 9.06624e-17
800000 9.79103e-17
900000 1.03529e-16
1000000 1.09101e-16
1100000 1.15797e-16
1200000 1.22241e-16
1300000 1.29166e-16
1400000 1.36004e-16
1500000 1.47125e-16
1600000 1.55799e-16
1700000 1.64667e-16
1800000 1.74226e-16
1900000 1.81991e-16
2000000 1.90807e-16
2100000 2.01153e-16
2200000 2.14104e-16
2300000 2.34897e-16
2400000 3.31121e-16
2500000 7.22409e-13
2600000 7.22409e-13
2700000 7.22409e-13
2800000 7.22409e-13
2900000 7.22409e-13
3000000 7.22409e-13
3100000 7.22409e-13
3200000 7.22409e-13
3300000 7.22409e-13
3400000 7.22409e-13
3500000 7.22409e-13
Total Likelihood= 1.444780e-12 SNP=2659

1183 4.850940e-01

-0 0
add
0 0.1
add
0 0.2
add
0 0.3
add
0 0.4
add
0 0.5
add
4.94066e-324 0.6
Segmentation fault

The data can be download here:

https://www.dropbox.com/sh/d3wspkfm5csknk5/AABAhXeqWbfakgTBX8LJnwPpa?dl=0

long options don't work

$ CAVIAR --help
CAVIAR: invalid option -- '-'
Strange
Options: 
-h, --help            		show this help message and exit 
-o OUTFILE, --out=OUTFILE 	specify the output file
-l LDFILE, --ld_file=LDFILE  	the ld input file
-z ZFILE, --z_file=ZFILE	the z-score and rsID files
-r RHO, --rho-prob=RHO		set $pho$ probability (default 0.95)
-g GAMMA, --gamma		set $gamma$ the prior of a SNP being causal (default 0.01)
-c causal			set the maximum number of causal SNPs
-f 1				to out the probaility of different number of causal SNP

The help gets printed here anyway because of the usage error, but there shouldn't be an error.

Input files - eQTL

I had couple of quick questions.
I found a word doc tutorial from you which mentions which files to use as eQTL input.
In your document, you mention that there are two files in the <all.pairs.txt.gz>.
But I found there is only a single file, with the following headers

gene_id Variant ID tss distance ma_sample ma_count maf pval_nominal slope slope_se

Is this is correct file.
The folder GTEx_Analysis_v7_eQTL.tar.gz that has two files and these files are called Tissue.v7.egenes.txt.gz and Tissue.v7.signif_variant_gene_pairs.txt.gz
Which files should I be using??

Segmentation fault (core dumped)

I have been trying to set up eCAVIAR and getting it to run on the sample data. Unfortunately, I get an error message that doesn't help much and the website for documentation is not available.

This is the command I used:
./eCAVIAR -z ./sample_data/GWAS.MC.AD.IGAP.stage1.hg19.chr.11.121344805.121517613.CHRPOSREFALT.Z.txt -ld ./sample_data/GWAS.ADGC.MC.AD.IGAP.stage1.hg19.chr.11.121344805.121517613.CHRPOSREFALT.LD.ld -z ./sample_data/eQTL.CARDIOGENICS.MC.AD.IGAP.stage1.hg19.chr.11.121344805.121517613.CHRPOSREFALT.ILMN_1810712.NM_015313.1.ARHGEF12.Z.txt -ld ./sample_data/eQTL.CARDIOGENICS.MC.AD.IGAP.stage1.hg19.chr.11.121344805.121517613.CHRPOSREFALT.LD.ld -f 1 -c 2 -o ./sample_data/Coloc_test

And this is the error I get:
@-------------------------------------------------------------@
| 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/ |
@-------------------------------------------------------------@
Segmentation fault (core dumped)

Is there any way to find out what the problem is?

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.