mpinese / nimpress

Polygenic score calculation from VCF in Nim.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Not locating libhts.so

lf-araujo opened this issue · comments

Hi @mpinese and @brentp,

upon first attempt using a linux distribution the executable seems not to be finding the libhts.so that is installed at /usr/local/lib in my system. My steps were:

installing htslib:

[luis@solus] ➜ htslib ( develop) sudo make install                                                               
Password: 
mkdir -p -m 755 /usr/local/bin /usr/local/include /usr/local/include/htslib /usr/local/lib /usr/local/share/man/man1 /usr/local/share/man/man5 /usr/local/share/man/man7 /usr/local/lib/pkgconfig
if test -n ""; then mkdir -p -m 755 ; fi
install -p -m 644 libhts.so /usr/local/lib/libhts.so.1.16-12-g4604554
ln -sf libhts.so.1.16-12-g4604554 /usr/local/lib/libhts.so
ln -sf libhts.so.1.16-12-g4604554 /usr/local/lib/libhts.so.3
sed -e 's#@-includedir@#/usr/local/include#g;s#@-libdir@#/usr/local/lib#g;s#@-PACKAGE_VERSION@#1.16-12-g4604554#g' htslib.pc.tmp > /usr/local/lib/pkgconfig/htslib.pc
chmod 644 /usr/local/lib/pkgconfig/htslib.pc
install -p bgzip htsfile tabix /usr/local/bin
if test -n ""; then install -p  ; fi
install -p -m 644 htslib/*.h /usr/local/include/htslib
install -p -m 644 libhts.a /usr/local/lib/libhts.a
install -p -m 644 bgzip.1 htsfile.1 tabix.1 /usr/local/share/man/man1
install -p -m 644 faidx.5 sam.5 vcf.5 /usr/local/share/man/man5
install -p -m 644 htslib-s3-plugin.7 /usr/local/share/man/man7

The file is at the /lib folder:

[luis@solus] ➜ Downloads dir /usr/local/lib/     
.rw-r--r-- root root 5.7 MB Mon Oct 10 10:48:46 2022  libhts.a
lrwxrwxrwx root root  26 B  Mon Oct 10 11:05:59 2022  libhts.so ⇒ libhts.so.1.16-12-g4604554
.rw-r--r-- root root 4.4 MB Mon Oct 10 10:49:16 2022  libhts.so.1.16-12-g4604554
lrwxrwxrwx root root  26 B  Mon Oct 10 11:05:59 2022  libhts.so.3 ⇒ libhts.so.1.16-12-g4604554
.rwxr-xr-x root root 180 KB Fri Nov  6 16:29:37 2020  libplotinus.so
drwxr-xr-x root root 4.0 KB Mon Oct 10 11:05:59 2022  pkgconfig

But simply calling nimpress ends with error:

[luis@solus] ➜ Downloads nimpress ebi-a-GCST006686.vcf.gz
could not load: libhts.so
(compile with -d:nimDebugDlOpen for more information)
  • I installed nimpress using nimble, can this be the reason?

I copied the binary from github releases and it works, you guys should have a look into the nimble installation.

image

did you run ldconfig after installing htslib? and make sure that directory is inclduded on your ld.so.conf?

Just tried running sudo ldconfig and added that folder to ld.so.conf. Didn't work. To clarify, I used nimble install nimpress, not the instructions in the github readme.

A further quesition I have is about <scoredef> this is the base data summary stats, correct? What is the expected file/column structure for this one?

In any case, the issue is solved, as the binary works. Just the direct nimble installation that seems borked. Perhaps you want to close this.

Thanks!

Thanks @brentp for jumping in and @lf-araujo for the report.

@lf-araujo glad you got it working with the static build. Can I just check -- you said "I used nimble install nimpress, not the instructions in the github readme." Can you confirm if the readme build instructions worked for you or not? We can look into fixing the nimble install but I hope the readme instructions at least work.

On your question about <scoredef> you are correct: this is the PS definition file, which usually is derived from summary stats. The format is given in the readme under the section "Polygenic score format" and there are some examples in the scores/ directory. I acknowledge this is not 100% clear in the readme so we'll update this when we next work on the docs.

Sorry for late response.

I followed installation instructions and the error persists (cloning, nimble install):

image

I should add there were no building errors, only at execution.