odelaneau / shapeit4

Segmented HAPlotype Estimation and Imputation Tool
MIT License
89 stars 17 forks source link

Getting shapeit4: command not found after successful installation #66

Closed rashindrie closed 2 years ago

rashindrie commented 2 years ago

Hi,

I followed instructions here to install and I think the installation completed successfully.

root@ip-172-31-2-156:/tmp/shapeit4-4.2.2# make
g++ -std=c++11 -O3 -mavx2 -mfma  -c src/io/genotype_reader1.cpp -o obj/genotype_reader1.o -Isrc -I/tmp/htslib -I/usr/include
g++ -std=c++11 -O3 -mavx2 -mfma  -c src/io/gmap_reader.cpp -o obj/gmap_reader.o -Isrc -I/tmp/htslib -I/usr/include
g++ -std=c++11 -O3 -mavx2 -mfma  -c src/io/genotype_reader2.cpp -o obj/genotype_reader2.o -Isrc -I/tmp/htslib -I/usr/include
g++ -std=c++11 -O3 -mavx2 -mfma  -c src/io/graph_writer.cpp -o obj/graph_writer.o -Isrc -I/tmp/htslib -I/usr/include
g++ -std=c++11 -O3 -mavx2 -mfma  -c src/io/haplotype_writer.cpp -o obj/haplotype_writer.o -Isrc -I/tmp/htslib -I/usr/include
g++ -std=c++11 -O3 -mavx2 -mfma  -c src/phaser/phaser_algorithm.cpp -o obj/phaser_algorithm.o -Isrc -I/tmp/htslib -I/usr/include
g++ -std=c++11 -O3 -mavx2 -mfma  -c src/phaser/phaser_parameters.cpp -o obj/phaser_parameters.o -Isrc -I/tmp/htslib -I/usr/include
g++ -std=c++11 -O3 -mavx2 -mfma  -c src/phaser/phaser_management.cpp -o obj/phaser_management.o -Isrc -I/tmp/htslib -I/usr/include
g++ -std=c++11 -O3 -mavx2 -mfma  -c src/phaser/phaser_initialise.cpp -o obj/phaser_initialise.o -Isrc -I/tmp/htslib -I/usr/include
g++ -std=c++11 -O3 -mavx2 -mfma  -c src/phaser/phaser_finalise.cpp -o obj/phaser_finalise.o -Isrc -I/tmp/htslib -I/usr/include
g++ -std=c++11 -O3 -mavx2 -mfma  -c src/objects/hmm_parameters.cpp -o obj/hmm_parameters.o -Isrc -I/tmp/htslib -I/usr/include
g++ -std=c++11 -O3 -mavx2 -mfma  -c src/objects/compute_job.cpp -o obj/compute_job.o -Isrc -I/tmp/htslib -I/usr/include
g++ -std=c++11 -O3 -mavx2 -mfma  -c src/objects/variant.cpp -o obj/variant.o -Isrc -I/tmp/htslib -I/usr/include
g++ -std=c++11 -O3 -mavx2 -mfma  -c src/objects/genotype/genotype_build.cpp -o obj/genotype_build.o -Isrc -I/tmp/htslib -I/usr/include
g++ -std=c++11 -O3 -mavx2 -mfma  -c src/objects/genotype/genotype_managment.cpp -o obj/genotype_managment.o -Isrc -I/tmp/htslib -I/usr/include
g++ -std=c++11 -O3 -mavx2 -mfma  -c src/objects/genotype/genotype_sweep.cpp -o obj/genotype_sweep.o -Isrc -I/tmp/htslib -I/usr/include
g++ -std=c++11 -O3 -mavx2 -mfma  -c src/objects/genotype/genotype_mask.cpp -o obj/genotype_mask.o -Isrc -I/tmp/htslib -I/usr/include
g++ -std=c++11 -O3 -mavx2 -mfma  -c src/objects/genotype/genotype_prune.cpp -o obj/genotype_prune.o -Isrc -I/tmp/htslib -I/usr/include
g++ -std=c++11 -O3 -mavx2 -mfma  -c src/models/haplotype_segment_single.cpp -o obj/haplotype_segment_single.o -Isrc -I/tmp/htslib -I/usr/include
g++ -std=c++11 -O3 -mavx2 -mfma  -c src/models/haplotype_segment_double.cpp -o obj/haplotype_segment_double.o -Isrc -I/tmp/htslib -I/usr/include
g++ -std=c++11 -O3 -mavx2 -mfma  -c src/containers/variant_map.cpp -o obj/variant_map.o -Isrc -I/tmp/htslib -I/usr/include
g++ -std=c++11 -O3 -mavx2 -mfma  -c src/containers/haplotype_set.cpp -o obj/haplotype_set.o -Isrc -I/tmp/htslib -I/usr/include
g++ -std=c++11 -O3 -mavx2 -mfma  -c src/containers/bitmatrix.cpp -o obj/bitmatrix.o -Isrc -I/tmp/htslib -I/usr/include
g++ -std=c++11 -O3 -mavx2 -mfma  -c src/containers/genotype_set.cpp -o obj/genotype_set.o -Isrc -I/tmp/htslib -I/usr/include
g++ -std=c++11 -O3 -mavx2 -mfma  -c src/main.cpp -o obj/main.o -Isrc -I/tmp/htslib -I/usr/include
g++ -std=c++11 -O3 -mavx2 -mfma  -c src/modules/pbwt_solver.cpp -o obj/pbwt_solver.o -Isrc -I/tmp/htslib -I/usr/include
g++ -std=c++11 -O3 -mavx2 -mfma  -c src/modules/builder.cpp -o obj/builder.o -Isrc -I/tmp/htslib -I/usr/include
g++ -std=c++11 -O3 obj/genotype_reader1.o obj/gmap_reader.o obj/genotype_reader2.o obj/graph_writer.o obj/haplotype_writer.o obj/phaser_algorithm.o obj/phaser_parameters.o obj/phaser_management.o obj/phaser_initialise.o obj/phaser_finalise.o obj/hmm_parameters.o obj/compute_job.o obj/variant.o obj/genotype_build.o obj/genotype_managment.o obj/genotype_sweep.o obj/genotype_mask.o obj/genotype_prune.o obj/haplotype_segment_single.o obj/haplotype_segment_double.o obj/variant_map.o obj/haplotype_set.o obj/bitmatrix.o obj/genotype_set.o obj/main.o obj/pbwt_solver.o obj/builder.o /tmp/htslib/libhts.a /usr/lib/x86_64-linux-gnu/libboost_iostreams.a /usr/lib/x86_64-linux-gnu/libboost_program_options.a -o bin/shapeit4.2 -lz -lbz2 -lm -lpthread -llzma -lcurl -lssl -lcrypto

However, when I try to run shapeit4 command, I get an error:

root@ip-172-31-2-156:/home/ubuntu/snp_analysis# shapeit4
shapeit4: command not found

makefile contents

#HTSLIB LIBRARY [SPECIFY YOUR OWN PATHS]
HTSLIB_INC=/tmp/htslib
HTSLIB_LIB=/tmp/htslib/libhts.a

#BOOST IOSTREAM & PROGRAM_OPTION LIBRARIES [SPECIFY YOUR OWN PATHS]
BOOST_INC=/usr/include
BOOST_LIB_IO=/usr/lib/x86_64-linux-gnu/libboost_iostreams.a
BOOST_LIB_PO=/usr/lib/x86_64-linux-gnu/libboost_program_options.a

Not sure what I'm doing wrong here. Any tips are appreciated.

Thanks, Rashindrie

odelaneau commented 2 years ago

Hi,

Option 1: Add in the path the location of shapeit4

Option 2: Use ./shapeit4 instead of shapeit4

Best,

Olivier

rashindrie commented 2 years ago

Hi,

Thanks for your reply.

The main problem was I had to use shapeit4.2 instead of shapeit4... After realising that and adding the bin path to $PATH, I'm able to call shapeit4.2 successfully.

Thank you again!