todddeluca / reciprocal_smallest_distance

Reciprocal Smallest Distance (RSD) is a pairwise orthology algorithm that uses global sequence alignment and maximum likelihood evolutionary distance between sequences to accurately detects orthologs between genomes.
MIT License
13 stars 6 forks source link

__version__ issue #1

Closed bkbonde closed 12 years ago

bkbonde commented 12 years ago

Hi Todd, I get error when i try to run rsd_search.

uk1us00008> rsd_search -q q_protein.faa -s atcc.faa -o 'rsd_sc6vsatcc.txt' Traceback (most recent call last): File "/home/software/python/epd27/bin/rsd_search", line 5, in pkg_resources.run_script('reciprocal-smallest-distance==1.1.2', 'rsd_search') File "/home/software/python/epd27/lib/python2.7/site-packages/distribute-0.6.27-py2.7.egg/pkg_resources.py", line 499, in run_script self.require(requires)[0].run_script(script_name, ns) File "/home/software/python/epd27/lib/python2.7/site-packages/distribute-0.6.27-py2.7.egg/pkg_resources.py", line 1239, in run_script execfile(script_filename, namespace, namespace) File "/home/software/python/epd_free-7.1-1-rh5-x86_64/lib/python2.7/site-packages/reciprocal_smallest_distance-1.1.2-py2.7.egg/EGG-INFO/scripts/rsd_search", line 13, in import rsd File "/home/software/python/epd27/lib/python2.7/site-packages/reciprocal_smallest_distance-1.1.2-py2.7.egg/rsd/init.py", line 2, in from rsd.version import version ImportError: No module named version

I have EPDPython 2.7 on linux and have all dependencies installed (added to path). i managed to get the temp fix/solution by declaring version in my init.py file but I also get an error 'blank lines not allowed'. I don't have blank line in my file except the last line in the file which is empty. Why is the empty line not allowed in fastafile?

File "/home/software/python/epd27/lib/python2.7/site-packages/reciprocal_smallest_distance-1.1.2-py2.7.egg/rsd/fasta.py", line 222, in _fastaSeqIter raise Exception('FASTA error: blank lines not allowed') Exception: FASTA error: blank lines not allowed

todddeluca commented 12 years ago

Hi Pribond,

Sorry about taking so long to notice this Issue. I will work on fixing the version problem. I think it is probably a bug introduced in a recent commit where I was simplifying where version comes from.

I will also make FASTA parsing more tolerant of blank lines. Internally we work with FASTA files with no blank lines at all, but it makes sense to just ignore any blank lines in input FASTA files.

Hopefully I should have a fix by end-of-day.

todddeluca commented 12 years ago

These issues should be fixed now. You should upgrade to the latest version (1.1.3) from pypi. E.g.:

pip install --upgrade reciprocal_smallest_distance

As to why the blank line was giving you an error, following NCBI FASTA guidelines (http://blast.ncbi.nlm.nih.gov/blastcgihelp.shtml) that suggest that blank lines within a sequence are an error, I made all blank lines an error by default. This worked with our fasta files, but is too strict. Anyway, now the code simply removes all blank lines, so that trailing line should not bother you.