ISA-API Python

47 views
Skip to first unread message

la val

unread,
Nov 2, 2017, 9:22:08 AM11/2/17
to ISAforum

Hello everyone,

I am new here and I would like to establish the ISA-API in Python instead of the ISA Excel-like tools. I am using this manual https://isatools.readthedocs.io/en/latest/installation.html
Unfortunately, whatever I try I am flooded with error messages. Since, I seem to be the only one here with such problems I would like to ask the experts what I am doing wrong. I should mention that I come from R and have no experience yet with Python. That's why a good and working manual is for me very important.

What I finally want to do is to read in an ISA-like folder and validate it via the Python api and get an ISA-archive. 

But after installing miniconda 3.5 and following the script I land nowhere close. Here is the minimal version of what I did:

1.  pip install isatools
2.
git clone -b tests --single-branch http://github.com/ISA-tools/ISAdatasets tests/data
3.
python setup.py test

After the third step I get informed there is no such file: $ python setup.py test
python: can't open file 'setup.py': [Errno 2] No such file or directory

I don't understand why not even the tests work and I would appreciate if someone could point me on a fix or a better manual. I tried a lot of other things like earlier/later versions, renewing scripts and so on, but I always reach fast the point when files are missing or can't be installed, like
pip install -r requirements.txt

Thank you and best wihes
Lars

la val

unread,
Nov 2, 2017, 9:51:58 AM11/2/17
to ISAforum
I would like to add that I also tried validating ISA-Tabs https://isatools.readthedocs.io/en/latest/validation.html with no success. I could not even download the mentioned
sample data sets BII-I-1, BII-S-3 and BII-S-7 .

Alex Henderson

unread,
Nov 2, 2017, 10:02:53 AM11/2/17
to isaf...@googlegroups.com

Hi Lars,

 

Prelim: I’m not a Python expert and have not used isatools…

 

If you’re running Linux and installed python 3.x, you need to install all the modules into python 3. Linux typically comes with python 2 and that is the default. When you run pip you could be installing the modules in to the python 2 location rather than python 3 (or, potentially, the other way round). Try using python3 rather than python and pip3 rather than pip.

 

Generally it is not a good idea to install anything into the system python environment.

 

https://realpython.com/blog/python/python-virtual-environments-a-primer/

 

Of course this may have nothing whatsoever to do with your problem J

 

Best wishes,

Alex

--
--
--
 
You received this message because you are subscribed to the Google
Groups "ISAforum" group.
To post to this group, send email to isaf...@googlegroups.com
To unsubscribe from this group, send email to
isaforum+u...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/isaforum?hl=en-GB
 
Visit the ISA tools website at http://isa-tools.org and http://isacommons.org
---
You received this message because you are subscribed to the Google Groups "ISAforum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to isaforum+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

David Johnson

unread,
Nov 2, 2017, 10:26:53 AM11/2/17
to ISAforum
Hi Lars,

It looks like there's a bit of a muddle in how you're trying to install the ISA API.

Your step (1) 'pip install isatools' is only for installing from the Python Package Index. To use ISA API installed in this way, this is all you need to do and will have the package installed into your local package manager like other Python packages you use.

Your steps (2) and (3) are steps relating to installing from the ISA API sources. For this you need to checkout the ISA API project from GitHub first. If you want to install from source, you will need to do the following:

First of all, uninstall isatools from your pip to make sure it does not clash with the version you will install from sources:

pip uninstall isatools

Now, check out the ISA API project


Then change directory to where the new project was cloned, something like

cd isa-api

Now do your steps 2 and 3 if you want to run the test suite.

Please note that the ISA API is intended for use by those with knowledge of Python - if you have no experience with the Python environment you will need to learn at least the basics in order to be able to use the ISA API.

Best/David
Reply all
Reply to author
Forward
0 new messages