prihoda / AbNumber

Convenience Python APIs for antibody numbering using ANARCI
MIT License
83 stars 11 forks source link

ANARCI import #22

Open Hrovatin opened 4 months ago

Hrovatin commented 4 months ago

I had issues installing AbNumber due to missing HMMER dependency on Mac M3, which I solved by the following workaround:

Instal hmmer Install anarci via: git clone https://github.com/oxpig/ANARCI.git and follow instructions on github Install abnumber via: pip install git+https://github.com/prihoda/abnumber

However, when importing abnumber I get this error

>>> import abnumber
ANARCI module not available. Please install it separately or install AbNumber through Bioconda
See: https://abnumber.readthedocs.io/

ANARCI seems to be working, but has different import name than specified in https://github.com/prihoda/AbNumber/blob/c3e869a8f0564e98d0d6cd6ce42909893fdbb238/abnumber/common.py#L7 The below namely works:

# Command
from ANARCI import anarci
anarci(
        [(f'id{1}', 'AATATATATAT')],
        scheme='imgt',
        allowed_species=None,
    )

#Out: 
([None],
 [None],
 [[['id',
    'description',
    'evalue',
    'bitscore',
    'bias',
    'query_start',
    'query_end']]])

So maybe https://github.com/prihoda/AbNumber/blob/c3e869a8f0564e98d0d6cd6ce42909893fdbb238/abnumber/common.py#L7 should be changed to from ANARCI import anarci