grenaud / glactools

command-line tools for the management of genotype likelihoods and allele counts
http://grenaud.github.io/glactools/
GNU General Public License v3.0
29 stars 2 forks source link

compile errors #14

Closed shiyi-pan closed 4 years ago

shiyi-pan commented 4 years ago

Hi, grenaud, I met a problem when compile the glactools,Can you give me some advise ? Thank you very.

g++ -std=c++11 -Wall -lm -O3 -lz -Ihtslib/ -Ibamtools/include/ -Ibamtools/src/ -Itabixpp/ -I/ds3512/home/panyp/ruanjian/glactools-1.0.5/libgab -I/ds3512/home/panyp/ruanjian/glactools-1.0.5/libgab/gzstream/ -c glactools.cpp -o glactools.o In file included from GlacParser.h:17, from BAM2ACF.h:31, from glactools.cpp:13: htslib/hts_internal.h:126:68: error: expected primary-expression before 'static' static inline int find_file_extension(const char fn, char ext_out[static HTS_MAX_EXT_LEN]) ^~ htslib/hts_internal.h:126:68: error: expected ']' before 'static' static inline int find_file_extension(const char fn, char ext_out[static HTS_MAX_EXT_LEN]) ^~ ] htslib/hts_internal.h:126:68: error: expected ')' before 'static' static inline int find_file_extension(const char fn, char ext_out[static HTS_MAX_EXT_LEN]) ~ ^~ ) htslib/hts_internal.h:126:68: error: expected initializer before 'static' static inline int find_file_extension(const char fn, char ext_out[static HTS_MAX_EXT_LEN]) ^~ In file included from BAM2ACF.h:31, from glactools.cpp:13: GlacParser.h:30:13: warning: 'sizeBytesGLF' defined but not used [-Wunused-variable] static char sizeBytesGLF; ^~~~ GlacParser.h:29:13: warning: 'sizeBytesACF' defined but not used [-Wunused-variable] static char sizeBytesACF; ^~~~ GlacParser.h:27:16: warning: 'maskAlt' defined but not used [-Wunused-variable] static uint8_t maskAlt=15; //00001111 ^~~ GlacParser.h:25:16: warning: 'maskRef' defined but not used [-Wunused-variable] static uint8_t maskRef=240; //11110000 ^~~ make: *** [glactools.o] Error 1

grenaud commented 4 years ago

Dear shiyi-pan, just to check do you have the latest version? The "hts_internal" problem was fixed a few days ago. Could you run the following:

make clean
git status
git pull origin master
make

Could you paste the contents of: .git/logs/HEAD

shiyi-pan commented 4 years ago

thank you ,grenaud . I downloaded the latest version and compiled the software. But I got a new error when I run it. I hope you can do me a favour.

I have two problem. first , when I run it in command line,my command is that:

glactools vcf2acf --fai Gmax_275_v2.0.fa.fai --onlyGT Z-001.recode.vcf Z-001 > a.acf.gz but I got a warning like that : Warning: if several sites are rejected due to being empty, it could be due to the absence of the PL field, please rerun using the onlyGT flag. Program terminated gracefully.

I have already used the onlyGT flag. I don't know why and here is my vcf file:

fileformat=VCFv4.2

CHROM POS ID REF ALT QUAL FILTER INFO FORMAT Z-001

1 4485 Chr01_4485 G A . . . GT 1/1 1 5564 Chr01_5564 C T . . . GT 0/0 1 5698 Chr01_5698 C T . . . GT 0/0 1 5899 Chr01_5899 T C . . . GT 1/1

the seconded problem. when I run it in a script , It don't have a result. my script is like that:

!/bin/bash

#

$ -cwd

$ -j y

$ -S /bin/bash

#

$ -l mem_free=4G

# VCFTOOLS=/share/apps/vcftools/vcftools-0.1.15 GLACTOOLS=/ds3512/home/panyp/ruanjian/glactools/ SAMTOOLS=/ds3512/home/panyp/ruanjian/samtools-1.9/bin

DIR=/ds3512/home/panyp/diff_genome/

$SAMTOOLS/samtools faidx $DIR/Gmax_275_v2.0.fa

$VCFTOOLS --vcf chr01.recode.vcf --indv Z-001 --out Z-001 --recode

$GLACTOOLS/glactools vcf2acf --fai $DIR/Gmax_275_v2.0.fa.fai --onlyGT Z-001.recode.vcf Z-001 > Z-001.acf.gz

Z-001 is my sample ID. It generate a 'Z-001.acf.gz' file but the file can't be decompressed :

gzip: Z-001.acf.gz: unexpected end of file.

I check the log and find that:

Filter used: Cutoffs : Minimum genotype quality (GQ) = 0 Minimum RMS of the mapping qualities (MQ) = 0 Minimum mapability = 0 Filter sites close to an indel = currently turned on/used Filter sites close labeled as repeat masked (RM) = currently turned on/used Filter sites close labeled as systematic error (SysErr) = currently turned on/used Minimum coverage = 0 Minimum coverage = 1000

Cannot write to /dev/stdout.

grenaud commented 4 years ago

great! Would you mind that we close this issue and could you open a new one?

shiyi-pan commented 4 years ago

thank you,you can close this one .