I'm posting this as I' am very frustated with this after some hours of not getting results. I'm running Ubuntu 14.0-64 bit in a virtual machine. I installed two Python packages (https://github.com/fls-bioinformatics-core/GFFUtils and https://github.com/fls-bioinformatics-core/genomics) by downloading the zips from Github, extracting them and running sudo python setup.py install in their directories. The first one needed to be installed before because of some dependencies but no problem after installation, everything rigth. I have python 2.7.6 and 3.4.0 installed.
Now, how do I run those programs? How does this work? I've been searching Google for hours and haven't found a way to run this thing. I'm desperate...
I tried to run them as you advise: after running sudo python setup.py install I cd to the desktop directory where the *.py files are located and try python GTF_extractt.py but i get
Traceback (most recetn call last):
File "GTF_extract.py", line 21, in <module> from . import get_version
ValueError: Attempted relative import in non-package
I'm trying to run a GFFUtils feature in a GFF file, but I can't find the way, usage and options only specify "GTF_extract.py OPTIONS <gft_file>". I want to run that GTF_extract.py.
If you want to run GTF_extract.py (which is a python script) then you provide any options you need where the OPTIONS part is there followed by the name of the gtf file you are using. e.g. GTF_extract.py -f exon my_genome.gtf -o extracted_info.file.
This isn't your problem I don't think ... the package isn't handling it's own imports properly. You probably just need to change from . import get_version to from GFFUtils import get_version.
The program isn't doing anything particularly exciting anyway, though, so you could also just do it in a different way in any case.
Hey friend. I'm an international applicant who want to apply for M.S of Computational Biology of CMU. Could you help me to have a glance at one paragraph, which I write newly, of my SOP? I'm afraid I don't express things naturally. It is a little urgent since the deadline is in 8 hours. Thanks!
This thread is old, and this is not the place for additional questions. You should ask your question as a full thread on the main page of the site - though it's not strictly bioinformatics so don't be surprised if it gets closed.
Yes, it would indeed get closed. In addition, I removed all other off-topic reactions syndoom1 made with the same text in unrelated threads. It looks like you genuinely need help, but this looks a remarkable lot like spam so if this continues your account will be suspended.
Well, I don't know how I did it but the program now runs perfectly from Ubuntu Terminal without specifying any extra route, it does everything that I've dreamed of. Think it was something realted to what @jrj.healey suggested.
first how did you tried to run them? in general to run python script you issue command like
python your_script.py
and to know which python running the command you should run
which python
I tried to run them as you advise: after running
sudo python setup.py install
I cd to the desktop directory where the *.py files are located and trypython GTF_extractt.py
but i getTraceback (most recetn call last): File "GTF_extract.py", line 21, in <module> from . import get_version ValueError: Attempted relative import in non-package
What does this mean? What am I doing wrong?
can you please do this
sed -n '20,22p' GTF_extractt.py
and write down the resultAnder : Did you also test the GFFUtils install by doing
python setup.py test
as suggested?from the documentation line 21 is
from . import get_version __version__ = get_version()
you have the error because
you are missing some packages I think your installation is not correct
please refer to what @genomax2 said and use the test module
I run the test module and it said everything was OK. Do you suggest my python installation is not correct or that of GFFUtils?
I don't have access to the computer right now, I'll try and run the "sed -n" command this afternoon.
Again, thanks a lot for your support, I have zero idea about python and this has become really frustrating.