fgvieira / ngsDist

Estimation of pairwise distances under a probabilistic framework
GNU General Public License v3.0
10 stars 7 forks source link

ngsDist compile problems #1

Closed einararn closed 9 years ago

einararn commented 9 years ago

Hi Filipe,

I wonder if you could help solve compile problems of ngsDist. On a cluster running CentOS release 6.5 (Final) with gcc version 4.4.7 20120313 (Red Hat 4.4.7-11) (GCC) I get the following error:

g++ -g -Wall -I./shared -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -c shared/gen_func.cpp shared/gen_func.cpp: In function ‘void* opengzfile(const char, const char_, uint64_t)’: shared/gen_func.cpp:258: error: ‘gzbuffer’ was not declared in this scope make: *\ [gen_func.cpp] Error 1

However, it compiles fine on my laptop running Fedora 21 gcc version 4.9.2 20150212 (Red Hat 4.9.2-6) (GCC)

Thanks Best Einar

fgvieira commented 9 years ago

Hi Einar,

it seems like a zlib issue. Do you have it installed on your cluster?

best

einararn commented 9 years ago

Hi Filipe

Yes zlib is installed, version is 1.2.3

(The Fedora has zlib version 1.2.8)

Can the gzbuffer be declared in a header?

Best Einar

fgvieira commented 9 years ago

Hi Einar,

gzbuffer is already declared in "zlib.h" so I don't think declaring it on a header will help. I'd say it is either an issue with versions or how zlib is installed on your server. Can you update gcc and zlib (I've only tested them on gcc v4.7.2 and zlib v1.2.7)? Also, do you have all the correct LIB paths set?

best,

einararn commented 9 years ago

Hi Filipe,

Thanks. Actually different versions of zlib and gcc are available on the cluster as modules. I've gotten ngsDist to compile by loading zlib 1.2.8 but still have problems running it due to incompatibility. By LIB paths you mean LD_LIBRARY_PATH ? What other library paths are needed?

Best Einar


Einar Arnason, Professor einararn@hi.is Institute of Biology University of Iceland Askja # 346 office 354-525-4613 Sturlugata 7 lab 354-525-4606 101 Reykjavik fax 354-525-4069

Iceland

On Fri, Jul 24, 2015 at 12:34 PM, Filipe G. Vieira <notifications@github.com

wrote:

Hi Einar,

gzbuffer is already declared in "zlib.h" so I don't think declaring it on a header will help. I'd say it is either an issue with versions or how zlib is installed on your server. Can you update gcc and zlib (I've only tested them on gcc v4.7.2 and zlib v1.2.7)? Also, do you have all the correct LIB paths set?

best,

— Reply to this email directly or view it on GitHub https://github.com/fgvieira/ngsDist/issues/1#issuecomment-124505666.

fgvieira commented 9 years ago

If you managed to compile it, then it seems it is the library versions. But then it should work by now... what error do you get now?

cheers

einararn commented 9 years ago

I managed to compile it but only by doctoring the Makefile by defining a ZLIB variable with the path to the zlib include and lib

Now I get an error:

[read_geno] ERROR: cannot read GENO file! : Success

Same error when i use angsd version 0.9 or the 0.615 that comes with ngsTools (no matter whether angsd is compiled out of the box or with new Makefile defining ZLIB as above)

Einar


Einar Arnason, Professor einararn@hi.is Institute of Biology University of Iceland Askja # 346 office 354-525-4613 Sturlugata 7 lab 354-525-4606 101 Reykjavik fax 354-525-4069

Iceland

On Tue, Jul 28, 2015 at 10:45 AM, Filipe G. Vieira <notifications@github.com

wrote:

If you managed to compile it, then it seems it is the library versions. But then it should work by now... what error do you get now?

cheers

— Reply to this email directly or view it on GitHub https://github.com/fgvieira/ngsDist/issues/1#issuecomment-125553023.

fgvieira commented 9 years ago

ok, so it seems that now it is compiled, but you seem to have an issue with your input data. How did you run ANGSD? And how are you running ngsDist?

einararn commented 9 years ago

Hi

I'm running the example in ngsTools:

~/verk/ngsTools/angsd/angsd -b bam.filelist -anc chimpHg19.fa -sites intersect.txt -r 1: -out test.pops -doMajorMinor 1 -doPost 1 -doMaf 1 -doGeno 8 -GL 1 -minMaf 0.05

wc intersect.txt 520 1040 5720 intersect.txt

~/verk/ngsDist/ngsDist -verbose 0 -geno test.pops.geno.gz -probs -n_ind 10 -n_sites 520 -labels pops.label -out_prefix test.pops -n_threads 10 -n_boot_rep 100 -boot_block_size 5

[read_geno] ERROR: cannot read GENO file! : Success

Einar


Einar Arnason, Professor einararn@hi.is Institute of Biology University of Iceland Askja # 346 office 354-525-4613 Sturlugata 7 lab 354-525-4606 101 Reykjavik fax 354-525-4069

Iceland

On Thu, Jul 30, 2015 at 9:18 AM, Filipe G. Vieira notifications@github.com wrote:

ok, so it seems that now it is compiled, but you seem to have an issue with your input data. How did you run ANGSD? And how are you running ngsDist?

— Reply to this email directly or view it on GitHub https://github.com/fgvieira/ngsDist/issues/1#issuecomment-126237384.

fgvieira commented 9 years ago

Humm.... this is a strange error since I don't see anything particularly wrong with your commands. Can you send me your input file?

And did you manage to run this command line (with the same file) on your laptop?

FGV

einararn commented 9 years ago

Here is the file

The same command does not work on my laptop using this file

Einar


Einar Arnason, Professor einararn@hi.is Institute of Biology University of Iceland Askja # 346 office 354-525-4613 Sturlugata 7 lab 354-525-4606 101 Reykjavik fax 354-525-4069

Iceland

On Thu, Jul 30, 2015 at 8:18 PM, Filipe G. Vieira notifications@github.com wrote:

Humm.... this is a strange error since I don't see anything particularly wrong with your commands. Can you send me your input file?

And did you manage to run this command line (with the same file) on your laptop?

FGV

— Reply to this email directly or view it on GitHub https://github.com/fgvieira/ngsDist/issues/1#issuecomment-126469146.

fgvieira commented 9 years ago

Hi Einar,

just looked at your file and it is fine! The problem seems to be with the number of sites. While you specify 520 sites, the file only has 492; this might be due to the fact that ANGSD skips sites with no data.... you can easily get the final number of site with something like: "zcat test.pops.geno.gz | wc -l"

best,

einararn commented 9 years ago

Hi Filipe,

Thanks. It works now. Best Einar


Einar Arnason, Professor einararn@hi.is Institute of Biology University of Iceland Askja # 346 office 354-525-4613 Sturlugata 7 lab 354-525-4606 101 Reykjavik fax 354-525-4069

Iceland

On Fri, Jul 31, 2015 at 1:47 PM, Filipe G. Vieira notifications@github.com wrote:

Hi Einar,

just looked at your file and it is fine! The problem seems to be with the number of sites. While you specify 520 sites, the file only has 492; this might be due to the fact that ANGSD skips sites with no data.... you can easily get the final number of site with something like: "zcat test.pops.geno.gz | wc -l"

best,

— Reply to this email directly or view it on GitHub https://github.com/fgvieira/ngsDist/issues/1#issuecomment-126696200.