ANGSD / angsd

Program for analysing NGS data.
229 stars 50 forks source link

Compilation error in bam_likes.cpp #52

Closed FokkeDijkstra closed 7 years ago

FokkeDijkstra commented 8 years ago

The definition of err_mod_t has been commented out in recent releases. Because of this I cannot built angsd versions later than 0.910. I've already tried using HTSlib 1.3.2 to see if this would solve the issue.

The error message using gcc 4.9.3 is:

bam_likes.cpp:271:1: error: ‘errmod_t’ does not name a type
 errmod_t *mod = NULL;
ANGSD commented 8 years ago

Maybe you are linking agains the wrong version of htslib:

See this command list which works on my laptop: mkdir temp git clone https://github.com/samtools/htslib temp/htslib &>/dev/null git clone https://github.com/ANGSD/angsd temp/angsd &>/dev/null cd temp/htslib/;make &>/dev/null;cd ../angsd;make HTSSRC=../htslib &>/dev/null; ./angsd -> angsd version: 0.913-47-gb68717e (htslib: 1.3.2-78-g0ca17a0) build(Sep 21 2016 10:53:26)

-> angsd version: 0.913-47-gb68717e (htslib: 1.3.2-78-g0ca17a0) build(Sep 21 2016 10:53:26)
-> Please use the website "http://www.popgen.dk/angsd" as reference
-> Use -nThreads or -P for number of threads allocated to the program

Overview of methods: -GL Estimate genotype likelihoods -doCounts Calculate various counts statistics -doAsso Perform association study -doMaf Estimate allele frequencies -doError Estimate the type specific error rates -doAncError Estimate the errorrate based on perfect fastas -HWE_pval Est inbreedning per site or use as filter -doGeno Call genotypes -doFasta Generate a fasta for a BAM file -doAbbababa Perform an ABBA-BABA test -sites Analyse specific sites (can force major/minor) -doSaf Estimate the SFS and/or neutrality tests genotype calling -doHetPlas Estimate hetplasmy by calculating a pooled haploid frequency

Below are options that can be usefull
-bam        Options relating to bam reading
-doMajorMinor   Infer the major/minor using different approaches
-ref/-anc   Read reference or ancestral genome
-doSNPstat  Calculate various SNPstat
-cigstat    Printout CIGAR stat across readlength
many others

For information of specific options type: ./angsd METHODNAME eg ./angsd -GL ./angsd -doMaf ./angsd -doAsso etc ./angsd sites for information about indexing -sites files Examples: Estimate MAF for bam files in 'list' './angsd -bam list -GL 2 -doMaf 2 -out RES -doMajorMinor 1' thorfinns-MacBook-Pro:angsd thorfinn$

FokkeDijkstra commented 8 years ago

Indeed, using a clone of HTSlib master works, whereas 1.3.2 does not. But, I would consider building your releases on development versions of external software bad practice.

ANGSD commented 8 years ago

That is a very valid point.

The first years of angsd it was standalone, but i was anticipating that CRAM might be used alot and i didn't want to write my own CRAM reader. So I started to use htslib, which is currently being used for popping a read, baq,mapq and gl calculation.

FokkeDijkstra commented 8 years ago

I would expect HTSlib to include the changes in the next release. Maybe this version can then be used as a dependency.

ANGSD commented 7 years ago

Hi It looks like this got fixed in the latest 1.4.1 from htslib so im closing this issue. Feel free to reopen if needed.