vibansal / crisp

Code for multi-sample variant calling from sequence data of pooled or unpooled DNA samples
MIT License
19 stars 8 forks source link

Installation Error #21

Closed virenar closed 3 years ago

virenar commented 3 years ago

I have an issue installing the CRISP in ubuntu 16.04.5 LTS. I get the following message when I execute make all in the main directory

make -C samtools all
make[1]: Entering directory '/home/ubuntu/git/crisp/samtools'
make[2]: Entering directory '/home/ubuntu/git/crisp/samtools'
gcc -c -g -Wall -O2  -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_USE_KNETFILE -D_CURSES_LIB=1 -I. sam_header.c -o sam_header.o
gcc -c -g -Wall -O2  -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_USE_KNETFILE -D_CURSES_LIB=1 -I. bam_reheader.c -o bam_reheader.o
bam_reheader.c: In function ‘bam_reheader’:
bam_reheader.c:11:16: warning: variable ‘old’ set but not used [-Wunused-but-set-variable]
  bam_header_t *old;
                ^
gcc -c -g -Wall -O2  -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_USE_KNETFILE -D_CURSES_LIB=1 -I. kprobaln.c -o kprobaln.o
kprobaln.c: In function ‘kpa_glocal’:
kprobaln.c:78:21: warning: variable ‘is_diff’ set but not used [-Wunused-but-set-variable]
  int bw, bw2, i, k, is_diff = 0, is_backward = 1, Pr;
                     ^
gcc -c -g -Wall -O2  -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_USE_KNETFILE -D_CURSES_LIB=1 -I. bam_cat.c -o bam_cat.o
ar -csru libbam.a bgzf.o kstring.o bam_aux.o bam.o bam_import.o sam.o bam_index.o bam_pileup.o bam_lpileup.o bam_md.o razf.o faidx.o bedidx.o knetfile.o bam_sort.o sam_header.o bam_reheader.o kprobaln.o bam_cat.o
ar: `u' modifier ignored since `D' is the default (see `U')
make[2]: Leaving directory '/home/ubuntu/git/crisp/samtools'
make[2]: Entering directory '/home/ubuntu/git/crisp/samtools/bcftools'
gcc -c -g -Wall -O2  -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_USE_KNETFILE -D_CURSES_LIB=1 -I.. -I. bcf.c -o bcf.o
gcc -c -g -Wall -O2  -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_USE_KNETFILE -D_CURSES_LIB=1 -I.. -I. vcf.c -o vcf.o
gcc -c -g -Wall -O2  -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_USE_KNETFILE -D_CURSES_LIB=1 -I.. -I. bcfutils.c -o bcfutils.o
gcc -c -g -Wall -O2  -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_USE_KNETFILE -D_CURSES_LIB=1 -I.. -I. prob1.c -o prob1.o
gcc -c -g -Wall -O2  -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_USE_KNETFILE -D_CURSES_LIB=1 -I.. -I. em.c -o em.o
em.c: In function ‘bcf_em1’:
em.c:174:12: warning: variable ‘n2’ set but not used [-Wunused-but-set-variable]
  int i, n, n2;
            ^
gcc -c -g -Wall -O2  -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_USE_KNETFILE -D_CURSES_LIB=1 -I.. -I. kfunc.c -o kfunc.o
gcc -c -g -Wall -O2  -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_USE_KNETFILE -D_CURSES_LIB=1 -I.. -I. kmin.c -o kmin.o
gcc -c -g -Wall -O2  -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_USE_KNETFILE -D_CURSES_LIB=1 -I.. -I. index.c -o index.o
gcc -c -g -Wall -O2  -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_USE_KNETFILE -D_CURSES_LIB=1 -I.. -I. fet.c -o fet.o
gcc -c -g -Wall -O2  -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_USE_KNETFILE -D_CURSES_LIB=1 -I.. -I. mut.c -o mut.o
gcc -c -g -Wall -O2  -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_USE_KNETFILE -D_CURSES_LIB=1 -I.. -I. bcf2qcall.c -o bcf2qcall.o
ar -csru libbcf.a bcf.o vcf.o bcfutils.o prob1.o em.o kfunc.o kmin.o index.o fet.o mut.o bcf2qcall.o
ar: `u' modifier ignored since `D' is the default (see `U')
make[2]: Leaving directory '/home/ubuntu/git/crisp/samtools/bcftools'
make[2]: Entering directory '/home/ubuntu/git/crisp/samtools/misc'
make[2]: Nothing to be done for 'lib'.
make[2]: Leaving directory '/home/ubuntu/git/crisp/samtools/misc'
gcc -c -g -Wall -O2  -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_USE_KNETFILE -D_CURSES_LIB=1 -I. bam_tview.c -o bam_tview.o
gcc -c -g -Wall -O2  -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_USE_KNETFILE -D_CURSES_LIB=1 -I. bam_plcmd.c -o bam_plcmd.o
gcc -c -g -Wall -O2  -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_USE_KNETFILE -D_CURSES_LIB=1 -I. sam_view.c -o sam_view.o
gcc -c -g -Wall -O2  -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_USE_KNETFILE -D_CURSES_LIB=1 -I. bam_rmdup.c -o bam_rmdup.o
gcc -c -g -Wall -O2  -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_USE_KNETFILE -D_CURSES_LIB=1 -I. bam_rmdupse.c -o bam_rmdupse.o
gcc -c -g -Wall -O2  -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_USE_KNETFILE -D_CURSES_LIB=1 -I. bam_mate.c -o bam_mate.o
gcc -c -g -Wall -O2  -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_USE_KNETFILE -D_CURSES_LIB=1 -I. bam_stat.c -o bam_stat.o
gcc -c -g -Wall -O2  -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_USE_KNETFILE -D_CURSES_LIB=1 -I. bam_color.c -o bam_color.o
gcc -c -g -Wall -O2  -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_USE_KNETFILE -D_CURSES_LIB=1 -I. bamtk.c -o bamtk.o
gcc -c -g -Wall -O2  -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_USE_KNETFILE -D_CURSES_LIB=1 -I. kaln.c -o kaln.o
gcc -c -g -Wall -O2  -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_USE_KNETFILE -D_CURSES_LIB=1 -I. bam2bcf.c -o bam2bcf.o
gcc -c -g -Wall -O2  -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_USE_KNETFILE -D_CURSES_LIB=1 -I. bam2bcf_indel.c -o bam2bcf_indel.o
gcc -c -g -Wall -O2  -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_USE_KNETFILE -D_CURSES_LIB=1 -I. errmod.c -o errmod.o
gcc -c -g -Wall -O2  -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_USE_KNETFILE -D_CURSES_LIB=1 -I. sample.c -o sample.o
gcc -c -g -Wall -O2  -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_USE_KNETFILE -D_CURSES_LIB=1 -I. cut_target.c -o cut_target.o
cut_target.c: In function ‘main_cut_target’:
cut_target.c:137:36: warning: variable ‘lastpos’ set but not used [-Wunused-but-set-variable]
  int c, tid, pos, n, lasttid = -1, lastpos = -1, l, max_l;
                                    ^
gcc -c -g -Wall -O2  -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_USE_KNETFILE -D_CURSES_LIB=1 -I. phase.c -o phase.o
gcc -c -g -Wall -O2  -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_USE_KNETFILE -D_CURSES_LIB=1 -I. bam2depth.c -o bam2depth.o
gcc -g -Wall -O2  -o samtools bam_tview.o bam_plcmd.o sam_view.o bam_rmdup.o bam_rmdupse.o bam_mate.o bam_stat.o bam_color.o bamtk.o kaln.o bam2bcf.o bam2bcf_indel.o errmod.o sample.o cut_target.o phase.o bam2depth.o -Lbcftools  libbam.a -lbcf -lcurses  -lm -lz
make[1]: Leaving directory '/home/ubuntu/git/crisp/samtools'
mkdir -p include bin;
make -C . new
make[1]: Entering directory '/home/ubuntu/git/crisp'
gcc -Wall -D_GNU_SOURCE -c parsebam/readfasta.c -o include/readfasta.o
parsebam/readfasta.c: In function ‘read_fastaheader’:
parsebam/readfasta.c:62:33: warning: unused variable ‘length’ [-Wunused-variable]
  int i=0,j=0,c=0,c1=0,k=0; char length[64];
                                 ^
gcc -Wall -D_GNU_SOURCE -Isamtools -c parsebam/bamsreader.c -o include/bamsreader.o
parsebam/bamsreader.c: In function ‘free_read_queue’:
parsebam/bamsreader.c:97:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
parsebam/bamsreader.c: In function ‘allocate_mem_heap’:
parsebam/bamsreader.c:121:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
gcc -Wall -D_GNU_SOURCE -Isamtools -c parsebam/variant.c -o include/variant.o
In file included from parsebam/variant.c:29:0:
parsebam/process_indel_variant.c: In function ‘print_indel_haplotypes’:
parsebam/process_indel_variant.c:215:53: warning: unused variable ‘ol’ [-Wunused-variable]
  int base; int offset=0; double ep; int op = 0; int ol=0; int i=0;
                                                     ^
parsebam/process_indel_variant.c:215:41: warning: unused variable ‘op’ [-Wunused-variable]
  int base; int offset=0; double ep; int op = 0; int ol=0; int i=0;
                                         ^
parsebam/process_indel_variant.c:215:33: warning: unused variable ‘ep’ [-Wunused-variable]
  int base; int offset=0; double ep; int op = 0; int ol=0; int i=0;
                                 ^
parsebam/process_indel_variant.c:215:16: warning: unused variable ‘offset’ [-Wunused-variable]
  int base; int offset=0; double ep; int op = 0; int ol=0; int i=0;
                ^
parsebam/process_indel_variant.c:215:6: warning: unused variable ‘base’ [-Wunused-variable]
  int base; int offset=0; double ep; int op = 0; int ol=0; int i=0;
      ^
In file included from parsebam/variant.c:30:0:
parsebam/init_variant.c: In function ‘initialize_variant’:
parsebam/init_variant.c:111:24: warning: array subscript has type ‘char’ [-Wchar-subscripts]
  variant->refbase = BTI[variant->refb]; // what if this is IUPAC ambig. base 
                        ^
parsebam/init_variant.c:106:10: warning: unused variable ‘j’ [-Wunused-variable]
  int i=0,j=0,p=0,q=0; 
          ^
parsebam/variant.c: In function ‘advance_read’:
parsebam/variant.c:61:15: warning: unused variable ‘i’ [-Wunused-variable]
  int op=0,l=0,i=0;
               ^
parsebam/variant.c: In function ‘calculate_allelecounts’:
parsebam/variant.c:248:80: warning: implicit declaration of function ‘realign_read’ [-Wimplicit-function-declaration]
    if (INDEL_REALIGNMENT ==2 && bcall->realigned ==0 && bcall->mismatches > 0) realign_read(bamfiles_data,j,bcall,reflist);
                                                                                ^
parsebam/variant.c:304:17: warning: array subscript has type ‘char’ [-Wchar-subscripts]
      ibase = BTI[base]; bcall->allele = ibase+offset;
                 ^
parsebam/variant.c:233:6: warning: unused variable ‘i’ [-Wunused-variable]
  int i=0; int reads=0; int j=0; int ar=0;
      ^
parsebam/variant.c:231:43: warning: unused variable ‘allelematch’ [-Wunused-variable]
  int offset=0; double ep; int allele; int allelematch=0; int bin=0;
                                           ^
parsebam/variant.c:231:31: warning: unused variable ‘allele’ [-Wunused-variable]
  int offset=0; double ep; int allele; int allelematch=0; int bin=0;
                               ^
parsebam/variant.c:228:12: warning: unused variable ‘base_m’ [-Wunused-variable]
  char base,base_m; uint8_t strand,randomstrand=0;
            ^
parsebam/variant.c:227:33: warning: variable ‘indelalleles’ set but not used [-Wunused-but-set-variable]
  int insertions =0,deletions =0,indelalleles=0;
                                 ^
In file included from parsebam/variant.c:29:0:
parsebam/process_indel_variant.c: In function ‘calculate_indel_ambiguity’:
parsebam/process_indel_variant.c:92:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
parsebam/process_indel_variant.c: In function ‘print_indel_haplotypes’:
parsebam/process_indel_variant.c:230:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
In file included from parsebam/variant.c:30:0:
parsebam/init_variant.c: In function ‘initialize_variant’:
parsebam/init_variant.c:132:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
parsebam/variant.c: In function ‘calculate_allelecounts’:
parsebam/variant.c:276:5: warning: ‘bcall_mate’ may be used uninitialized in this function [-Wmaybe-uninitialized]
     evaluate_OPE_readpair(bcall,bcall_mate,variant,&strand,&randomstrand,&quality);
     ^
gcc -Wall -D_GNU_SOURCE -Isamtools -c parsebam/allelecounts.c -o include/allelecounts.o
In file included from parsebam/allelecounts.c:8:0:
parsebam/calculatelikelihoods.c: In function ‘compute_GLLs’:
parsebam/calculatelikelihoods.c:46:16: warning: array subscript has type ‘char’ [-Wchar-subscripts]
    allele = BTI[bcall->sequence[bcall->l1+bcall->delta]]; 
                ^
parsebam/allelecounts.c: In function ‘print_variantreads’:
parsebam/allelecounts.c:23:10: warning: unused variable ‘j’ [-Wunused-variable]
  int i=0,j=0;
          ^
parsebam/allelecounts.c: In function ‘calculate_uniquereads’:
parsebam/allelecounts.c:45:10: warning: unused variable ‘j’ [-Wunused-variable]
  int i=0,j=0,reads=0; *unique =1; *middle = 0;
          ^
parsebam/allelecounts.c:44:6: warning: unused variable ‘UFLAG’ [-Wunused-variable]
  int UFLAG=1;
      ^
gcc -Wall -D_GNU_SOURCE -Isamtools -c FET/chisquare.c -o include/chisquare.o
FET/chisquare.c: In function ‘chi2pvalue’:
FET/chisquare.c:21:43: warning: unused variable ‘statistic’ [-Wunused-variable]
  double statisticjoint[2] = {0,0}; double statistic[2]={0,0}; double statisticf[2]={0,0},statisticr[2]={0,0};
                                           ^
gcc -Wall -D_GNU_SOURCE -c FET/contables.c -o include/contables.o
FET/contables.c: In function ‘fetsided’:
FET/contables.c:102:9: warning: unused variable ‘ptable’ [-Wunused-variable]
  double ptable = ncr(r1,c1) + ncr(r2,c2); double DEN= ncr(r1+r2,c1+c2);
         ^
FET/contables.c: In function ‘pvalue_contable_iter_stranded’:
FET/contables.c:265:36: warning: variable ‘deltac’ set but not used [-Wunused-but-set-variable]
  double clra =0, clranew=0; double deltac=0; double DOF = size-1;
                                    ^
gcc -Wall -D_GNU_SOURCE -Iparsebam -Isamtools -c crisp/newcrispcaller.c -o include/newcrispcaller.o
In file included from crisp/newcrispcaller.c:17:0:
crisp/../FET/chisquare-stratified.c: In function ‘chi2pvalue_stratified’:
crisp/../FET/chisquare-stratified.c:18:9: warning: unused variable ‘statnew’ [-Wunused-variable]
  double statnew[2]={0,0},pairwisestat[2]={0,0};
         ^
crisp/../FET/chisquare-stratified.c:16:37: warning: unused variable ‘SF’ [-Wunused-variable]
  double pvalue[3] = {0,0,0}; double SF,RUGF;
                                     ^
crisp/../FET/chisquare-stratified.c:16:9: warning: unused variable ‘pvalue’ [-Wunused-variable]
  double pvalue[3] = {0,0,0}; double SF,RUGF;
         ^
In file included from crisp/newcrispcaller.c:17:0:
crisp/../FET/chisquare-stratified.c: In function ‘chi2pvalue_stratified_pivotsample’:
crisp/../FET/chisquare-stratified.c:90:43: warning: unused variable ‘statistic’ [-Wunused-variable]
  double statisticjoint[2] = {0,0}; double statistic[2]={0,0}; double statisticf[2]={0,0},statisticr[2]={0,0};
                                           ^
In file included from crisp/crispEM.c:24:0,
                 from crisp/newcrispcaller.c:18:
crisp/../FET/lowcovFET.c: In function ‘pvalue_lowcoverage’:
crisp/../FET/lowcovFET.c:25:39: warning: unused variable ‘num’ [-Wunused-variable]
  int i=0,j=0,offset=0; int den=0; int num=0;
                                       ^
crisp/../FET/lowcovFET.c:25:28: warning: unused variable ‘den’ [-Wunused-variable]
  int i=0,j=0,offset=0; int den=0; int num=0;
                            ^
crisp/../FET/lowcovFET.c: In function ‘pvalue_lowcoverage_stranded’:
crisp/../FET/lowcovFET.c:161:9: warning: unused variable ‘sstat’ [-Wunused-variable]
  double sstat =0; 
         ^
In file included from crisp/crispEM.c:33:0,
                 from crisp/newcrispcaller.c:18:
crisp/LRstatistic.c: In function ‘calculate_likelihood_EM’:
crisp/LRstatistic.c:8:14: warning: unused variable ‘k’ [-Wunused-variable]
  int i=0,j=0,k=0,K=0,iter=0; 
              ^
crisp/LRstatistic.c: In function ‘calculate_LRstatistic’:
crisp/LRstatistic.c:60:9: warning: unused variable ‘pcombined1’ [-Wunused-variable]
  double pcombined1 = calculate_likelihood_EM(variant,allele1,allele2,allele3,p,&dataLL1,E01,E10,5);
         ^
In file included from crisp/newcrispcaller.c:18:0:
crisp/crispEM.c: In function ‘calculate_pooled_likelihoods_snp’:
crisp/crispEM.c:109:14: warning: array subscript has type ‘char’ [-Wchar-subscripts]
    base = BTI[bcall->sequence[bcall->l1+bcall->delta]]; 
              ^
crisp/crispEM.c: In function ‘calculate_genotypes’:
crisp/crispEM.c:148:22: warning: variable ‘sbgenotype’ set but not used [-Wunused-but-set-variable]
  int bestgenotype =0,sbgenotype =0; 
                      ^
crisp/crispEM.c: In function ‘EMmethod’:
crisp/crispEM.c:226:29: warning: unused variable ‘convergence_delta’ [-Wunused-variable]
  int maxiter = 1000; double convergence_delta = 0.01; int exitloop =0;
                             ^
crisp/crispEM.c:217:9: warning: unused variable ‘LLrefsub’ [-Wunused-variable]
  double LLrefsub=0,LLrefadd=0;
         ^
crisp/crispEM.c:215:40: warning: unused variable ‘LLnullb’ [-Wunused-variable]
  double LLtotal =0,LLnullf=0,LLnullr=0,LLnullb=0;
                                        ^
crisp/crispEM.c:214:57: warning: unused variable ‘deltar’ [-Wunused-variable]
  double pnew=0,pnewf=0,pnewr=0,pnewb=0; double deltaf=0,deltar=0; double Lf=0,Lr=0,Lj=0,Lb=0;
                                                         ^
crisp/crispEM.c: In function ‘compute_GLL_pooled’:
crisp/crispEM.c:381:10: warning: unused variable ‘pvalue’ [-Wunused-variable]
   double pvalue = calculate_LRstatistic(variant,allele1,allele2,allele3,p_EM,E01,E10); 
          ^
In file included from crisp/newcrispcaller.c:26:0:
crisp/newcrispprint.c: In function ‘print_VCF_genotypes_diploid’:
crisp/newcrispprint.c:136:18: warning: unused variable ‘coverage’ [-Wunused-variable]
  int i=0,j=0,k=0,coverage=0,bidir=0;
                  ^
crisp/newcrispprint.c:136:14: warning: unused variable ‘k’ [-Wunused-variable]
  int i=0,j=0,k=0,coverage=0,bidir=0;
              ^
crisp/newcrispprint.c: In function ‘print_VCF_genotypes_pooled_full’:
crisp/newcrispprint.c:188:14: warning: unused variable ‘k’ [-Wunused-variable]
  int i=0,j=0,k=0,coverage=0,bidir=0;
              ^
crisp/newcrispprint.c: In function ‘print_pooledvariant’:
crisp/newcrispprint.c:435:4: warning: format not a string literal and no format arguments [-Wformat-security]
    fprintf(vfile,filter_strings[varfilters[i]]); if (i < variant->varalleles-1) fprintf(vfile,","); 
    ^
crisp/newcrispprint.c:387:7: warning: unused variable ‘FILTER’ [-Wunused-variable]
  char FILTER[1024]; int filters = 0; //strcpy(FILTER,"\0");
       ^
In file included from crisp/newcrispcaller.c:27:0:
crisp/pooledFET.c: In function ‘FETpvalue_indels’:
crisp/pooledFET.c:136:17: warning: assignment makes integer from pointer without a cast [-Wint-conversion]
    if (j ==0) R = variant->indcounts[i][allele1] + variant->indcounts[i][allele2] + variant->indcounts_binned[i][allele3]; 
                 ^
In file included from crisp/newcrispcaller.c:28:0:
crisp/poolstats.c: In function ‘calculate_pool_statistics’:
crisp/poolstats.c:8:55: warning: unused variable ‘i’ [-Wunused-variable]
  int spools =0; int variantpools =0; int a=0; int r=0,i=0; int varpool =0; int uniquess =0; int middle = 0;
                                                       ^
crisp/poolstats.c:8:51: warning: unused variable ‘r’ [-Wunused-variable]
  int spools =0; int variantpools =0; int a=0; int r=0,i=0; int varpool =0; int uniquess =0; int middle = 0;
                                                   ^
crisp/poolstats.c:7:9: warning: unused variable ‘p’ [-Wunused-variable]
  double p=0; double pvstrand[variant->samples]; double pvallow[4] = {0.0,0.0,0.0,0.0};
         ^
In file included from crisp/newcrispcaller.c:29:0:
crisp/oldcrispmethod.c: In function ‘call_genotypes’:
crisp/oldcrispmethod.c:17:20: warning: unused variable ‘Er’ [-Wunused-variable]
  double Ef =0.001, Er=0.001;
                    ^
crisp/oldcrispmethod.c:14:9: warning: variable ‘sum’ set but not used [-Wunused-but-set-variable]
  double sum =0;
         ^
crisp/oldcrispmethod.c:9:32: warning: unused variable ‘r’ [-Wunused-variable]
  int variants =0; int a=0; int r=0,i=0;
                                ^
In file included from crisp/newcrispcaller.c:29:0:
crisp/oldcrispmethod.c: In function ‘pooled_variantcaller’:
crisp/oldcrispmethod.c:157:25: warning: unused variable ‘pvaluelog’ [-Wunused-variable]
  int variants=0; double pvaluelog = variant->ctpval[variant->varalleles];  
                         ^
crisp/oldcrispmethod.c:134:33: warning: unused variable ‘potentialvar’ [-Wunused-variable]
  int i=0,j=0,al=0,pv=0,sample=0,potentialvar=0;
                                 ^
crisp/oldcrispmethod.c:134:24: warning: unused variable ‘sample’ [-Wunused-variable]
  int i=0,j=0,al=0,pv=0,sample=0,potentialvar=0;
                        ^
crisp/oldcrispmethod.c:134:19: warning: unused variable ‘pv’ [-Wunused-variable]
  int i=0,j=0,al=0,pv=0,sample=0,potentialvar=0;
                   ^
crisp/oldcrispmethod.c:134:14: warning: unused variable ‘al’ [-Wunused-variable]
  int i=0,j=0,al=0,pv=0,sample=0,potentialvar=0;
              ^
crisp/oldcrispmethod.c:134:10: warning: unused variable ‘j’ [-Wunused-variable]
  int i=0,j=0,al=0,pv=0,sample=0,potentialvar=0;
          ^
crisp/newcrispcaller.c: In function ‘evaluate_variant’:
crisp/newcrispcaller.c:113:25: warning: suggest parentheses around comparison in operand of ‘&’ [-Wparentheses]
    else if (FAST_FILTER ==1 & variant->ctpval[variant->varalleles] >= -3 && variant->ploidy[0] > 2 && hplength >= 8 && (p[0]/K) <= 0.1) return 0;
                         ^
crisp/newcrispcaller.c:40:45: warning: unused variable ‘N’ [-Wunused-variable]
  double p1=0,p2=0,ep; double C1=0,C2=0,C3=0,N=0;
                                             ^
crisp/newcrispcaller.c:40:19: warning: unused variable ‘ep’ [-Wunused-variable]
  double p1=0,p2=0,ep; double C1=0,C2=0,C3=0,N=0;
                   ^
crisp/newcrispcaller.c: In function ‘output_allele_counts’:
crisp/newcrispcaller.c:137:87: warning: unused variable ‘allele4’ [-Wunused-variable]
  int allele=0,allele1 = maxvec[0].al, allele2 = maxvec[1].al, allele3 = maxvec[2].al, allele4=maxvec[3].al;
                                                                                       ^
crisp/newcrispcaller.c:137:63: warning: unused variable ‘allele3’ [-Wunused-variable]
  int allele=0,allele1 = maxvec[0].al, allele2 = maxvec[1].al, allele3 = maxvec[2].al, allele4=maxvec[3].al;
                                                               ^
crisp/newcrispcaller.c:137:39: warning: unused variable ‘allele2’ [-Wunused-variable]
  int allele=0,allele1 = maxvec[0].al, allele2 = maxvec[1].al, allele3 = maxvec[2].al, allele4=maxvec[3].al;
                                       ^
crisp/newcrispcaller.c:137:15: warning: unused variable ‘allele1’ [-Wunused-variable]
  int allele=0,allele1 = maxvec[0].al, allele2 = maxvec[1].al, allele3 = maxvec[2].al, allele4=maxvec[3].al;
               ^
crisp/newcrispcaller.c: In function ‘newCRISPcaller’:
crisp/newcrispcaller.c:184:88: warning: unused variable ‘allele4’ [-Wunused-variable]
  int allele=0, allele1 = maxvec[0].al, allele2 = maxvec[1].al, allele3 = maxvec[2].al, allele4=-1;
                                                                                        ^
crisp/newcrispcaller.c:183:10: warning: unused variable ‘j’ [-Wunused-variable]
  int i=0,j=0,al=0,potentialvar=0,is_variant =0,variantpools=0;
          ^
In file included from crisp/newcrispcaller.c:27:0:
crisp/pooledFET.c: In function ‘chi2pvalue_variant’:
crisp/pooledFET.c:259:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
In file included from crisp/newcrispcaller.c:29:0:
crisp/oldcrispmethod.c: In function ‘calculate_chernoff_stats’:
crisp/oldcrispmethod.c:217:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
gcc -Wall -D_GNU_SOURCE -Isamtools -c parsebam/bamread.c -o include/bamread.o
In file included from parsebam/bamread.c:6:0:
parsebam/../indels/left_align_indels.c: In function ‘left_align_indels’:
parsebam/../indels/left_align_indels.c:8:10: warning: unused variable ‘j’ [-Wunused-variable]
  int i=0,j=0,op=0,l=0,l1=0,l2=0,j1=0,j2=0,op_prev = 0,l_prev =0;
          ^
parsebam/bamread.c: In function ‘parse_cigar’:
parsebam/bamread.c:12:34: warning: unused variable ‘j’ [-Wunused-variable]
  int i=0,t=0, l1=0,l2=0; int l=0,j=0;
                                  ^
In file included from parsebam/bamread.c:6:0:
parsebam/../indels/left_align_indels.c: In function ‘left_align_indels’:
parsebam/../indels/left_align_indels.c:55:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
gcc -Wall -D_GNU_SOURCE -DPICALL=3 -Iparsebam -Isamtools -g -O2 include/readfasta.o include/variant.o include/allelecounts.o include/bamsreader.o include/newcrispcaller.o include/chisquare.o include/contables.o include/bamread.o -lm readmultiplebams.c -o bin/CRISP.binary -Lsamtools -lbam -lz
In file included from readmultiplebams.c:11:0:
indels/generate_candidate_indels.c: In function ‘extract_indel_reads’:
indels/generate_candidate_indels.c:143:17: warning: unused variable ‘j’ [-Wunused-variable]
         int i=0,j=0,op=0,l=0,flag=0, l1=0,l2=0;
                 ^
In file included from readmultiplebams.c:12:0:
indels/realignment.c: In function ‘realign_read’:
indels/realignment.c:415:87: warning: unused variable ‘ss’ [-Wunused-variable]
  int alignments =0; int rlflag =0; int best = -1; int bestscore[2] = {-100,100};  int ss=0;
                                                                                       ^
In file included from readmultiplebams.c:61:0:
variantcalls.c: In function ‘callvariants’:
variantcalls.c:137:6: warning: unused variable ‘i’ [-Wunused-variable]
  int i=0, k=0,reads=0; 
      ^
In file included from readmultiplebams.c:56:0:
optionparser.c: In function ‘parse_bamfilenames’:
optionparser.c:154:3: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result]
   fgets(buffer,4096,fp); 
   ^
optionparser.c: In function ‘optparser’:
optionparser.c:274:4: warning: ignoring return value of ‘fscanf’, declared with attribute warn_unused_result [-Wunused-result]
    fscanf(fp,"%d\n",&options->phenotypes[i]); 
    ^
In file included from readmultiplebams.c:61:0:
variantcalls.c: In function ‘update_error_table’:
variantcalls.c:41:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
make[1]: Leaving directory '/home/ubuntu/git/crisp'
#make -C . crisp
#make -C . indel
vibansal commented 3 years ago

I don't see any error, these are compiler warnings. The binary should be there to run.

virenar commented 3 years ago

Thank you for your quick response. I do see the binary in the bin folder CRISP.binary but when I try to execute the tool it keeps displaying the default help message. I know i might be doing something really foolish.

(base) ubuntu@earth:~/git/crisp/bin$ ./CRISP.binary --bam H0-0-S001_sort.bam --ref human_g1k_v37_decoy.fasta --bed target_regions.bed -p 8 --VCF test.vcf > variantcalls.log

CRISP: statistical method to identify SNVs and indels from pooled DNA sequencing data (requires multiple samples (pools), ideally >=5 samples)

 Please provide a bed-file for calling variants on human samples to avoid large output files

./CRISP [options] --bams file_bam_paths --ref reference.fasta --VCF variantcalls.VCF -p poolsize > variantcalls.log

Options:
         --bams             textfile with list of bam file paths (one for each pool)
         --bam              bam file for one pool, specify file for each pool using --bam pool1.bam --bam pool2.bam .... --bam pooln.bam
         --ref              Indexed Reference Sequence file (fasta)
         --bed              bed file for list of regions in which variants should be called (format is chrom start end on each line)
         -p/--poolsize <int>    poolsize (number of haploid genomes in each pool), for diploid genomes: 2 x # individuals
         --VCF              VCF file to which the variant calls will be output 
         --qvoffset <int>   quality value offset, 33 is default
         --mbq     <int>    minimum base quality to consider a base for variant calling, default 10
         --mmq     <int>    minimum read mapping quality to consider a read for variant calling, default 20
         --regions          region(s) in which variants will be called, e.g chr1:654432-763332. BAM files should be indexed for using this option.
         --minc    <int>    minimum number of reads with alternate allele required for calling a variant, default 4
         --ctpval  <float>  threshold on the contingency table p-value for calling position as variant (specified as log10), default is -3.5
         --qvpval  <float>  threshold on the quality values based p-value for calling position as variant (specified as log10), default is -5
         --perms   <int>    maximum number of permutations for calculating contingency table p-value, default 20000
         --filterreads <0/1>    filter reads with excessive number of mismatches (and gaps) compared to the reference sequence, default is 1. Set to 0 to disable filtering
         --verbose  <0/1/2>     amount of information to output to log file, 0: no output, 1: medium (default), 2: detailed
         --OPE  <0/1>       identify overlapping paired-end reads and treat as single read in the overlapping region, default is 1, set to 0 to disable this (can be slow for high-coverage datasets)
         --refbias  <float>     reference allele bias for targeted sequencing data, default is 0.5, use 0.52-0.54 for Agilent SureSelect targeted sequencing experiments
     --EM       <0/1>   0 = old CRISP method with allele frequencies, 1 = EM algorithm will be used for estimating pooled genotypes and calling variants, default is 1
     --flankingbases <int>  call variants in regions that flank target regions in bed file, use 50 or 100 for targeted sequencing, default value is 0 

Notes:

 1. CRISP requires poolsize and reference fasta file for making variant calls
 2. CRISP requires at least two pools to make variant calls, but at least 5 pools are ideal
 3. The reference sequence file should be indexed using 'samtools faidx' or a similar program and placed in same directory as fasta file with extension .fai
 4. The ploidy of each pool is assumed to be the same, see the FAQ file for how to specify variable ploidy for each pool
 5. For human re-sequencing, if a bedfile is not specified, the program will evaluate each base for variant calling and the output log file can be huge
 6. Please make sure that the reference sequence file is the same as the one used to align the reads in the BAM files and that the BAM files are coordinate sorted
 7. For indel analysis, CRISP assumes that indels are left justified, --leftalign 1 option can be used to left justify gaps in aligned reads
 8. the program uses the samtools API for reading bam files 
 9. BAM files should be indexed in order to use the --regions option with the indexed bam file as pooln.bam.bai

 10. The aligned reads for each pool should be in a single bam file that is sorted by chromosomal coordinates
vibansal commented 3 years ago

It requires multiple samples (bam files) for variant calling. Please see the Notes and readme.