Fwd: [hakyimlab/MetaXcan] ImportError: libathr.so.1: cannot open shared object file: No such file or directory (Issue #139)

152 views
Skip to first unread message

Hae Kyung Im

unread,
Oct 31, 2021, 5:59:39 PM10/31/21
to PrediXcan/MetaXcan
forwarding to the predixcanmetaxcan mailing list where you may get help  

Haky

---------- Forwarded message ---------
From: Cuihua Xia <notifi...@github.com>
Date: Sat, Oct 30, 2021 at 10:01 AM
Subject: [hakyimlab/MetaXcan] ImportError: libathr.so.1: cannot open shared object file: No such file or directory (Issue #139)
To: hakyimlab/MetaXcan <Meta...@noreply.github.com>
CC: Subscribed <subsc...@noreply.github.com>


Hello, I have some problems when I run the Predict.py.

Here is my script:
Predict.py --model_db_path ~/test_data/predixcan_sample_data/models/gtex_v8_en/en_Whole_Blood.db --bgen_genotypes ~/test_data/predixcan_sample_data/1000G_hg37_bgen/chr22.bgen --bgen_use_rsid --prediction_output Whole_Blood_test_predict.txt --prediction_summary_output Whole_Blood_test_summary.txt --verbosity 9 --throw

Here is the error:
INFO - Loading samples Traceback (most recent call last): File "/zs32/home/chxia/Softwares/MetaXcan-master/software/Predict.py", line 272, in <module> run(args) File "/zs32/home/chxia/Softwares/MetaXcan-master/software/Predict.py", line 160, in run samples = load_samples(args) File "/zs32/home/chxia/Softwares/MetaXcan-master/software/Predict.py", line 90, in load_samples from metax.genotype import BGENGenotype File "/zs32/home/chxia/Softwares/MetaXcan-master/software/metax/genotype/BGENGenotype.py", line 1, in <module> import bgen_reader File "/zs32/home/chxia/anaconda3/envs/gwasimputation/lib/python3.7/site-packages/bgen_reader/__init__.py", line 26, in <module> from ._metadata import create_metafile File "/zs32/home/chxia/anaconda3/envs/gwasimputation/lib/python3.7/site-packages/bgen_reader/_metadata.py", line 4, in <module> from ._bgen import bgen_file File "/zs32/home/chxia/anaconda3/envs/gwasimputation/lib/python3.7/site-packages/bgen_reader/_bgen.py", line 3, in <module> from ._ffi import ffi, lib ImportError: libathr.so.1: cannot open shared object file: No such file or directory

Could you help me solve this problem?

Thanks!


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.

Festus

unread,
Nov 1, 2021, 5:02:07 PM11/1/21
to PrediXcan/MetaXcan
Hi

This looks like some of the tools did not install correctly.

Kindly follow this guide to install the conda environment correctly with the required tools.

Lea L.

unread,
Mar 30, 2022, 7:48:00 AM3/30/22
to PrediXcan/MetaXcan
Hi Haky & Festus and Xia, 

I get exactly the same issue with the examples with the bgen files (e.g. Example 2): https://github.com/hakyimlab/MetaXcan/wiki/Individual-level-PrediXcan:-introduction,-tutorials-and-manual 
The examples with the vcf files work without problem.

So I assume it has to do something with the bgen format.
But I am using the imlabtools. I realised that there it only has version 3.0.2 installed instead of the recommended version >= 3.0.3 (https://github.com/hakyimlab/MetaXcan#example-conda-environment-setup) :

bgen_reader               3.0.2 

So installed verision 3.0.3 but still I am getting below error:

PrediXcan]$ python3 $METAXCAN/Predict.py \
> --model_db_path $DATA/models/gtex_v8_en/en_Whole_Blood.db \
> --bgen_genotypes $DATA/1000G_hg37_bgen/chr22.bgen \
> --bgen_use_rsid \
> --prediction_output $RESULTS/bgen_1000G_hg37_en/Whole_Blood__predict.txt \
> --prediction_summary_output $RESULTS/bgen_1000G_hg37_en/Whole_Blood__summary.txt \
> --verbosity 9 \
> --throw

INFO - Loading samples
Traceback (most recent call last):
  File "MetaXcan/software/Predict.py", line 272, in <module>
    run(args)
  File "MetaXcan/software/Predict.py", line 160, in run
    samples = load_samples(args)
  File "MetaXcan/software/Predict.py", line 90, in load_samples
    from metax.genotype import BGENGenotype
  File "/gpfs/igmmfs01/eddie/CCGG-rnaseq/lea/MASH_models/PrediXcan/MetaXcan/software/metax/genotype/BGENGenotype.py", line 1, in <module>
    import bgen_reader
  File "/exports/igmm/eddie/CCGG-rnaseq/lea/MASH_models/conda2022/envs/imlabtools/lib/python3.7/site-packages/bgen_reader/__init__.py", line 26, in <mod                             ule>
    from ._metadata import create_metafile
  File "/exports/igmm/eddie/CCGG-rnaseq/lea/MASH_models/conda2022/envs/imlabtools/lib/python3.7/site-packages/bgen_reader/_metadata.py", line 4, in <mod                             ule>
    from ._bgen import bgen_file
  File "/exports/igmm/eddie/CCGG-rnaseq/lea/MASH_models/conda2022/envs/imlabtools/lib/python3.7/site-packages/bgen_reader/_bgen.py", line 3, in <module>

    from ._ffi import ffi, lib
ImportError: libathr.so.1: cannot open shared object file: No such file or directory

Can anyone help me with this?

Thank you, 

Lea 

Lea L.

unread,
Mar 31, 2022, 10:41:27 AM3/31/22
to PrediXcan/MetaXcan
Dear Haky & Festus, 

Just to update you that I went through my setup again today with two bioinformatician (independently) in my institute and we cannot see any mistake in the way I am doing it.

We tried two ways:

1) Using imlabtools (be aware that it uses bgen_reader=3.0.2) not as specified in your prerequisites as 3.0.3. (https://github.com/hakyimlab/metaxcan#prerequisites)
Also from what I see it is not called bgen_reader from version 3.0.3 instead it is bgen-reader

2) Setting up a new environment and loading all packages manually exactly as specified  (be aware that bgen-reader 3.0.3 needs python 3.6 not 3.5)

I keep getting the error from my last message. This only applies to Example 2 (with bgen file), it does work for the other examples.

Any advice very appreciated as in my institute I contacted all experts and not sure how to continue at this point.

Best Regards,
Lea 

Hae Kyung Im

unread,
Mar 31, 2022, 10:48:48 AM3/31/22
to Lea L., PrediXcan/MetaXcan
Lea,

if the vcf version works, could you reformat your genotype file? Not ideal but it may be a quick solution.

Haky

--
You received this message because you are subscribed to the Google Groups "PrediXcan/MetaXcan" group.
To unsubscribe from this group and stop receiving emails from it, send an email to predixcanmetax...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/predixcanmetaxcan/b064071f-082b-4bca-8a1a-e8c8d06e99d6n%40googlegroups.com.


--
Hae Kyung Im, PhD - 任慧耕 - 임혜경 - She/her
Assistant Professor, Section of Genetic Medicine
The University of Chicago Medicine & Biological Sciences
Member of Committee on Genetics, Genomics & Systems Biology
Center for Translational Data Science
Computing Environment and Life Sciences Directorate, Argonne National Laboratory
5841 S. Maryland Ave. Chicago, IL 60637, USA| N412
Phone:  773.702.3898 | FAX: 773.702.2567
Email: ha...@uchicago.edu | Twitter: @hakyim
http://hakyimlab.org | https://github.com/hakyimlab | https://orcid.org/0000-0003-0333-5685
http://scholar.google.com/citations?user=1QD4sIcAAAAJ
Directions to my office https://tinyurl.com/hki-office

Lea L.

unread,
Mar 31, 2022, 11:02:28 AM3/31/22
to PrediXcan/MetaXcan
Dear Haky, 

Thank you for your reply.
I need to see if my group is happy with that.. Not sure if it could have impact on the quality of my data?!
I have quite a big dataset of 5000 cases.

Lea
Reply all
Reply to author
Forward
0 new messages