0

I am trying to use the Jupyter notebooks from "An Introduction to Applied Bioinformatics". My computer is a Mac M1 with the Ventura OS and I'm using Python 3.9.2. When I get to the cells using packages from iab I get error messages. For example

from iab.algorithms import show_F

error no module named iab.

I cannot find an iab package to load it, even though I installed scikit bio.

All code cells using the iab module failed.

Dharman
  • 30,962
  • 25
  • 85
  • 135
Theo
  • 1
  • Cross-posted [here](https://github.com/applied-bioinformatics/iab2/issues/4). – Wayne Dec 15 '22 at 19:50
  • What notebooks are you referencing? I don't see any notebooks [here](https://github.com/applied-bioinformatics/iab2)? They currently use Jupyter book to work through [An Introduction to Applied Bioinformatics, 2nd Edition](https://readiab.org/introduction.html) the content. You hit the 'Binder' button in the upper right on each page and it should work. – Wayne Dec 15 '22 at 20:01
  • [The first edition](https://github.com/applied-bioinformatics/An-Introduction-To-Applied-Bioinformatics) had an [iab module](https://github.com/applied-bioinformatics/An-Introduction-To-Applied-Bioinformatics/tree/master/iab) and code that imported from it, like `from iab.algorithms import load_taxonomy_reference_database` from [here](https://github.com/applied-bioinformatics/An-Introduction-To-Applied-Bioinformatics/blob/bd4ec8752709a18f5c81aaddc592965548bcd5c2/book/fundamentals/machine-learning.md?plain=1#L41). You can see all those references are only in the first edition with.. – Wayne Dec 15 '22 at 20:01
  • [this search of the code in the organization repo](https://github.com/search?q=org%3Aapplied-bioinformatics%20from%20iab.algorithms&type=code). And noting none of those come up in https://github.com/applied-bioinformatics/iab2. – Wayne Dec 15 '22 at 20:03
  • OH WAIT! The developer messed up the Jupyter Book launch on MyBinder. It currently cannot build the image. However, that has nothing to do with your original issue where it seems you are using the old, **unsupported** version. – Wayne Dec 15 '22 at 20:10
  • Hopefully, [this addresses](https://github.com/applied-bioinformatics/iab2/issues/4#issuecomment-1353651265) your issue? **The last line of [the environment.yml](https://github.com/applied-bioinformatics/built-iab/blob/master/environment.yml) is important for installing the `iab` module**. I found in a running vanilla mybinder session, I could use `%pip install https://github.com/caporaso-lab/An-Introduction-To-Applied-Bioinformatics/archive/master.zip` & then after restarting the kernel, `from iab.algorithms import show_F` works. You may want to try `%pip install ..` command in your notebook. – Wayne Dec 15 '22 at 20:32

1 Answers1

0

If you are going to continue to work with the content from edition 1, see here.

I'd suggest try running in a new cell in your notebook the following:

%pip install https://github.com/caporaso-lab/An-Introduction-To-Applied-Bioinformatics/archive/master.zip

Then restart the kernel and now from iab.algorithms import show_F should work. See my comment for further explanation.

Wayne
  • 6,607
  • 8
  • 36
  • 93